CN114048826A - Recommendation model training method, device, equipment and medium - Google Patents
Recommendation model training method, device, equipment and medium Download PDFInfo
- Publication number
- CN114048826A CN114048826A CN202111437512.0A CN202111437512A CN114048826A CN 114048826 A CN114048826 A CN 114048826A CN 202111437512 A CN202111437512 A CN 202111437512A CN 114048826 A CN114048826 A CN 114048826A
- Authority
- CN
- China
- Prior art keywords
- vector
- user
- target user
- target
- project
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012549 training Methods 0.000 title claims abstract description 63
- 238000000034 method Methods 0.000 title claims abstract description 52
- 239000013598 vector Substances 0.000 claims abstract description 407
- 238000011156 evaluation Methods 0.000 claims abstract description 90
- 230000003993 interaction Effects 0.000 claims abstract description 85
- 230000004927 fusion Effects 0.000 claims abstract description 76
- 238000013528 artificial neural network Methods 0.000 claims abstract description 38
- 238000004590 computer program Methods 0.000 claims description 21
- 230000002452 interceptive effect Effects 0.000 claims description 13
- 238000010586 diagram Methods 0.000 description 27
- 230000006870 function Effects 0.000 description 19
- 230000008569 process Effects 0.000 description 12
- 230000007246 mechanism Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 8
- 230000004913 activation Effects 0.000 description 7
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000010606 normalization Methods 0.000 description 3
- 210000002569 neuron Anatomy 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/25—Fusion techniques
- G06F18/253—Fusion techniques of extracted features
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Artificial Intelligence (AREA)
- Evolutionary Computation (AREA)
- Databases & Information Systems (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Computational Linguistics (AREA)
- Bioinformatics & Computational Biology (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Evolutionary Biology (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The application relates to the technical field of information recommendation, and provides a recommendation model training method, device, equipment and medium for improving the accuracy of information recommendation. The method comprises the following steps: fusing a user vector of each user and a first evaluation vector of each user for a target item to obtain a first interaction vector of each user for the target item, inputting the item vector and the first interaction vector of the target item into a first neural network for fusion to obtain a first attention weight of each user, conducting weighted fusion on a plurality of first interaction vectors of the plurality of users for the target item based on the first attention weights of the plurality of users to obtain a first vector of the target item, fusing the first vector of the target item and a second vector of the target user to obtain a predicted rating of the target item by the target user, adjusting model parameters of a recommendation model based on the actual rating and the predicted rating, and obtaining the trained recommendation model.
Description
Technical Field
The application relates to the technical field of information recommendation, in particular to a recommendation model training method, device, equipment and medium.
Background
With the rapid development of networks and the continuous abundance of network resources, the amount of information on the networks is also increasing, and information overload has become an important challenge. Since there is a lot of redundant data on the network, which seriously interferes the user to obtain valid data, the search engine can help the user to filter information, but it cannot help the user whose demand is not clear.
The recommendation system does not need the user to provide specific requirements, models the user and the article by analyzing and processing the information of the user and the article, further mines the connection of the user and then actively recommends related articles for the user. However, the conventional recommendation system usually lacks the ability to distinguish the credibility of the user, and the user usually trusts the feedback of friends rather than other ordinary users when making decisions, resulting in lower accuracy of the recommendation system.
Disclosure of Invention
The embodiment of the application provides a recommendation method, a recommendation device, recommendation equipment and a recommendation medium, which are used for improving the accuracy of information recommendation.
In a first aspect, the present application provides a recommendation model training method, including:
fusing a user vector of each user and a first evaluation vector of each user for a target item to obtain a first interaction vector of each user for the target item;
inputting the item vector of the target item and the first interaction vector into a first neural network for fusion to obtain a first attention weight of each user, wherein the first attention weight is used for indicating the contribution of each user to the target item;
performing weighted fusion on a plurality of first interaction vectors of the target project, which are obtained by the users, based on first attention weights of the users, to obtain a first vector of the target project, wherein the users are users who have evaluated the target project, and the first vector is used for indicating characteristics of the target project;
obtaining a second vector of a target user based on a project vector of a plurality of projects, a second evaluation vector of the target user for the plurality of projects, and a third evaluation vector of a plurality of neighbor users of the target user for the plurality of projects, wherein the plurality of neighbor users are friends having an interactive relationship with the target user, the plurality of projects are projects evaluated by the target user, and the second vector is used for indicating characteristics of the target user;
fusing the first vector and the second vector to obtain the prediction rating of the target user on the target item;
adjusting model parameters of the recommendation model based on the actual rating and the predicted rating of the target user on the target item to obtain a trained recommendation model;
and generating a recommended item list of the target user based on the trained recommendation model.
In one possible embodiment, obtaining the second vector of the target user based on a project vector of a plurality of projects, a second rating vector of the target user for the plurality of projects, and a third rating vector of a plurality of neighbor users of the target user for the plurality of projects comprises:
obtaining a first sub-vector of a target user based on a project vector of a plurality of projects and a second evaluation vector of the target user on the plurality of projects, wherein the first sub-vector is used for indicating evaluation conditions of the target user on the plurality of projects;
obtaining a second sub-vector of the target user based on the project vectors of a plurality of projects and third evaluation vectors of the target user for the projects, wherein the second sub-vector is used for indicating evaluation conditions of the projects by the neighbor users;
and fusing the first sub-vector and the second sub-vector to obtain a second vector of the target user.
In one possible embodiment, obtaining the first sub-vector of the target user based on the item vectors of the plurality of items and the second evaluation vector of the target user for the plurality of items comprises:
fusing the project vector of each project and the second evaluation vector of each project of the target user to obtain a second interaction vector of each project of the target user;
inputting the user vector of the target user and the second interaction vector into a second neural network for fusion to obtain a second attention weight of each item, wherein the second attention weight is used for indicating the contribution of the target user to each item;
and performing weighted fusion on a plurality of second interaction vectors of the plurality of items by the target user based on the second attention weights of the plurality of items to obtain a first sub-vector of the target user.
In one possible embodiment, obtaining the second sub-vector of the target user based on the project vectors of the projects and the third evaluation vectors of the projects by the neighbor users of the target user comprises:
fusing the project vector of each project and the third evaluation vector of each neighbor user to each project to obtain a third interaction vector of each neighbor user to each project;
based on the second attention weights of the plurality of items, performing weighted fusion on a plurality of third interactive vectors of each neighbor user for the plurality of items to obtain a third sub-vector of each neighbor user, wherein the third sub-vector is used for indicating the evaluation condition of each neighbor user for the plurality of items;
fusing the user vector of the target user and the third interaction vector to obtain a third attention weight of each neighbor user, wherein the third attention weight is used for indicating the importance of each neighbor user to the target user;
and performing weighted fusion on a plurality of third sub-vectors of the plurality of neighbor users based on the third attention weights of the plurality of neighbor users to obtain a second sub-vector of the target user.
In a second aspect, the present application provides a recommendation model training method, including:
the obtaining module is used for fusing the user vector of each user and the first evaluation vector of each user on the target item to obtain a first interaction vector of each user on the target item;
the obtaining module is further configured to input the item vector of the target item and the first interaction vector into a first neural network for fusion, and obtain a first attention weight of each user, where the first attention weight is used to indicate a contribution of each user to the target item;
the obtaining module is further configured to perform weighted fusion on a plurality of first interaction vectors of the target item, which are obtained by performing weighted fusion on the plurality of first interaction vectors of the target item by the plurality of users, based on first attention weights of the plurality of users, wherein the plurality of users are users who have evaluated the target item, and the first vectors are used for indicating features of the target item;
the obtaining module is further configured to obtain a second vector of the target user based on a project vector of a plurality of projects, a second evaluation vector of the target user for the plurality of projects, and a third evaluation vector of a plurality of neighbor users of the target user for the plurality of projects, where the plurality of neighbor users are friends having an interaction relationship with the target user, the plurality of projects are projects evaluated by the target user, and the second vector is used to indicate a feature of the target user;
the obtaining module is further configured to fuse the first vector and the second vector to obtain a prediction rating of the target user for the target item;
the adjusting module is used for adjusting model parameters of the recommendation model based on the actual rating and the predicted rating of the target user on the target item to obtain a trained recommendation model;
and the generation module is used for generating the recommended item list of the target user based on the trained recommendation model.
In a possible embodiment, the obtaining module is specifically configured to:
obtaining a first sub-vector of a target user based on a project vector of a plurality of projects and a second evaluation vector of the target user on the plurality of projects, wherein the first sub-vector is used for indicating evaluation conditions of the target user on the plurality of projects;
obtaining a second sub-vector of the target user based on the project vectors of a plurality of projects and third evaluation vectors of the target user for the projects, wherein the second sub-vector is used for indicating evaluation conditions of the projects by the neighbor users;
and fusing the first sub-vector and the second sub-vector to obtain a second vector of the target user.
In a possible embodiment, the obtaining module is specifically configured to:
fusing the project vector of each project and the second evaluation vector of each project of the target user to obtain a second interaction vector of each project of the target user;
inputting the user vector of the target user and the second interaction vector into a second neural network for fusion to obtain a second attention weight of each item, wherein the second attention weight is used for indicating the contribution of the target user to each item;
and performing weighted fusion on a plurality of second interaction vectors of the plurality of items by the target user based on the second attention weights of the plurality of items to obtain a first sub-vector of the target user.
In a possible embodiment, the obtaining module is specifically configured to:
fusing the project vector of each project and the third evaluation vector of each neighbor user to each project to obtain a third interaction vector of each neighbor user to each project;
based on the second attention weights of the plurality of items, performing weighted fusion on a plurality of third interactive vectors of each neighbor user for the plurality of items to obtain a third sub-vector of each neighbor user, wherein the third sub-vector is used for indicating the evaluation condition of each neighbor user for the plurality of items;
fusing the user vector of the target user and the third interaction vector to obtain a third attention weight of each neighbor user, wherein the third attention weight is used for indicating the importance of each neighbor user to the target user;
and performing weighted fusion on a plurality of third sub-vectors of the plurality of neighbor users based on the third attention weights of the plurality of neighbor users to obtain a second sub-vector of the target user.
In a third aspect, the present application provides an electronic device, comprising:
a memory for storing program instructions;
a processor for calling the program instructions stored in the memory and executing the method of any of the first aspect according to the obtained program instructions.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of any of the first aspects.
In a fifth aspect, the present application provides a computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method of any of the first aspects.
In the embodiment of the application, an attention weight is distributed to the evaluation of each user on the target item through an attention mechanism, and based on the first attention weights of a plurality of users, the first interaction vectors of the plurality of users on the target item are subjected to weighted fusion to obtain the first vectors of the target item, so that the characteristics of the target item which are more in line with the reality are mined. The second vector of the target user is obtained based on the project vectors of the projects, the second evaluation vectors of the target user for the projects and the third evaluation vectors of the neighbor users of the target user for the projects, the evaluations of the neighbor users are combined, so that more features of the target user are mined, the first vector and the second vector are finally fused, the obtained prediction rating is closer to the actual rating, and the accuracy of the recommendation result of the trained recommendation model is higher. Compared with a general self-attention model, the attention mechanism is realized through the neural network, the operation speed is higher, a plurality of attention weights can be obtained quickly, the training efficiency of the whole recommendation model is further improved, and the recommendation efficiency of the recommendation model can also be improved.
Drawings
Fig. 1 is a schematic view of an application scenario of a recommendation model training method provided in an embodiment of the present application;
FIG. 2 is a diagram illustrating graphical data in social recommendations provided by an embodiment of the present application;
fig. 3 is a schematic structural diagram of a recommendation model provided in an embodiment of the present application;
FIG. 4 is a flowchart of a recommendation model training method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a project module according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a user module according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a first obtaining module according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of a second obtaining module according to an embodiment of the present disclosure;
fig. 9 is a block diagram of a recommended model training apparatus according to an embodiment of the present application;
fig. 10 is a block diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be described clearly and completely in the following with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. In the present application, the embodiments and features of the embodiments may be arbitrarily combined with each other without conflict. Also, while a logical order is shown in the flow diagrams, in some cases, the steps shown or described may be performed in an order different than here.
The terms "first" and "second" in the description and claims of the present application and the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the term "comprises" and any variations thereof, which are intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus.
In the embodiments of the present application, "a plurality" may mean at least two, for example, two, three, or more, and the embodiments of the present application are not limited.
In order to improve the accuracy of information recommendation, embodiments of the present application provide a recommendation model training method, which may be executed by a recommendation model training device. For simplicity of description, the recommendation model training apparatus will be simply referred to as a training apparatus hereinafter. The training device can be implemented by a terminal such as a personal computer, a mobile phone, or an embedded device such as a camera, or a server such as a physical service or a virtual server.
An application scenario diagram of the recommended model training method is described below. Fig. 1 is a schematic view of an application scenario of a recommendation model training method according to an embodiment of the present application. The application scenario diagram includes sample data 110 and a training device 120.
After the training device 120 obtains the sample data 110, the recommendation model is trained according to the sample data 110 to obtain a trained recommendation model, and the trained recommendation model is used for generating a recommended item list for a user. The process of how to train the recommendation model is described below.
Referring to fig. 2, a graphical data diagram in social recommendation provided in an embodiment of the present application is illustrated, where the graphical data includes a user-item graph 201 and a user-user graph 202, the user-item graph 201 includes evaluations of different items by a user, an evaluation of an item 1 by the user is 3 stars, an evaluation of an item 2 by the user is 4 stars, and an evaluation of an item 3 by the user is 5 stars. The user-user graph 202, which may also be referred to as a social relationship graph, includes connections of users with different neighbor users.
Since the graphical data in a social recommendation includes a user-item graph and a user-user graph, the recommendation model needs to extract relevant information from the two graphs, respectively. The following explains an example of a structure of a recommendation model, and please refer to fig. 3, which is a schematic structural diagram of a recommendation model provided in an embodiment of the present application. The recommendation model in the embodiment of the present application includes an item module 301, a user module 302, and a rating prediction module 303, where the item module 301 is used to extract item features, i.e. potential influencing factors of an item. The user module 302 is used to extract user features, i.e., user space potential influencing factors. The rating prediction module 303 is configured to fuse the item features output by the item module 301 and the user features output by the user module 302 to obtain a rating prediction result.
Based on the foregoing discussion of fig. 1-3, the following description will take the training apparatus of fig. 1 as an example to perform the recommendation model training method. Fig. 4 is a schematic flowchart illustrating a recommended model training method according to an embodiment of the present application.
S401, fusing the user vector of each user and the first evaluation vector of each user to the target item to obtain a first interaction vector of each user to the target item.
The training device may perform a vector representation of each user, referred to as a user vector, e.g. user utIs Pt. And vector representation of each item, called item vector, e.g. item vjHas an item vector of qj. After a user purchases an item or receives a service for an item, the item is typically evaluated, and the training device may vector the user's evaluation of the item, referred to as an evaluation vector. For example, in a five-star rating system, the star rating is recorded as r, r e {1,2,3,4,5} and the evaluation vector is er。
Specifically, the training device may splice the user vector of each user and the first evaluation vector of each user for the target item, input the spliced user vector into a Multi-layer Perceptron (MLP), and output the first interaction vector of each user for the target item.
For example:
wherein p istRepresenting user utUser vector of erRepresenting user utFor target item vjIs determined by the first evaluation vector of (1),representing vector stitching, fjtRepresenting user utFor target item vjFirst interaction vector of gu() Representing the processing of the MLP model.
S402, inputting the item vector of the target item and the first interaction vector into a first neural network for fusion, and obtaining a first attention weight of each user.
Specifically, the training device may input the item vector of the target item and the first interaction vector of each user for the target item into the first neural network for fusion, output the attention score of each user, and normalize the attention score of each user to obtain the first attention weight of each user. The first attention weight is used for indicating the contribution of each user to the target item, and can also be understood as the influence weight of the evaluation of each user on the target item on the item module.
For example, the first neural network is a two-layer neural network, which may also be referred to as a first attention network, defined as:
wherein q isjRepresenting a target item vjThe term vector of fjtRepresenting user utFor target item vjFirst interaction vector of, W1And W2Representing the weights of the first and second layers, respectively, b1And b2Denotes the deviation of the first and second layers, respectively, and σ denotes the nonlinear activation function.
The normalization formula is as follows:
wherein,representing user utFor target item vjB (j) represents the evaluated target item vjSet of users of, mujtRepresenting users u in the user set B (j)tFor target item vjThe first attention weight of (1).
S403, based on the first attention weights of the multiple users, performing weighted fusion on the multiple first interaction vectors of the target item by the multiple users to obtain a first vector of the target item.
After the training device obtains the first attention weight of each user, the multiple first interaction vectors of the target item of the multiple users may be weighted and fused based on the first attention weights of the multiple users, and the weighted and fused vectors are used as the first vectors of the target item. Wherein the plurality of users are users who have evaluated the target item, and the first vector is used for indicating characteristics of the target item.
For example, the weighted fusion formula is as follows:
wherein, mujtRepresenting user utFor target item vjFirst attention weight of fjtRepresenting user utFor target item vjTo (1) aAn interaction vector, B (j) representing the evaluated target item vjSet of users of zjRepresenting a target item vjThe first vector of (2).
Or, the training device may input the first attention weights of the multiple users and the multiple first interaction vectors of the multiple users to the neural network for weighted fusion to obtain the first vector of the target item.
For example, the formula for a neural network is as follows:
where σ denotes the nonlinear activation function, W and b denote the weight and deviation of the neural network, respectively, and μjt、fjt,zjPlease refer to the above discussion, and the description thereof is omitted here.
In consideration of different contributions of different users to the same target project, an attention mechanism is introduced in the embodiment of the application, a first attention weight is allocated to each user for evaluating the target project, and the first attention weight can capture heterogeneous influences from a user-project graph to represent different contributions of different users to the target project. And the attention mechanism is realized through the neural network, so that the operation efficiency can be improved, and a plurality of first attention weights of a plurality of users to the target item can be quickly obtained.
Please refer to fig. 5, which is a schematic structural diagram of a project module provided in an embodiment of the present application, the project module includes three first fusion modules 501, a first attention network 502 and a second fusion module 503, and fig. 5 illustrates three first fusion modules 501 as an example, where the number of the first fusion modules 501 is actually the same as the number of users who have evaluated a target project. Dashed arrows represent the input and output of the first attention network 502.
The first fusion module 501 is configured to fuse a user vector of a certain user and a first evaluation vector of the user for a target item, so as to obtain a first interaction vector of the user for the target item. For example, the user vector p of the first user1And a first evaluation vector e of the first user to the target item1Inputting one of the first fusion modules 501 to obtain a first interaction vector f of the first user to the target item1By analogy, the other two first fusion modules 501 respectively output the first interaction vector f of the second user to the target item2The first interaction vector f of the third user to the target item3。
The first attention network 502, i.e. the first neural network, is used for fusing the item vector of the target item and the first interaction vector of each user on the target item to obtain a first attention weight of each user, for example, the first attention weights of three users are μ1、μ2、μ3. The second fusion module 503 is configured to perform weighted fusion on the first attention weights of the three users and the three first interaction vectors of the target item from the three users to obtain a first vector of the target item.
S404, obtaining a second vector of the target user based on the project vectors of the projects, the second evaluation vectors of the target user to the projects and the third evaluation vectors of the neighbor users to the projects.
The recommendation model may obtain the second vector of the target user in combination with the evaluation conditions of the target user on the plurality of items and the evaluation conditions of the plurality of neighbor users on the plurality of items. The neighbor users are friends having an interactive relationship with the target user, and the neighbor users are users who pay attention to the target user, users who send messages to the target user, or users who transfer money to the target user. The plurality of items are items that have been evaluated by the target user, and the second vector is used to indicate characteristics of the target user, i.e., spatial latency of the target user.
Specifically, the training device may obtain a first sub-vector of the target user based on the project vectors of the plurality of projects and the second evaluation vectors of the target user for the plurality of projects, where the first sub-vector is used to indicate evaluation conditions of the target user for the plurality of projects, that is, the project space influence factors of the target user, and may be understood as influences of the project factors on the target user. And obtaining a second sub-vector of the target user based on the project vectors of the projects and the third evaluation vectors of the neighbor users to the projects, wherein the second sub-vector is used for indicating the evaluation conditions of the neighbor users to the projects, namely the social influence factors of the target user, and can be understood as the influence of the social influence factors on the target user. And then the first sub-vector and the second sub-vector are fused to obtain a second vector of the target user, namely the space potential influence factor of the target user.
In one possible embodiment, the step of the training device obtaining the first subvector of the target user is as follows:
s1.1, fusing the item vector of each item and the second evaluation vector of each item of the target user to obtain a second interaction vector of each item of the target user.
Specifically, the training device may splice the project vector of each project and the second evaluation vector of each project by the target user, and input the spliced vectors into the MLP model to obtain the second interaction vector of each project by the target user.
For example:
wherein q isaRepresenting item vaItem vector of erRepresenting a target user uiFor item vaIs determined by the second evaluation vector of (1),representing vector stitching, xiaRepresenting user uiFor item vaSecond interaction vector gv() Representing the output of the MLP model.
And S1.2, inputting the user vector of the target user and the second interaction vector into a second neural network for fusion, and outputting a second attention weight of each item.
Specifically, the training device inputs a user vector of the target user and a plurality of second interaction vectors of the target user for each project into the first neural network for fusion, outputs an attention score of each project, normalizes the attention score of each project, and obtains a second attention weight of each project, wherein the second attention weight is used for indicating the contribution of the target user to each project.
For example, the second neural network is a two-layer neural network defined as:
wherein p isiRepresenting a target user uiUser vector of xiaRepresenting a target user uiFor item vaOf the second interaction vector of (a) is,representing vector stitching, W1And W2Representing the weights of the first and second layers, respectively, b1And b2Respectively, the deviation of the second layer, and σ represents the nonlinear activation function.
The normalization formula is as follows:
wherein,representing a target user uiFor item vaC (j) represents the target user uiEvaluation of the number of items, αiaRepresenting a target user uiFor item vaThe second attention weight of (1).
In consideration of different contributions of the target user to different projects, an attention mechanism is introduced in the embodiment of the application, and a second attention weight is allocated to the evaluation of each project by the target user so as to embody different contributions of the target user to different projects. And the attention mechanism is realized through the neural network, so that the operation efficiency can be improved, and a plurality of second attention weights of the target user to a plurality of items can be quickly obtained.
S1.3, based on the second attention weights of the multiple projects, carrying out weighted fusion on the multiple second interactive vectors of the multiple projects by the target user to obtain a first sub-vector of the target user.
Specifically, the training device may input the second attention weights of the plurality of items and the plurality of second interaction vectors of the plurality of items to the neural network for weighted fusion by the target user, so as to obtain the first sub-vector of the target user.
For example, the formula for a neural network is:
wherein alpha isiaRepresenting a target user uiFor item vaSecond attention weight of (1), xiaRepresenting a target user uiFor item vaOf the second interaction vector of (a) is,representing a target user uiσ is a non-linear activation function, and W and b represent weight and bias, respectively.
In one possible embodiment, the step of the training device obtaining the second subvector for the target user is as follows:
and S2.1, fusing the item vector of each item and the third evaluation vector of each neighbor user to each item to obtain a third interaction vector of each neighbor user to each item.
Specifically, the training device may splice the project vector of each project and the third evaluation vector of each neighbor user for each project, and input the spliced vectors into the MLP model to obtain the third interaction vector of each neighbor user for each project. For a process of specifically how to obtain the third interaction vector, please refer to the process of obtaining the second interaction vector discussed above, which is not described herein again.
S2.2, based on the second attention weights of the multiple items, carrying out weighted fusion on the multiple third interactive vectors of the multiple items by each neighbor user to obtain a third sub-vector of each neighbor user.
Specifically, the training device may input the second attention weights of the multiple items and the multiple third interaction vectors of the multiple items to the neural network for weighted fusion by each neighboring user, so as to obtain a third subvector of each neighboring user. The third sub-vector is used to indicate the evaluation of each neighboring user for multiple items. For a process of specifically obtaining the third sub-vector, refer to the process of obtaining the first sub-vector of the target user discussed above, and are not described herein again.
And S2.3, fusing the user vector of the target user and the third interactive vector to obtain a third attention weight of each neighbor user.
The third attention weight is used to indicate the importance of each neighbor user to the target user. There are various ways to obtain the third attention weight, which are described separately below.
The first way, the third attention weight is obtained through the self-attention model.
The training device may input the user vector of the target user and the third interaction vector of each neighbor user for each item into the self-attention model for fusion, output the attention score of each neighbor user, normalize the attention score of each neighbor user, and obtain the third attention weight of each neighbor user.
The self-attention model is based on a scaled dot product, and comprises three inputs of a query, a key and a value. For example, the formula for the self-attention model is as follows:
wherein,representing neighbor user uoOf the third sub-vector piRepresenting a target user uiThe vector of the user of (a) is,representing vector concatenation, ReLU linear rectification function, WqiAnd WkiWeight matrices, S, representing queries and keys, respectivelyiRepresents WqiAnd WkiSoftmax, denotes a normalization function,representing neighbor user uoD is a user vector piEmbedded length of betaioRepresenting neighbor user uoN (i) represents the target user uiIs selected.
And the second mode is that the attention mechanism is realized through a neural network.
The training device may input the user vector of the target user and the third interaction vector of each neighbor user for each item into a third neural network for fusion, output the attention score of each neighbor user, normalize the attention score of each neighbor user, and obtain the third attention weight of each neighbor user. For the process of obtaining the third attention weight through the third neural network, please refer to the content of obtaining the first attention weight or the second attention weight discussed above, and will not be described herein again.
In consideration of different importance of different neighbor users to the target user, an attention mechanism is introduced in the embodiment of the application, and a third attention weight is allocated to each neighbor user of the target user to embody the importance of different neighbor users to the target user. And the attention mechanism is realized through the neural network, so that the operation efficiency can be improved, and a plurality of third attention weights of a plurality of neighbor users to the target user can be quickly obtained.
And S2.4, performing weighted fusion on a plurality of third sub-vectors of a plurality of neighbor users based on third attention weights of the plurality of neighbor users to obtain a second sub-vector of the target user.
Specifically, the training device may input the third attention weights of the multiple neighboring users and the multiple third sub-vectors of the multiple neighboring users into the neural network for weighted fusion, so as to obtain the second sub-vector of the target user.
For example, the formula for a neural network is as follows:
wherein, betaioRepresenting a target user uiOf neighbor user uoThe third attention weight of (a) is,representing neighbor user uoN (i) represents the target user uiσ is a nonlinear activation function, W and b represent weight and deviation, respectively,representing a target user uiThe second sub-vector of (2).
In one possible embodiment, the training device may input the first subvector and the second subvector into the MLP model and output a second vector for the target user.
For example:
c2=σ(W2·c1+b2)
……
hi=σ(Wl·cl-1+bl)
wherein,representing a target user uiIs determined by the first sub-vector of (1),representing a target user uiOf the second sub-vector of (a),representing vector concatenation, l is the index of the hidden layer, cl-1Represents the output of the l-1 hidden layer, WlAnd blRespectively representing the weight and the deviation of the hidden layer of the l layer, sigma is a nonlinear activation function, hiRepresenting a target user uiThe second vector of (2).
Referring to fig. 6, a schematic structural diagram of a user module provided in the embodiment of the present application is shown, where the user module includes a first obtaining module 601, a second obtaining module 602, and a fusing module 603. The first obtaining module 601 is configured to learn and obtain a first sub-vector of a target user from a user-project diagram. The second obtaining module 602 is configured to learn to obtain a second sub-vector of the target user from the social relationship diagram. The fusion module 603 is configured to fuse the first sub-vector and the second sub-vector to obtain a second vector of the target user. For the meaning of the first sub-vector, the second sub-vector and the second vector, please refer to the content discussed above, and the detailed description is omitted here.
Referring to fig. 7, a schematic structural diagram of a first obtaining module according to an embodiment of the present disclosure is shown, where the first obtaining module includes three fourth fusion modules 701, a second attention network 702, and a fifth fusion module 703, and fig. 7 illustrates three fourth fusion modules 701 as an example, and actually the number of the fourth fusion modules 701 is the same as the number of items evaluated by a target user. Dashed arrows represent the input and output of the second attention network 702.
The fourth fusion module 701 is configured to fuse the project vector of each project and the second evaluation vector of each project of the target user, so as to obtain a second interaction vector of each project of the target user. For example, the item vector q of the first item1And a second evaluation vector e of the target user for the first item1Inputting one of the fourth fusion modules 701 to obtain a second interaction vector x of the target user to the first item1By analogy, the other two fourth fusion modules 701 respectively output a second interaction vector x of the target user to the second item2Second interaction vector x of target user to third item3。
The second attention network 702 is a second neural network, and is used for fusing the user vector of the target user and the second interaction vector of each item by the target user and outputting a second attention weight of each item, for example, the second attention weights of three items are respectively α1、α2、α3. The fifth fusion module 703 is configured to perform weighted fusion on the second attention weights of the three items and the three second interaction vectors of the three items by the target user, so as to obtain a first sub-vector of the target user.
Referring to fig. 8, a schematic structural diagram of a second obtaining module provided in the embodiment of the present application is shown, where the second obtaining module includes three sixth fusion modules 801, a third attention network 802, and a seventh fusion module 803. Fig. 8 illustrates three sixth fusion modules 801, and the number of the sixth fusion modules 801 is actually the same as the number of the neighbor users of the target user. Dashed arrows represent the input and output of the third attention network 802.
The three sixth fusion modules 801 are respectively configured to obtain third sub-vectors of three neighboring users, and the meaning and obtaining process of the third sub-vectors refer to the contents discussed above, which are not described herein again. The third attention network 802 is alsoA third neural network, configured to fuse the user vector of the target user and the third interaction vector of each item for each neighboring user, and output a third attention weight of each neighboring user, where the third attention weights of three neighboring users are β, respectively1、β2、β3. The seventh fusion module 803 is configured to perform weighted fusion on the third attention weights of the three neighboring users and the three third sub-vectors of the three neighboring users to obtain a second sub-vector of the target user.
S405, fusing the first vector and the second vector to obtain the prediction rating of the target user on the target item.
Specifically, the training device may input the first vector and the second vector into the MLP model, and output a prediction rating of the target user for the target item.
For example:
g2=σ(W2·g1+b2)
……
gl-1=σ(Wl·gl-1+bl)
r′ij=wT·gl-1
wherein z isjRepresents a first vector, hiA second vector is represented that represents the second vector,indicating that two vectors are spliced, l is the index of the hidden layer, gl-1Represents the output of the l-1 hidden layer, WlAnd blRespectively representing the weight and the deviation of a l-layer hidden layer, wherein sigma is a nonlinear activation function, r'ijRepresenting a target user uiFor target item vjThe prediction rating of (a).
S406, based on the actual rating and the predicted rating of the target user to the target item, adjusting model parameters of the recommendation model, and obtaining the trained recommendation model.
Specifically, the training device may define a loss function according to the actual rating and the predicted rating, and update the model parameters of the recommendation model according to the negative gradient direction of the recommendation model by continuously optimizing the loss function until the loss function reaches the minimum value, which may be regarded as convergence of the recommendation model, and obtain the trained recommendation model.
For example, the formula for the loss function is as follows:
wherein, | O | is rating number, r'ijRepresenting a target user uiFor target item vjPrediction rating of rijRepresenting a target user uiFor target item vjLoss represents a Loss value.
In one possible embodiment, to alleviate the over-fitting problem in the neural network, the training device may apply Dropout to the recommendation model during the training process, randomly discard some neurons of the recommendation model during the training process, and update only part of the parameters when updating the parameters of the recommendation model.
And S407, generating a recommended item list of the target user based on the trained recommendation model.
After the training device obtains the trained recommendation model, a recommendation item list of the target user can be generated based on the trained recommendation model, the recommendation item list comprises a plurality of items which are arranged according to the high-low sequence of the prediction rating, and the items are more interested by the target user when the prediction rating is higher.
It should be noted that even if the training device employs Dropout in training the recommendation model, the training device does not discard the neurons of the recommendation model during the test, and the entire recommendation model is used to generate the list of recommended items for the target user, since Dropout is disabled during the test.
For example, a user purchases some financial products or financial products at a bank, and the recommendation model generates a recommended product list of the user according to a historical purchase record of the user and a social relationship of the user, wherein the historical purchase record comprises the products purchased by the user and ratings of the products, and the social relationship comprises a neighbor user of the user and the historical purchase records of the neighbor users.
Based on the same inventive concept, an embodiment of the present application provides a recommendation model training apparatus, which is disposed in the training device discussed above, please refer to fig. 9, and the apparatus includes:
an obtaining module 901, configured to fuse a user vector of each user and a first evaluation vector of each user for a target item, and obtain a first interaction vector of each user for the target item;
an obtaining module 901, configured to input the item vector of the target item and the first interaction vector into a first neural network for fusion, and obtain a first attention weight of each user, where the first attention weight is used to indicate a contribution of each user to the target item;
the obtaining module 901 is further configured to perform weighted fusion on multiple first interaction vectors of the target item, which are obtained by multiple users, of the target item based on first attention weights of the multiple users, to obtain a first vector of the target item, where the multiple users are users who have evaluated the target item, and the first vector is used to indicate features of the target item;
the obtaining module 901 is further configured to obtain a second vector of the target user based on the project vectors of the multiple projects, the second evaluation vectors of the target user for the multiple projects, and the third evaluation vectors of the multiple neighbor users of the target user for the multiple projects, where the multiple neighbor users are friends having an interactive relationship with the target user, the multiple projects are projects evaluated by the target user, and the second vector is used to indicate characteristics of the target user;
the obtaining module 901 is further configured to fuse the first vector and the second vector, and obtain a prediction rating of the target user on the target item;
an adjusting module 902, configured to adjust model parameters of a recommendation model based on actual rating and predicted rating of a target user on a target item, to obtain a trained recommendation model;
a generating module 903, configured to generate a recommended item list of the target user based on the trained recommendation model.
In a possible embodiment, the obtaining module 901 is specifically configured to:
obtaining a first sub-vector of the target user based on the project vectors of the projects and second evaluation vectors of the target user for the projects, wherein the first sub-vector is used for indicating the evaluation conditions of the target user for the projects;
obtaining a second sub-vector of the target user based on the project vectors of the projects and third evaluation vectors of the neighbor users of the target user for the projects, wherein the second sub-vector is used for indicating evaluation conditions of the neighbor users for the projects;
and fusing the first sub-vector and the second sub-vector to obtain a second vector of the target user.
In a possible embodiment, the obtaining module 901 is specifically configured to:
fusing the project vector of each project and the second evaluation vector of each project of the target user to obtain a second interaction vector of each project of the target user;
inputting the user vector of the target user and the second interaction vector into a second neural network for fusion to obtain a second attention weight of each item, wherein the second attention weight is used for indicating the contribution of the target user to each item;
and based on the second attention weights of the plurality of items, carrying out weighted fusion on the plurality of second interaction vectors of the plurality of items by the target user to obtain a first sub-vector of the target user.
In a possible embodiment, the obtaining module 901 is specifically configured to:
fusing the project vector of each project and the third evaluation vector of each neighbor user to each project to obtain a third interaction vector of each neighbor user to each project;
based on the second attention weights of the multiple projects, carrying out weighted fusion on multiple third interactive vectors of the multiple projects of each neighbor user to obtain a third sub-vector of each neighbor user, wherein the third sub-vector is used for indicating the evaluation condition of each neighbor user on the multiple projects;
fusing the user vector of the target user and the third interaction vector to obtain a third attention weight of each neighbor user, wherein the third attention weight is used for indicating the importance of each neighbor user to the target user;
and performing weighted fusion on a plurality of third sub-vectors of a plurality of neighbor users based on the third attention weights of the plurality of neighbor users to obtain a second sub-vector of the target user.
As an embodiment, the apparatus discussed in fig. 9 may implement any of the recommendation model training methods discussed above, and will not be described herein again.
Based on the same inventive concept, the embodiment of the present application provides an electronic device, which can implement the functions of the training device discussed above, and referring to fig. 10, the device includes a processor 1001 and a memory 1002.
A memory 1002 for storing program instructions;
the processor 1001 is configured to call the program instructions stored in the memory 1002, and execute the steps included in any of the recommendation model training methods discussed above according to the obtained program instructions. Because the principle of solving the problems of the electronic equipment is similar to that of the recommended model training method, the implementation of the electronic equipment can refer to the implementation of the method, and repeated parts are not described again.
The processor 1001 may be a Central Processing Unit (CPU), or one or more combinations of a digital processing unit, an image processor, and the like. The memory 1002 may be a volatile memory (volatile memory), such as a random-access memory (RAM); the memory 1002 may also be a non-volatile memory (non-volatile memory) such as, but not limited to, a read-only memory (rom), a flash memory (flash memory), a Hard Disk Drive (HDD) or a solid-state drive (SSD), or the memory 1002 may be any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer. The memory 1002 may be a combination of the above.
As an example, the processor 1001 in fig. 10 may implement any one of the recommendation model training methods discussed above, and the processor 1001 may also implement the functions of the recommendation model training apparatus discussed above in fig. 9.
Based on the same inventive concept, embodiments of the present application provide a computer-readable storage medium storing a computer program, the computer program comprising program instructions that, when executed by a computer, cause the computer to perform any of the recommendation model training methods as discussed above. Because the principle of solving the problem by the computer-readable storage medium is similar to that of the recommended model training method, the implementation of the computer-readable storage medium can refer to the implementation of the method, and repeated details are not repeated.
Based on the same inventive concept, the embodiment of the present application further provides a computer program product, where the computer program product includes: computer program code which, when run on a computer, causes the computer to perform any of the recommendation model training methods as discussed above. Because the principle of solving the problem of the computer program product is similar to that of the recommended model training method, the implementation of the computer program product can be referred to the implementation of the method, and repeated details are not repeated.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
Claims (11)
1. A method for training a recommendation model, comprising:
fusing a user vector of each user and a first evaluation vector of each user for a target item to obtain a first interaction vector of each user for the target item;
inputting the item vector of the target item and the first interaction vector into a first neural network for fusion to obtain a first attention weight of each user, wherein the first attention weight is used for indicating the contribution of each user to the target item;
performing weighted fusion on a plurality of first interaction vectors of the target project, which are obtained by the users, based on first attention weights of the users, to obtain a first vector of the target project, wherein the users are users who have evaluated the target project, and the first vector is used for indicating characteristics of the target project;
obtaining a second vector of a target user based on a project vector of a plurality of projects, a second evaluation vector of the target user for the plurality of projects, and a third evaluation vector of a plurality of neighbor users for the plurality of projects, wherein the plurality of neighbor users are friends having an interactive relationship with the target user, the plurality of projects are projects evaluated by the target user, and the second vector is used for indicating characteristics of the target user;
fusing the first vector and the second vector to obtain the prediction rating of the target user on the target item;
adjusting model parameters of the recommendation model based on the actual rating and the predicted rating of the target user on the target item to obtain a trained recommendation model;
and generating a recommended item list of the target user based on the trained recommendation model.
2. The method of claim 1, wherein obtaining the second vector of the target user based on a project vector of a plurality of projects, a second rating vector of the plurality of projects by a target user, and a third rating vector of the plurality of projects by a plurality of neighboring users of the target user comprises:
obtaining a first sub-vector of a target user based on a project vector of a plurality of projects and a second evaluation vector of the target user on the plurality of projects, wherein the first sub-vector is used for indicating evaluation conditions of the target user on the plurality of projects;
obtaining a second sub-vector of the target user based on the project vectors of a plurality of projects and third evaluation vectors of the target user for the projects, wherein the second sub-vector is used for indicating evaluation conditions of the projects by the neighbor users;
and fusing the first sub-vector and the second sub-vector to obtain a second vector of the target user.
3. The method of claim 2, wherein obtaining a first sub-vector of a target user based on a project vector of a plurality of projects, a second evaluation vector of the plurality of projects by the target user comprises:
fusing the project vector of each project and the second evaluation vector of each project of the target user to obtain a second interaction vector of each project of the target user;
inputting the user vector of the target user and the second interaction vector into a second neural network for fusion to obtain a second attention weight of each item, wherein the second attention weight is used for indicating the contribution of the target user to each item;
and performing weighted fusion on a plurality of second interaction vectors of the plurality of items by the target user based on the second attention weights of the plurality of items to obtain a first sub-vector of the target user.
4. The method of claim 3, wherein obtaining the second subvector for the target user based on a project vector for a plurality of projects, a third evaluation vector for the plurality of projects by a plurality of neighboring users of the target user comprises:
fusing the project vector of each project and the third evaluation vector of each neighbor user to each project to obtain a third interaction vector of each neighbor user to each project;
based on the second attention weights of the plurality of items, performing weighted fusion on a plurality of third interactive vectors of each neighbor user for the plurality of items to obtain a third sub-vector of each neighbor user, wherein the third sub-vector is used for indicating the evaluation condition of each neighbor user for the plurality of items;
fusing the user vector of the target user and the third interaction vector to obtain a third attention weight of each neighbor user, wherein the third attention weight is used for indicating the importance of each neighbor user to the target user;
and performing weighted fusion on a plurality of third sub-vectors of the plurality of neighbor users based on the third attention weights of the plurality of neighbor users to obtain a second sub-vector of the target user.
5. A recommendation model training apparatus, comprising:
the obtaining module is used for fusing the user vector of each user and the first evaluation vector of each user on the target item to obtain a first interaction vector of each user on the target item;
the obtaining module is configured to input the item vector of the target item and the first interaction vector into a first neural network for fusion, and obtain a first attention weight of each user, where the first attention weight is used to indicate a contribution of each user to the target item;
the obtaining module is further configured to perform weighted fusion on a plurality of first interaction vectors of the target item, which are obtained by performing weighted fusion on the plurality of first interaction vectors of the target item by the plurality of users, based on first attention weights of the plurality of users, wherein the plurality of users are users who have evaluated the target item, and the first vectors are used for indicating features of the target item;
the obtaining module is further configured to obtain a second vector of the target user based on a project vector of a plurality of projects, a second evaluation vector of the target user for the plurality of projects, and a third evaluation vector of a plurality of neighbor users for the plurality of projects, where the plurality of neighbor users are friends having an interactive relationship with the target user, the plurality of projects are projects evaluated by the target user, and the second vector is used to indicate a feature of the target user;
the obtaining module is further configured to fuse the first vector and the second vector to obtain a prediction rating of the target user for the target item;
the adjusting module is used for adjusting model parameters of the recommendation model based on the actual rating and the predicted rating of the target user on the target item to obtain a trained recommendation model;
and the generation module is used for generating the recommended item list of the target user based on the trained recommendation model.
6. The apparatus of claim 5, wherein the obtaining module is specifically configured to:
obtaining a first sub-vector of a target user based on a project vector of a plurality of projects and a second evaluation vector of the target user on the plurality of projects, wherein the first sub-vector is used for indicating evaluation conditions of the target user on the plurality of projects;
obtaining a second sub-vector of the target user based on the project vectors of a plurality of projects and third evaluation vectors of the target user for the projects, wherein the second sub-vector is used for indicating evaluation conditions of the projects by the neighbor users;
and fusing the first sub-vector and the second sub-vector to obtain a second vector of the target user.
7. The apparatus of claim 6, wherein the obtaining module is specifically configured to:
fusing the project vector of each project and the second evaluation vector of each project of the target user to obtain a second interaction vector of each project of the target user;
inputting the user vector of the target user and the second interaction vector into a second neural network for fusion to obtain a second attention weight of each item, wherein the second attention weight is used for indicating the contribution of the target user to each item;
and performing weighted fusion on a plurality of second interaction vectors of the plurality of items by the target user based on the second attention weights of the plurality of items to obtain a first sub-vector of the target user.
8. The apparatus of claim 7, wherein the obtaining module is specifically configured to:
fusing the project vector of each project and the third evaluation vector of each neighbor user to each project to obtain a third interaction vector of each neighbor user to each project;
based on the second attention weights of the plurality of items, performing weighted fusion on a plurality of third interactive vectors of each neighbor user for the plurality of items to obtain a third sub-vector of each neighbor user, wherein the third sub-vector is used for indicating the evaluation condition of each neighbor user for the plurality of items;
fusing the user vector of the target user and the third interaction vector to obtain a third attention weight of each neighbor user, wherein the third attention weight is used for indicating the importance of each neighbor user to the target user;
and performing weighted fusion on a plurality of third sub-vectors of the plurality of neighbor users based on the third attention weights of the plurality of neighbor users to obtain a second sub-vector of the target user.
9. An electronic device, comprising:
a memory for storing program instructions;
a processor for calling program instructions stored in said memory and for executing the method of any one of claims 1 to 4 in accordance with the obtained program instructions.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program comprising program instructions that, when executed by a computer, cause the computer to perform the method according to any one of claims 1-4.
11. A computer program product, the computer program product comprising: computer program code which, when run on a computer, causes the computer to perform the method according to any of the preceding claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111437512.0A CN114048826B (en) | 2021-11-30 | 2021-11-30 | Recommendation model training method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111437512.0A CN114048826B (en) | 2021-11-30 | 2021-11-30 | Recommendation model training method, device, equipment and medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114048826A true CN114048826A (en) | 2022-02-15 |
CN114048826B CN114048826B (en) | 2024-04-30 |
Family
ID=80211726
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111437512.0A Active CN114048826B (en) | 2021-11-30 | 2021-11-30 | Recommendation model training method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114048826B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110059262A (en) * | 2019-04-19 | 2019-07-26 | 武汉大学 | A kind of construction method and device, item recommendation method of the project recommendation model based on hybrid neural networks |
CN110162706A (en) * | 2019-05-22 | 2019-08-23 | 南京邮电大学 | A kind of personalized recommendation method and system based on interaction data cluster |
CN110765353A (en) * | 2019-10-16 | 2020-02-07 | 腾讯科技(深圳)有限公司 | Processing method and device of project recommendation model, computer equipment and storage medium |
CN111241423A (en) * | 2020-01-17 | 2020-06-05 | 江西财经大学 | Deep recommendation method and system integrating trust distrust relation and attention mechanism |
CN113312644A (en) * | 2021-06-15 | 2021-08-27 | 杭州金智塔科技有限公司 | Cross-domain recommendation model training method and system based on privacy protection |
-
2021
- 2021-11-30 CN CN202111437512.0A patent/CN114048826B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110059262A (en) * | 2019-04-19 | 2019-07-26 | 武汉大学 | A kind of construction method and device, item recommendation method of the project recommendation model based on hybrid neural networks |
CN110162706A (en) * | 2019-05-22 | 2019-08-23 | 南京邮电大学 | A kind of personalized recommendation method and system based on interaction data cluster |
CN110765353A (en) * | 2019-10-16 | 2020-02-07 | 腾讯科技(深圳)有限公司 | Processing method and device of project recommendation model, computer equipment and storage medium |
CN111241423A (en) * | 2020-01-17 | 2020-06-05 | 江西财经大学 | Deep recommendation method and system integrating trust distrust relation and attention mechanism |
CN113312644A (en) * | 2021-06-15 | 2021-08-27 | 杭州金智塔科技有限公司 | Cross-domain recommendation model training method and system based on privacy protection |
Also Published As
Publication number | Publication date |
---|---|
CN114048826B (en) | 2024-04-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Cheng et al. | A^ 3NCF: An Adaptive Aspect Attention Model for Rating Prediction. | |
CN108829808B (en) | Page personalized sorting method and device and electronic equipment | |
CN109800885A (en) | It is determined for the rule of black box machine learning model | |
EP4236197A2 (en) | Micro-loan system | |
CN112270547A (en) | Financial risk assessment method and device based on feature construction and electronic equipment | |
KR102410777B1 (en) | An apparatus for improving way of product recommendation and a method thereof | |
CN112163963B (en) | Service recommendation method, device, computer equipment and storage medium | |
CN111461841A (en) | Article recommendation method, device, server and storage medium | |
US20180285969A1 (en) | Predictive model training and selection for consumer evaluation | |
US11893632B2 (en) | Systems and methods for determining financial security risks using self-supervised natural language extraction | |
CN112528110A (en) | Method and device for determining entity service attribute | |
CN110598118A (en) | Resource object recommendation method and device and computer readable medium | |
CN107767152B (en) | Product purchasing tendency analysis method and server | |
CN114547475B (en) | Resource recommendation method, device and system | |
Voican | Credit Card Fraud Detection using Deep Learning Techniques. | |
WO2022198983A1 (en) | Conversation recommendation method and apparatus, electronic device, and storage medium | |
CN113191838A (en) | Shopping recommendation method and system based on heterogeneous graph neural network | |
US20230342787A1 (en) | Optimized hardware product returns for subscription services | |
Vilakone et al. | Movie recommendation system based on users’ personal information and movies rated using the method of k-clique and normalized discounted cumulative gain | |
Le et al. | A multi-criteria collaborative filtering approach using deep learning and Dempster-Shafer theory for hotel recommendations | |
CN114358657A (en) | Post recommendation method and device based on model fusion | |
Ahamed et al. | A recommender system based on deep neural network and matrix factorization for collaborative filtering | |
KR20210144330A (en) | Method and apparatus for recommending item based on collaborative filtering neural network | |
CN115238188A (en) | Object recommendation method and system and object recommendation model system | |
CN114048826B (en) | Recommendation model training method, device, equipment and medium |
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 |