CN114925279A - Recommendation model training method, recommendation method and recommendation device - Google Patents

Recommendation model training method, recommendation method and recommendation device Download PDF

Info

Publication number
CN114925279A
CN114925279A CN202210635074.7A CN202210635074A CN114925279A CN 114925279 A CN114925279 A CN 114925279A CN 202210635074 A CN202210635074 A CN 202210635074A CN 114925279 A CN114925279 A CN 114925279A
Authority
CN
China
Prior art keywords
sample
interaction
users
user
information
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
Application number
CN202210635074.7A
Other languages
Chinese (zh)
Other versions
CN114925279B (en
Inventor
肖林辰
邓佳佶
于飞
许涛
陆鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alipay Hangzhou Information Technology Co Ltd
Original Assignee
Alipay Hangzhou Information Technology Co Ltd
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 Alipay Hangzhou Information Technology Co Ltd filed Critical Alipay Hangzhou Information Technology Co Ltd
Priority to CN202210635074.7A priority Critical patent/CN114925279B/en
Publication of CN114925279A publication Critical patent/CN114925279A/en
Application granted granted Critical
Publication of CN114925279B publication Critical patent/CN114925279B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Landscapes

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

Abstract

The embodiment of the specification provides a recommendation model training method, a recommendation method and a recommendation device, wherein the recommendation model training method comprises the following steps: acquiring a plurality of sample users, a plurality of sample items and interaction information of the sample users and the sample items; screening out multiple interaction sample users and few interaction sample users from a plurality of sample users according to the interaction information; calculating the embedded codes of the multi-interaction sample users and the embedded codes of the sample items by utilizing the interaction information of the multi-interaction sample users and the sample items; determining an embedded code of a user with few interaction samples; setting feature information of nodes of an interactive graph by utilizing embedded codes of multiple interactive sample users, embedded codes of sample items and embedded codes of few interactive sample users, wherein the interactive graph takes the sample users and the sample items as the nodes, and edges are determined according to the interactive information; and training an initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model, so that the model accuracy is improved.

Description

Recommendation model training method, recommendation method and recommendation device
Technical Field
The embodiment of the specification relates to the technical field of computers, in particular to a recommendation model training method. One or more embodiments of the present specification also relate to a recommendation method, a recommendation model training apparatus, a recommendation apparatus, a computing device, and a computer-readable storage medium.
Background
With the development of computer technology, bipartite graph embedding is widely applied in multiple fields such as user recommendation, advertisement, search and the like. The bipartite graph is a graph containing two entities (user-items), to which two nodes of any one edge belong, respectively.
The traditional recommendation system is trained based on historical interactive information of users and items, but the recommendation effect of a recommendation model obtained by training is still not ideal enough, so that an accurate recommendation model training scheme is urgently needed.
Disclosure of Invention
In view of this, the embodiments of the present specification provide a recommendation model training method. One or more embodiments of the present disclosure also relate to a recommendation method, a recommendation model training apparatus, a recommendation apparatus, a computing device, a computer-readable storage medium, and a computer program, so as to solve technical deficiencies in the prior art.
According to a first aspect of embodiments of the present specification, there is provided a recommendation model training method, including:
acquiring a plurality of sample users, a plurality of sample items and interaction information of the sample users and the sample items;
screening out multiple interaction sample users and few interaction sample users from a plurality of sample users according to the interaction information;
calculating the embedded codes of the multi-interaction sample users and the embedded codes of the sample items by utilizing the interaction information of the multi-interaction sample users and the sample items;
determining an embedded code of a user with few interaction samples;
setting feature information of nodes of an interactive graph by utilizing embedded codes of multiple interactive sample users, embedded codes of sample items and embedded codes of few interactive sample users, wherein the interactive graph takes the sample users and the sample items as the nodes, and edges are determined according to the interactive information;
and training an initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model.
According to a second aspect of embodiments herein, there is provided a recommendation method including:
acquiring an object to be recommended, wherein the object to be recommended comprises a user to be recommended or an item to be recommended;
and inputting the object to be recommended into the trained recommendation model to obtain a recommendation result, wherein the recommendation model is obtained by training by using the recommendation model training method provided by the first aspect of the embodiments of the specification.
According to a third aspect of embodiments herein, there is provided a recommendation model training apparatus including:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire a plurality of sample users, a plurality of sample items and interaction information of the sample users and the sample items;
the screening module is configured to screen multiple interaction sample users and few interaction sample users from the plurality of sample users according to the interaction information;
the computing module is configured to utilize the interaction information of the multi-interaction sample user and the sample item to compute the embedded codes of the multi-interaction sample user and the embedded codes of the sample item;
a determination module configured to determine an embedded encoding of a low interaction sample user;
the setting module is configured to set feature information of nodes of the interactive graph by utilizing the embedded codes of the multi-interaction sample users, the embedded codes of the sample items and the embedded codes of the less-interaction sample users, wherein the sample users and the sample items are used as the nodes in the interactive graph, and edges are determined according to the interactive information;
and the training module is configured to train the initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model.
According to a fourth aspect of embodiments herein, there is provided a recommendation apparatus including:
the second acquisition module is configured to acquire the object to be recommended;
and the recommending module is configured to input the object to be recommended into the trained recommending model to obtain a recommending result, wherein the recommending model is obtained by training by using the recommending model training method provided by the first aspect of the embodiment of the specification.
According to a fifth aspect of embodiments herein, there is provided a computing device comprising:
a memory and a processor;
the memory is configured to store computer-executable instructions, and the processor is configured to execute the computer-executable instructions, which when executed by the processor implement the steps of the method provided by the first or second aspect of the embodiments of the present specification.
According to a sixth aspect of embodiments herein, there is provided a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, perform the steps of the method provided by the first or second aspect of embodiments herein.
According to a seventh aspect of embodiments herein, there is provided a computer program, wherein the computer program, when executed on a computer, causes the computer to perform the steps of the method provided by the first or second aspect of the embodiments herein.
According to the recommendation model training method provided by one embodiment of the specification, a plurality of sample users, a plurality of sample items and interaction information of the sample users and the sample items are obtained; screening multiple interaction sample users and few interaction sample users from a plurality of sample users according to the interaction information; calculating the embedded codes of the multi-interaction sample users and the embedded codes of the sample items by utilizing the interaction information of the multi-interaction sample users and the sample items; determining an embedded code of a user with few interaction samples; setting feature information of nodes of an interactive graph by utilizing embedded codes of multiple interactive sample users, embedded codes of sample items and embedded codes of few interactive sample users, wherein the interactive graph takes the sample users and the sample items as the nodes, and edges are determined according to the interactive information; and training an initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model. The method has the advantages that the sample users are divided into multiple interactive sample users and few interactive sample users, the sample users are subjected to targeted processing, interactive information of the multiple interactive sample users and sample items is fully utilized, embedded codes with strong expressiveness are obtained, an interactive graph is further utilized to train an initial recommendation model based on a graph neural network, the initial recommendation model is made to converge quickly, and the recommendation model with high accuracy is generated.
Drawings
FIG. 1 is a schematic diagram of an application scenario of a recommendation model training method provided in an embodiment of the present specification;
FIG. 2 is a system architecture diagram for a shopping scenario provided by one embodiment of the present disclosure;
FIG. 3 is a flow chart of a method for training a recommendation model provided in one embodiment of the present description;
FIG. 4 is a flow chart of a recommendation method provided by one embodiment of the present description;
FIG. 5 is a schematic diagram of an interaction between a user and an item provided by an embodiment of the present specification;
FIG. 6 is a diagram illustrating a computation process of embedding codes in a recommendation model training according to an embodiment of the present disclosure;
FIG. 7 is a flowchart of a recommendation model training method and a processing procedure of the recommendation method according to an embodiment of the present disclosure;
FIG. 8 is a schematic structural diagram of a recommendation model training apparatus according to an embodiment of the present disclosure;
fig. 9 is a schematic structural diagram of a recommendation device provided in an embodiment of the present specification;
fig. 10 is a block diagram of a computing device according to an embodiment of the present disclosure.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present specification. This description may be implemented in many ways other than those specifically set forth herein, and those skilled in the art will appreciate that the present description is susceptible to similar generalizations without departing from the scope of the description, and thus is not limited to the specific implementations disclosed below.
The terminology used in the description of the one or more embodiments is for the purpose of describing the particular embodiments only and is not intended to be limiting of the description of the one or more embodiments. As used in one or more embodiments of the present specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present specification refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It should be understood that although the terms first, second, etc. may be used herein in one or more embodiments to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first can also be referred to as a second and, similarly, a second can also be referred to as a first without departing from the scope of one or more embodiments of the present description. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present specification relate are explained.
A bipartite graph: the bipartite graph is a graph including two entities (users, items), to which two nodes of any one edge belong, respectively.
Few-interaction sample users: in one or more embodiments of the present specification, a user with less interaction with a sample item refers to a user with less interaction information with a sample item, and may be determined according to a preset threshold.
Multi-interaction sample user: in one or more embodiments of the present specification, a multi-interaction sample user refers to a user who interacts with a sample item more frequently, and may be determined according to a preset threshold, and the multi-interaction sample user may also be understood as a rich-interaction sample user.
In this specification, a recommendation model training method is provided, and one or more embodiments of the specification relate to a recommendation method, a recommendation model training apparatus, a recommendation apparatus, a computing device, a computer-readable storage medium, and a computer program, which are described in detail in the following embodiments one by one.
With the development of computer technology, bipartite graph embedding is widely applied in various fields such as user recommendation, advertisement, search and the like. The bipartite graph is a graph containing two entities (users, items), to which two nodes of any one edge belong, respectively.
The traditional recommendation system is based on historical interactive information training of a user-project, generally, in a bipartite graph, interactive information difference between different nodes is large, for sparse nodes, because the user nodes do not have many product interactive behaviors, the user cannot be sufficiently trained in model training, prediction accuracy is low, recommendation effect is often not ideal enough, and therefore an accurate recommendation model training scheme is urgently needed.
In order to improve the universality and accuracy of a recommendation model, one or more embodiments of the present specification provide a method for pre-training by combining a user-item bipartite graph based on multiple interaction sample users, which can accurately recommend users with few interaction samples.
Specifically, in the recommendation model training method provided in an embodiment of the present specification, a plurality of sample users, a plurality of sample items, and interaction information between the sample users and the sample items are obtained; screening multiple interaction sample users and few interaction sample users from a plurality of sample users according to the interaction information; calculating the embedded codes of the multi-interaction sample users and the embedded codes of the sample items by utilizing the interaction information of the multi-interaction sample users and the sample items; determining an embedded code of a user with few interaction samples; setting feature information of nodes of an interactive graph by using embedded codes of multiple interactive sample users, embedded codes of sample items and embedded codes of few interactive sample users, wherein the interactive graph takes the sample users and the sample items as the nodes, and edges are determined according to the interactive information; and training an initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model. The sample users are divided into multi-interaction sample users and few-interaction sample users, the sample users are subjected to targeted processing, interaction information of the multi-interaction sample users and sample items is fully utilized, embedded codes with strong expressiveness are obtained, an initial recommendation model based on a graph neural network is further trained by utilizing an interaction graph, the initial recommendation model is made to converge quickly, and the recommendation model with high accuracy is generated.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an application scenario of a recommendation model training method provided in an embodiment of the present specification. As shown in fig. 1, the recommendation system includes a client and a server;
the client is configured to send a plurality of sample users, a plurality of sample items and interaction information of the sample users and the sample items to the server;
the server is configured to obtain a plurality of sample users, a plurality of sample items and interaction information of the sample users and the sample items; screening multiple interaction sample users and few interaction sample users from a plurality of sample users according to the interaction information; calculating the embedded codes of the multi-interaction sample users and the embedded codes of the sample items by utilizing the interaction information of the multi-interaction sample users and the sample items; determining an embedded code of a user with few interaction samples; setting feature information of nodes of an interactive graph by using embedded codes of multiple interactive sample users, embedded codes of sample items and embedded codes of few interactive sample users, wherein the interactive graph takes the sample users and the sample items as the nodes, and edges are determined according to the interactive information; and training an initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model.
Further, the server side can send the trained recommendation model to the client side, so that the client side applies the trained recommendation model to recommend; or the server side can also receive an object to be recommended sent by the client side, generate a recommendation result by using the trained recommendation model, and send the recommendation result to the client side.
By applying the scheme of the embodiment of the specification, a plurality of sample users, a plurality of sample projects and interaction information of the sample users and the sample projects are obtained; screening multiple interaction sample users and few interaction sample users from a plurality of sample users according to the interaction information; calculating the embedded codes of the multi-interaction sample users and the embedded codes of the sample items by utilizing the interaction information of the multi-interaction sample users and the sample items; determining an embedded code of a user with few interaction samples; setting feature information of nodes of an interactive graph by using embedded codes of multiple interactive sample users, embedded codes of sample items and embedded codes of few interactive sample users, wherein the interactive graph takes the sample users and the sample items as the nodes, and edges are determined according to the interactive information; and training an initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model. The method has the advantages that the sample users are divided into multiple interactive sample users and few interactive sample users, the sample users are subjected to targeted processing, interactive information of the multiple interactive sample users and sample items is fully utilized, embedded codes with strong expressiveness are obtained, an interactive graph is further utilized to train an initial recommendation model based on a graph neural network, the initial recommendation model is made to converge quickly, and the recommendation model with high accuracy is generated.
One or more embodiments provided in the present specification may be applied to a shopping scenario, and referring to fig. 2, fig. 2 illustrates a schematic diagram of a system architecture applied to a shopping scenario and provided in an embodiment of the present specification, where the system may include a server 210 and a plurality of clients 200. Communication connection can be established among a plurality of clients 200 through a server 210, in a shopping scene, the server 210 is used for providing recommendation service among the plurality of clients 200, and the plurality of clients 200 can be respectively used as a sending end or a receiving end to realize real-time recommendation through the server 210.
The user can interact with the server 210 through the client 200 to receive data sent by other clients 200, or send data to other clients 200, and the like. In a shopping scenario, a user may issue an object to be recommended to a server 210 through a client 200 to make a recommendation service request, and the server 200 generates a recommendation result based on the recommendation service request and pushes the recommendation result to other clients establishing communication.
Wherein, the connection between the client 200 and the server 210 is established through a network. The network provides a medium for communication links between clients and servers. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The client 200 may be a browser, an APP (Application), or a web Application such as H5(HyperText Markup Language5, 5 th edition) Application, or a light Application (also referred to as an applet, a lightweight Application) or a cloud Application, and the client 200 may be based on an SDK (Software Development Kit) of a corresponding service provided by a server, such as Development and acquisition based on the SDK. The client 200 may be deployed in an electronic device, need to run depending on the device running or some apps in the device, etc. The electronic device may have a display screen and support information browsing, etc., for example, and may be a personal mobile terminal such as a mobile phone, a tablet computer, a personal computer, etc. Various other types of applications may also be typically deployed in an electronic device, such as a human-machine conversation type application, a model training type application, a text processing type application, a web browser application, a shopping type application, a search type application, an instant messaging tool, a mailbox client, social platform software, and the like.
The server 210 may include a server providing various services, such as a server providing recommendation services for multiple clients, a server for background training supporting a model used on a client, a server for processing data sent by a client, and the like.
It should be noted that the server 210 may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. The server may also be a server of a distributed system, or a server incorporating a blockchain. The server may also be a cloud server of basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a web service, cloud communication, a middleware service, a domain name service, a security service, a Content Delivery Network (CDN), a big data and artificial intelligence platform, or an intelligent cloud computing server or an intelligent cloud host with artificial intelligence technology.
It should be noted that the recommendation model training provided in the embodiment of the present specification is generally performed by the server, but in other embodiments of the present specification, the client may also have a similar function to the server, so as to perform the recommendation model training provided in the embodiment of the present specification. In other embodiments, the recommendation model training provided by the embodiments of the present specification may also be performed by the client and the server together.
Referring to fig. 3, fig. 3 is a flowchart illustrating a recommendation model training method provided in an embodiment of the present specification, which specifically includes the following steps:
step 302: and acquiring a plurality of sample users, a plurality of sample items and interaction information of the sample users and the sample items.
In one or more embodiments of the present disclosure, in order to improve the accuracy and universality of the trained recommendation model, a large number of training samples may be obtained, and the initial recommendation model is trained by using the large number of training samples, so as to generate a more accurate recommendation model.
Specifically, the sample item refers to an item having an interactive relationship with a sample user, and the item may also be understood as a product, including but not limited to an article, a commodity, an advertisement, search information, and the like, which is specifically selected according to an actual situation, and this is not limited in this embodiment of the present specification. The number of the plurality of the units may be plural or one, and is selected according to actual conditions, and the embodiment of the present specification is not limited in any way. The interaction information of the sample user and the sample item refers to information generated in an interaction process of the sample user and the sample item, and may be interaction times, interaction satisfaction, interaction time, and the like, which are specifically selected according to actual conditions, and this is not limited in this embodiment of the specification. Generally, the obtaining of the plurality of sample users, the plurality of sample items, and the interaction information between the sample users and the sample items may be manually inputting a large number of sample users, sample items, and interaction information, or reading a large number of sample users, sample items, and interaction information from other data obtaining devices or databases, and the obtaining may be specifically selected according to actual situations, which is not limited in this embodiment of the present specification.
It should be noted that the interaction between the sample user and the sample item may be a one-to-one relationship, and one user can only interact with one sample item, for example, user 1 purchases product a, and user 2 purchases product B; the interaction between the sample users and the sample items can also be a one-to-many relationship, and one sample user can interact with a plurality of sample items, for example, user 1 purchases a commodity a and a commodity B, and user 2 purchases a commodity C and a commodity D; the interaction between the sample user and the sample items can also be a many-to-many relationship, one sample user can interact with a plurality of sample items, and one sample item can also interact with a plurality of sample users, for example, user 1 purchases goods a and B, and user 2 purchases goods B and C. The selection is specifically performed according to actual situations, and the embodiment of the present specification is not limited in any way.
Step 304: and screening out multiple interaction sample users and few interaction sample users from the plurality of sample users according to the interaction information.
In one or more embodiments of the present specification, after obtaining a plurality of sample users, a plurality of sample items, and interaction information between the sample users and the sample items, further, in order to compare interaction sample users with less interaction information with the sample items, the plurality of sample users may be divided into multiple interaction sample users and less interaction sample users, and the multiple interaction sample users and the less interaction sample users are respectively processed.
Specifically, the multi-interaction sample user refers to a user who has more interaction information with the sample project, the less-interaction sample user refers to a user who has less interaction information with the sample project, and in practical application, the sample user can be divided into the multi-interaction sample user and the less-interaction sample user according to a preset threshold.
It should be noted that there are various ways to screen out multiple interaction sample users and few interaction sample users from a plurality of sample users, and the selection is specifically performed according to actual situations, and this is not limited in this embodiment of the present specification.
In an optional implementation manner of this specification, an interaction information screening condition may be preset, where the screening condition may be a screening threshold, and when interaction information between a sample user and a sample item is greater than the interaction information screening threshold, the sample user corresponding to the interaction information is taken as a multi-interaction sample user; and when the interaction information between the sample user and the sample item is less than or equal to the interaction information screening threshold value, taking the sample user corresponding to the interaction information as a less-interaction sample user.
Exemplarily, assuming that the interaction information between the sample user and the sample item is the interaction time, presetting the interaction information screening condition to be 2 minutes, and if the interaction time between the sample user and the sample item is 3 minutes, judging that 3 minutes is more than 2 minutes of the interaction information screening condition, determining that the sample user is a multi-interaction sample user; if the interaction time between the sample user and the sample item is 1 minute, judging that the 1 minute is less than the interaction information screening condition for 2 minutes, and determining that the sample user is a less-interaction sample user; and if the interaction time between the sample user and the sample item is 2 minutes, judging that the 2 minutes is equal to the interaction information screening condition for 2 minutes, and determining that the sample user is the less-interaction sample user.
In another optional implementation manner of this specification, the step of calculating an interaction ratio of interaction information of sample users and sample items to total interaction information of all users, further screening multiple interaction sample users and few interaction sample users from the sample users according to an interaction ratio threshold, and in a case that the interaction information is an interaction number, calculating an interaction ratio of the interaction number to a set of interaction numbers of all users according to the interaction number of the sample users and the sample items, and determining the multiple interaction sample users and the few interaction sample users according to the interaction ratio, that is, the step of screening the multiple interaction sample users and the few interaction sample users from a plurality of sample users according to the interaction information may include the following steps:
calculating the interaction proportion of the interaction times in the whole user interaction time set aiming at a plurality of sample users and a plurality of sample items;
and determining multiple-interaction sample users and few-interaction sample users according to the interaction proportion.
Specifically, all users may be understood as a plurality of acquired sample users, and the interaction number set includes the number of interactions between the sample users and the sample items.
In practical application, a hyper-parameter ρ (0< ρ <1) may be preset, a User whose interaction frequency is ρ is divided into more than two users as a less-interactive sample User (NKU, Non-Key User), and other users as a more-interactive sample User (KU, Key User), where the more-interactive sample User may specifically be obtained by using the following formula (1):
S KU ={u∈G|D u >Percentile(ρ,D G )} (1)
where S is a set of multi-interaction sample users, u refers to sample users, G is a set of all sample users, D u Is the number of interactions between a sample user u and an item, ρ is the ratio of multiple interacting sample users, D G Is the set of interactions of the entire user.
It should be noted that, after the set of multiple interaction sample users is obtained by calculation using formula (1), multiple interaction sample users are removed from a plurality of sample users, and the rest are users with few interaction samples.
By applying the scheme of the embodiment of the specification, after a plurality of sample users, a plurality of sample projects and interaction information of the sample users and the sample projects are obtained, the interaction proportion of the interaction times in the whole user interaction time set is calculated for the sample users and the sample projects, and according to the interaction proportion, a plurality of interaction sample users and a plurality of interaction sample users are determined, so that the accuracy of screening and dividing results is improved, and the sample users can be accurately subjected to targeted processing in the follow-up process.
Step 306: and calculating the embedded codes of the multi-interaction sample users and the embedded codes of the sample items by utilizing the interaction information of the multi-interaction sample users and the sample items.
In one or more embodiments of the present specification, after obtaining a plurality of sample users, a plurality of sample items, and interaction information between the sample users and the sample items, and screening a multi-interaction sample user and a low-interaction sample user from the plurality of sample users according to the interaction information, further, the embedded codes of the multi-interaction sample users and the embedded codes of the sample items may be calculated by using the interaction information between the multi-interaction sample users and the sample items.
In practical applications, the embedded code may be understood as embedded (Embedding), which means that there are various ways of obtaining the embedded code of the multi-interaction sample user and the embedded code of the sample item, and the ways are specifically selected according to practical situations, and the embodiment of the present specification does not limit this.
In an alternative embodiment of the present specification, the embedded codes of multiple interactive sample users and the embedded codes of sample items can be obtained by using one-hot codes. one-hot encoding, also known as one-bit-efficient encoding, mainly uses an N-bit status register to encode N states, each state having an independent register bit and only one bit being active at any time. one-hot encoding is the representation of categorical variables as binary vectors.
Illustratively, in a recommendation system, for example, a merchant has 5 items, Embedding is a 5-dimensional vector, and Embedding of the first item is [1,0,0,0,0 ].
In another optional implementation manner of this specification, the trained depth model may be obtained, or the depth model is generated by pre-training, interaction information of the multi-interaction sample user and the sample item is input into the depth model, and the embedded code of the multi-interaction sample user and the embedded code of the sample item are obtained, that is, the step of calculating the embedded code of the multi-interaction sample user and the embedded code of the sample item by using the interaction information of the multi-interaction sample user and the sample item may include the following steps:
and inputting the interaction information of the multi-interaction sample user and the sample item into a preset depth model to obtain the embedded code of the multi-interaction sample user and the embedded code of the sample item.
Specifically, the preset depth model includes, but is not limited to, a Wide & Deep model and a Deep fm model, which are selected according to actual situations, and this is not limited in this embodiment of the present specification.
Illustratively, the DeepFM model contains two parts: and the factorization part and the neural network part are respectively responsible for extracting the low-order features and the high-order features. Both parts share the same embedded layer input. With the embedding layer (embedding layer), although the lengths of different fields are different (the number of values of different discrete variables may be different), the lengths of vectors after embedding are all K (embedding-size set in advance).
By applying the scheme of the embodiment of the specification, a plurality of sample users, a plurality of sample items and interaction information of the sample users and the sample items are obtained; screening out multiple interaction sample users and few interaction sample users from a plurality of sample users according to the interaction information; the embedded codes of the multi-interaction sample users and the embedded codes of the sample items are calculated by utilizing the interaction information of the multi-interaction sample users and the sample items, the interaction information of the multi-interaction sample users and the sample items is fully utilized, the embedded codes with strong expressiveness are obtained, and the accuracy of the recommendation model is further improved.
Step 308: an embedded code for the low interaction sample user is determined.
In one or more embodiments of the present disclosure, after obtaining a plurality of sample users, a plurality of sample items, and interaction information between the sample users and the sample items, screening a multi-interaction sample user and a low-interaction sample user from the plurality of sample users according to the interaction information, and calculating an embedded code of the multi-interaction sample user and an embedded code of the sample item by using the interaction information between the multi-interaction sample user and the sample item, further, the embedded code of the low-interaction sample user may be determined.
In practical applications, there are various ways of determining the embedded codes of the users with few interaction samples, which are specifically selected according to practical situations, and this is not limited in this embodiment of the present specification.
In an alternative embodiment of the present specification, the embedded codes of the users with few interaction samples can be generated by using a random initialization method.
Illustratively, assume that the embedded encoding of the low interaction sample user is two-dimensional (x) 1 ,x 2 ) Random initialization may be understood as referring to x 1 ,x 2 Samples were taken randomly from the interval (-1, 1).
In another optional implementation manner of this specification, the embedded code of the user with few interaction samples may be generated in a neighboring node pooling manner, that is, the step of determining the embedded code of the user with few interaction samples may include the following steps:
determining multiple-interaction sample users adjacent to the few-interaction sample user, wherein the few-interaction sample user and the multiple-interaction sample user have common interaction sample items;
and pooling the embedded codes of the adjacent multi-interaction sample users to generate the embedded codes of the users with less interaction samples.
It should be noted that, since the sample items interacted with the less-interactive sample users may also be interacted with by the more-interactive sample users, the embedded codes of the less-interactive sample users may be generated by using the embedded codes of the more-interactive sample users, where the less-interactive sample users and the more-interactive sample users have the commonly interacted sample items.
Specifically, the calculation formula of the weighted pooling is as the following formula (2):
Figure BDA0003681751640000101
wherein e is v Is an embedded code of a node v, N (v) represents all neighboring nodes of the node v, w i Is a weighted weight (if it is an average pooling, w i All the same), h i Is the embedded code of the adjacent nodes, n represents that there are n nodes, and i represents the ith node.
Illustratively, assuming that the sample-less-interacted user has two neighboring sample-more users with embeddings of (-2,0) and (-1,1), respectively, the embeddings of the two neighboring sample-more users can be weighted averagely, resulting in an embeddings of (-1.5,0.5) for the sample-less-interacted user.
By applying the scheme of the embodiment of the specification, the multi-interaction sample users adjacent to the user with few interaction samples are determined, wherein the user with few interaction samples and the multi-interaction sample user have common interaction sample items, the embedded codes of the adjacent multi-interaction sample users are pooled, the embedded codes of the user with few interaction samples are generated, the accuracy of the embedded codes of the user with few interaction samples is improved, and the accuracy of the recommendation model is further improved.
Step 310: setting feature information of nodes of an interactive graph by using embedded codes of multiple interactive sample users, embedded codes of sample items and embedded codes of few interactive sample users, wherein the interactive graph takes the sample users and the sample items as the nodes, and edges are determined according to the interactive information.
In one or more embodiments of the present specification, after obtaining a plurality of sample users, a plurality of sample items, and interaction information between the sample users and the sample items, screening a multi-interaction sample user and a low-interaction sample user from the plurality of sample users according to the interaction information, calculating an embedded code of the multi-interaction sample user and an embedded code of the sample item by using the interaction information between the multi-interaction sample user and the sample items, and determining the embedded code of the low-interaction sample user, further, feature information of nodes of an interaction graph may be set by using the embedded code of the multi-interaction sample user, the embedded code of the sample item, and the embedded code of the low-interaction sample user.
In an optional implementation manner of this specification, before setting the feature information of the node of the interaction graph, the method may further include, before the step of setting the feature information of the node of the interaction graph, the following steps:
determining a plurality of sample users and a plurality of sample items as each node in the interactive graph, and determining the interactive information of the sample users and the sample items as edges in the interactive graph;
constructing an interaction graph based on each node in the interaction graph and the edges in the interaction graph;
and respectively acquiring attribute information of a plurality of sample users and a plurality of sample items, and determining the attribute information as initial characteristic information of each node in the interactive graph.
It should be noted that after obtaining a plurality of sample users, a plurality of sample items, and interaction information between the sample users and the sample items, the plurality of sample users and the plurality of sample items may be determined as nodes in an interaction graph, and the interaction information between the sample users and the sample items may be determined as edges in the interaction graph. After the interactive graph is constructed, the attribute information of a plurality of sample users and a plurality of sample items can be respectively obtained, the attribute information of the sample users is determined as the initial characteristic information of the sample users, and the attribute information of the sample items is determined as the initial characteristic information of the sample items.
Specifically, the attribute information of the sample user refers to the attribute information of the sample user itself, including but not limited to work, job number, and the like of the sample user, and the attribute information of the sample item refers to the attribute information of the sample item itself, including but not limited to the type, price, and the like of the sample item, which is specifically selected according to the actual situation, and this is not limited in this embodiment of the present specification.
By applying the scheme of the embodiment of the specification, a plurality of sample users and a plurality of sample items are determined as nodes in the interactive map, the interactive information between the sample users and the sample items is determined as edges in the interactive map, the interactive map is constructed on the basis of the nodes in the interactive map and the edges in the interactive map, the attribute information of the sample users and the sample items is respectively obtained, the attribute information is determined as the initial characteristic information of the nodes in the interactive map, the accuracy of constructing the interactive map is improved, and the accuracy of a recommendation model is further improved.
In practical application, the step of directly adding the embedded codes of the multiple interaction sample users, the embedded codes of the sample items, and the embedded codes of the few interaction sample users to the initial feature information of the corresponding nodes in the interaction graph to generate the feature information of the nodes, that is, the step of setting the feature information of the nodes in the interaction graph by using the embedded codes of the multiple interaction sample users, the embedded codes of the sample items, and the embedded codes of the few interaction sample users, may include the following steps:
and respectively adding the embedded codes of the multiple interaction sample users, the embedded codes of the sample items and the embedded codes of the few interaction sample users to the initial characteristic information of the corresponding nodes in the interaction graph to generate the characteristic information of the nodes.
It should be noted that the initial characteristic information of each node in the interaction graph is also the attribute information of each node. For example, assuming that the initial feature information of the multi-interaction sample user 1 in the interaction graph is the job number 28, the embedded code 1 of the multi-interaction sample user 1 may be added to the initial feature information of the multi-interaction sample user 1, and the feature information of the multi-interaction sample user 1 is generated to be "job number 28+ embedded code 1". And updating the initial characteristic information of all the nodes in the interactive graph in the same way to generate the characteristic information of each node.
By applying the scheme of the embodiment of the specification, the embedded codes of the multi-interaction sample users, the embedded codes of the sample items and the embedded codes of the few-interaction sample users are respectively added into the initial characteristic information of each corresponding node in the interaction graph to generate the characteristic information of each node, and the embedded codes with strong expressiveness are added into the initial characteristic information of each node, so that the accuracy and the universality of the trained recommendation model are improved.
In practical application, the initial characteristic information of each node can be screened according to actual requirements, the embedded codes of multiple interaction sample users, the embedded codes of sample items and the embedded codes of less interaction sample users are respectively added to the screened initial characteristic information of each node in the interaction graph, and the characteristic information of each node is generated. Due to the fact that the initial characteristic information is screened, training efficiency of a subsequent training process can be further improved.
Step 312: and training an initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model.
In one or more embodiments of the present specification, after setting the feature information of the nodes of the interaction graph, further, the constructed interaction graph may be used to train an initial recommendation model based on a graph neural network, and obtain a trained recommendation model.
In particular, Graph Neural Networks (GNNs) are a type of Neural network that acts directly on Graph structures.
By applying the scheme of the embodiment of the specification, a plurality of sample users, a plurality of sample projects and interaction information of the sample users and the sample projects are obtained; screening multiple interaction sample users and few interaction sample users from a plurality of sample users according to the interaction information; calculating the embedded codes of the multi-interaction sample users and the embedded codes of the sample items by utilizing the interaction information of the multi-interaction sample users and the sample items; determining an embedded code of a user with few interaction samples; setting feature information of nodes of an interactive graph by utilizing embedded codes of multiple interactive sample users, embedded codes of sample items and embedded codes of few interactive sample users, wherein the interactive graph takes the sample users and the sample items as the nodes, and edges are determined according to the interactive information; and training an initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model. The method has the advantages that the sample users are divided into multiple interactive sample users and few interactive sample users, the sample users are subjected to targeted processing, interactive information of the multiple interactive sample users and sample items is fully utilized, embedded codes with strong expressiveness are obtained, an interactive graph is further utilized to train an initial recommendation model based on a graph neural network, the initial recommendation model is made to converge quickly, and the recommendation model with high accuracy is generated.
In practical application, the step of training the graph neural network by using a standard GNN model (i.e. gcn, GAN, graphpage) may include the following steps:
inputting the interactive graph into an initial recommendation model, and training the initial recommendation model to obtain a trained recommendation model;
the training target is to minimize a first loss value and a second loss value, the first loss value is determined according to the actual interaction relation and the prediction result of whether the sample user interacts with the sample item, and the second loss value is determined according to the actual correlation and the prediction result of the correlation between the sample user and the sample item.
Specifically, the actual interaction relationship refers to an actual interaction relationship between a sample user and a sample item in an interaction graph, and may be 0 or 1, where 0 represents that the sample user has no interaction relationship with the sample item, and 1 represents that the sample user has an interaction relationship with the sample item, of course, 1 may also represent that the sample user has no interaction relationship with the sample item, and 0 may also represent that the sample user has no interaction relationship with the sample item, which is specifically selected according to an actual situation, and this is not limited in this description embodiment.
The correlation degree between the sample user and the sample project is the correlation degree between the sample user and the sample project, and can also be understood as a score value, the score value is determined by using a score function, the score function is score (u, v), namely, a point product of the user and the project, and is specifically calculated by using the following formula (3), the embedded code of the node v in the step K +1 is calculated by using the following formula (4), and the embedded code of the node u in the step K +1 is calculated by using the following formula (5):
Figure BDA0003681751640000121
Figure BDA0003681751640000122
Figure BDA0003681751640000123
where u is a neighbor of node v,
Figure BDA0003681751640000131
indicating the embedded code of node u at step K,
Figure BDA0003681751640000132
represents the embedded code of the node V at the K step, V is all sample item nodes in the interactive graph, U is all sample user nodes in the interactive graph, AGGR function is an aggregation function, such as an average function, a max function, etc., COMBINE (x, y) may be ReLU (Linear (Concatx, y))), n (V) represents the neighboring nodes of the node V, and n (U) represents the neighboring nodes of the node U.
By applying the scheme of the embodiment of the specification, the recommendation model obtained by final training is more accurate and the universality is higher by minimizing the first loss value and then the second loss value.
Referring to fig. 4, fig. 4 is a flowchart illustrating a recommendation method provided in an embodiment of the present specification, which specifically includes the following steps:
step 402: acquiring an object to be recommended, wherein the object to be recommended comprises a user to be recommended or an item to be recommended;
step 404: and inputting the object to be recommended into the trained recommendation model to obtain a recommendation result, wherein the recommendation model is obtained by training by using the recommendation model training method.
In one or more embodiments of the present specification, since the recommendation is bidirectional, the object to be recommended may be a user to be recommended or may be an item to be recommended. Under the condition that the object to be recommended is the user to be recommended, the recommendation result can be a target item; and under the condition that the object to be recommended is an item to be recommended, the recommendation result can be a target user, and of course, the recommendation result can also carry specific relevance and interaction relation.
By applying the scheme of the embodiment of the specification, the object to be recommended is obtained, wherein the object to be recommended comprises the user to be recommended or the item to be recommended, the object to be recommended is input into the trained recommendation model, and the recommendation result is obtained, wherein the recommendation model is obtained by training by using the recommendation model training method, and the accuracy of the recommendation result is improved.
Referring to fig. 5, fig. 5 shows a schematic diagram of interaction between users and an Item provided in an embodiment of the present specification, where the User users include a low interaction sample User (NKU, Non-Key User) and a multiple interaction sample User (KU, Key User), a solid line represents interaction information between the multiple interaction sample User and the Item, and a dotted line represents interaction information between the low interaction sample User and the Item, as can be seen from fig. 5, there is more interaction information between the multiple interaction sample User and the Item, and there is less interaction information between the low interaction sample User and the Item.
Referring to fig. 6, fig. 6 is a schematic diagram illustrating a calculation process of embedding codes in training of a recommendation model according to an embodiment of the present disclosure. By acquiring information such as user ID and user work of a multi-interaction sample user (KU), user embedded information such as user ID embedding and user work embedding is generated, information such as product type and product ID of a sample product is acquired, and product embedded information such as product type embedding and product ID embedding is generated. Embedding the user and the product into a depth model such as a Wide & Deep model, a Deep FM model and the like to obtain the embedded code of the multi-interaction sample user and the embedded code of the sample item.
The following description further describes the recommendation model training method provided in this specification by taking an application of the recommendation model training method in a shopping scenario as an example with reference to fig. 7. Fig. 7 shows a processing flow chart of a recommendation model training method and a recommendation method provided in an embodiment of the present specification, which specifically includes the following steps:
step 702: a plurality of sample buyers, a plurality of sample commodities, and the purchase times of the sample buyers and the sample commodities are obtained.
It should be noted that, in order to improve the accuracy of the recommendation model, in the process of training the recommendation model, a plurality of sample buyers, a plurality of sample commodities, and the purchase times of the sample buyers and the sample commodities in the shopping scene may be acquired.
Step 704: and screening out multiple interaction sample buyers and few interaction sample buyers from the plurality of sample buyers according to the purchase times.
Step 706: and calculating the embedded codes of the multi-interaction sample buyers and the embedded codes of the sample commodities by utilizing the purchase times of the multi-interaction sample buyers and the sample commodities.
Step 708: an embedded encoding of the low interaction sample buyer is determined.
Step 710: setting feature information of nodes of an interactive graph by using the embedded codes of the multi-interactive sample buyers, the embedded codes of the sample commodities and the embedded codes of the few-interactive sample buyers, wherein the edges are determined according to the number of times of purchase by taking the sample buyers and the sample commodities as the nodes in the interactive graph.
Step 712: and training an initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model.
Step 714: and acquiring the buyer to be recommended.
Specifically, the to-be-recommended buyer refers to a user who needs to obtain recommended goods when browsing shopping software.
Step 716: and inputting the buyer to be recommended into the trained recommendation model to obtain the recommended commodity.
Specifically, the buyer to be recommended inputs the trained recommendation model, and then the product recommended to the buyer to be recommended, such as lipstick, bag, etc., can be obtained.
By applying the scheme of the embodiment of the specification, the embedded characteristic is a Dense characteristic of the user and the project information, and for the user with few interactive samples, the user with few interactive samples cannot be fully trained because of less interaction, so that the embedded characteristic capability of the user with few interactive samples is not strong. Because graph learning has a good effect in capturing high-order relationships (for example, the less-interactive sample user 1 and the multi-interactive sample user 1 both interact with the product 1, and the relationship between the less-interactive sample user 1 and the multi-interactive sample user 1 can be captured), the recommendation model training method provided by the embodiment of the specification performs full training through the traditional depth model to obtain embedded codes of part of users and commodities, and transmits the part of information to all nodes through the graph model for training, and fully utilizes the advantage of strong expression of the traditional depth recommendation model to obtain embedding with strong expression, and captures high-order graph structure information by combining with a graph neural network (if two user nodes are separated by K-hop), so that the convergence speed of the graph learning model is accelerated, and the product is recommended to the less-interactive user.
Corresponding to the above method embodiment, the present specification further provides an embodiment of a recommended model training apparatus, and fig. 8 shows a schematic structural diagram of a recommended model training apparatus provided in an embodiment of the present specification. As shown in fig. 8, the apparatus includes:
a first obtaining module 802, configured to obtain a number of sample users, a number of sample items, and interaction information of the sample users and the sample items;
the screening module 804 is configured to screen multiple interaction sample users and few interaction sample users from the plurality of sample users according to the interaction information;
a calculating module 806 configured to calculate an embedded code of the multi-interaction sample user and an embedded code of the sample item using interaction information of the multi-interaction sample user and the sample item;
a determination module 808 configured to determine an embedded encoding of a low interaction sample user;
the setting module 810 is configured to set feature information of nodes of an interaction graph by using the embedded codes of multiple interaction sample users, the embedded codes of sample items and the embedded codes of less interaction sample users, wherein the interaction graph takes the sample users and the sample items as the nodes, and edges are determined according to the interaction information;
and a training module 812 configured to train the initial recommendation model based on the graph neural network by using the interaction graph, and obtain a trained recommendation model.
Optionally, the interaction information includes interaction times; the screening module 804 is further configured to calculate an interaction ratio of the number of interactions to the total user interaction number set for a number of sample users and a number of sample items; and determining a multi-interaction sample user and a few-interaction sample user according to the interaction proportion.
Optionally, the calculating module 806 is further configured to input interaction information of the multi-interaction sample user and the sample item into a preset depth model, and obtain the embedded code of the multi-interaction sample user and the embedded code of the sample item.
Optionally, the determining module 808 is further configured to determine a multi-interaction sample user adjacent to the low-interaction sample user, wherein the low-interaction sample user and the multi-interaction sample user have a common interaction sample item; and pooling the embedded codes of the adjacent multi-interaction sample users to generate the embedded codes of the users with less interaction samples.
Optionally, the apparatus further comprises: the construction module is configured to determine a plurality of sample users and a plurality of sample items as nodes in the interactive graph, and determine the interactive information of the sample users and the sample items as edges in the interactive graph; constructing an interaction graph based on each node in the interaction graph and the edges in the interaction graph; and respectively acquiring attribute information of a plurality of sample users and a plurality of sample items, and determining the attribute information as initial characteristic information of each node in the interactive graph.
Optionally, the setting module 810 is further configured to add the embedded codes of the multiple interaction sample users, the embedded codes of the sample items, and the embedded codes of the few interaction sample users to the initial feature information of the corresponding nodes in the interaction graph, respectively, to generate feature information of the nodes.
Optionally, the training module 812 is further configured to input the interaction diagram into the initial recommendation model, and train the initial recommendation model to obtain a trained recommendation model; the training target is to minimize a first loss value and a second loss value, the first loss value is determined according to the actual interaction relation and the prediction result of whether the sample user interacts with the sample item, and the second loss value is determined according to the actual correlation and the prediction result of the correlation between the sample user and the sample item.
By applying the scheme of the embodiment of the specification, a plurality of sample users, a plurality of sample projects and interaction information of the sample users and the sample projects are obtained; screening multiple interaction sample users and few interaction sample users from a plurality of sample users according to the interaction information; calculating the embedded codes of the multi-interaction sample users and the embedded codes of the sample items by utilizing the interaction information of the multi-interaction sample users and the sample items; determining an embedded code of a user with few interaction samples; setting feature information of nodes of an interactive graph by utilizing embedded codes of multiple interactive sample users, embedded codes of sample items and embedded codes of few interactive sample users, wherein the interactive graph takes the sample users and the sample items as the nodes, and edges are determined according to the interactive information; and training an initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model. The method has the advantages that the sample users are divided into multiple interactive sample users and few interactive sample users, the sample users are subjected to targeted processing, interactive information of the multiple interactive sample users and sample items is fully utilized, embedded codes with strong expressiveness are obtained, an interactive graph is further utilized to train an initial recommendation model based on a graph neural network, the initial recommendation model is made to converge quickly, and the recommendation model with high accuracy is generated.
The above is a schematic scheme of the recommended model training apparatus of the present embodiment. It should be noted that the technical solution of the recommendation model training apparatus and the technical solution of the recommendation model training method belong to the same concept, and details that are not described in detail in the technical solution of the recommendation model training apparatus can be referred to the description of the technical solution of the recommendation model training method.
Corresponding to the above method embodiment, the present specification further provides a recommendation apparatus embodiment, and fig. 9 shows a schematic structural diagram of a recommendation apparatus provided in an embodiment of the present specification. As shown in fig. 9, the apparatus includes:
a second obtaining module 902 configured to obtain an object to be recommended;
and the recommending module 904 is configured to input the object to be recommended into the trained recommending model to obtain a recommending result, wherein the recommending model is obtained by training by using the recommending model training method.
By applying the scheme of the embodiment of the specification, the object to be recommended is obtained, wherein the object to be recommended comprises the user to be recommended or the item to be recommended, the object to be recommended is input into the trained recommendation model, and the recommendation result is obtained, wherein the recommendation model is obtained by training by using the recommendation model training method, and the accuracy of the recommendation result is improved.
The foregoing is a schematic diagram of a recommendation device of this embodiment. It should be noted that the technical solution of the recommendation apparatus and the technical solution of the recommendation method belong to the same concept, and for details that are not described in detail in the technical solution of the recommendation apparatus, reference may be made to the description of the technical solution of the recommendation method.
Fig. 10 shows a block diagram of a computing device 1000 provided in one embodiment of the present specification. The components of the computing device 1000 include, but are not limited to, memory 1010 and a processor 1020. The processor 1020 is coupled to the memory 1010 via a bus 1030 and the database 1050 is used to store data.
Computing device 1000 also includes access device 1040, access device 1040 enabling computing device 1000 to communicate via one or more networks 1060. Examples of such networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the internet. The Access device 1040 may include one or more of any type of Network Interface (e.g., a Network Interface Card (NIC)) that may be wired or Wireless, such as an IEEE802.11 Wireless Local Area Network (WLAN) Wireless Interface, a worldwide Interoperability for Microwave Access (Wi-MAX) Interface, an ethernet Interface, a Universal Serial Bus (USB) Interface, a cellular Network Interface, a bluetooth Interface, a Near Field Communication (NFC) Interface, and so forth.
In one embodiment of the present description, the above components of the computing device 1000 and other components not shown in fig. 10 may also be connected to each other, for example, through a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 10 is for purposes of example only and is not limiting as to the scope of the present description. Those skilled in the art may add or replace other components as desired.
Computing device 1000 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), a mobile phone (e.g., smartphone), a wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 1000 may also be a mobile or stationary server.
Wherein the processor 1020 is configured to execute computer-executable instructions that, when executed by the processor, implement the steps of the recommendation model training method or recommendation method described above.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the recommendation model training method or the recommendation method described above belong to the same concept, and details that are not described in detail in the technical solution of the computing device can be referred to the description of the technical solution of the recommendation model training method or the recommendation method described above.
An embodiment of the present specification further provides a computer-readable storage medium storing computer-executable instructions, which when executed by a processor, implement the recommendation model training method or the steps of the recommendation method.
The above is an illustrative scheme of a computer-readable storage medium of the embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the above-mentioned recommendation model training method or recommendation method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the above-mentioned recommendation model training method or recommendation method.
An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in a computer, the computer program causes the computer to execute the recommendation model training method or the steps of the recommendation method.
The above is a schematic scheme of a computer program of the present embodiment. It should be noted that the technical solution of the computer program belongs to the same concept as the technical solution of the above-mentioned recommendation model training method or recommendation method, and for details that are not described in detail in the technical solution of the computer program, reference may be made to the description of the technical solution of the above-mentioned recommendation model training method or recommendation method.
The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U.S. disk, removable hard disk, magnetic diskette, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signal, telecommunications signal, and software distribution medium, etc.
It should be noted that, for the sake of simplicity, the foregoing method embodiments are described as a series of acts, but those skilled in the art should understand that the present embodiment is not limited by the described acts, because some steps may be performed in other sequences or simultaneously according to the present embodiment. Further, those skilled in the art should also appreciate that the embodiments described in this specification are preferred embodiments and that acts and modules referred to are not necessarily required for an embodiment of the specification.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
The preferred embodiments of the present specification disclosed above are intended only to aid in the description of the specification. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the embodiments and the practical application, and to thereby enable others skilled in the art to best understand the specification and utilize the specification. The specification is limited only by the claims and their full scope and equivalents.

Claims (12)

1. A recommendation model training method, comprising:
acquiring a plurality of sample users, a plurality of sample items and interaction information of the sample users and the sample items;
screening out multiple interaction sample users and few interaction sample users from the plurality of sample users according to the interaction information;
calculating the embedded codes of the multi-interaction sample users and the embedded codes of the sample items by utilizing the interaction information of the multi-interaction sample users and the sample items;
determining an embedded code of the few-interaction sample user;
setting feature information of nodes of an interaction graph by using the embedded codes of the multi-interaction sample users, the embedded codes of the sample items and the embedded codes of the few-interaction sample users, wherein the sample users and the sample items are used as nodes in the interaction graph, and edges are determined according to the interaction information;
and training an initial recommendation model based on the graph neural network by using the interaction graph to obtain a trained recommendation model.
2. The method of claim 1, the interaction information comprising a number of interactions; the step of screening out multiple interaction sample users and few interaction sample users from the plurality of sample users according to the interaction information comprises the following steps:
calculating the interaction proportion of the interaction times in the whole user interaction time set aiming at the sample users and the sample items;
and determining the multi-interaction sample user and the few-interaction sample user according to the interaction proportion.
3. The method of claim 1, wherein the step of calculating the embedded code of the multi-interaction sample user and the embedded code of the sample item by using the interaction information of the multi-interaction sample user and the sample item comprises:
and inputting the interaction information of the multi-interaction sample user and the sample item into a preset depth model to obtain the embedded code of the multi-interaction sample user and the embedded code of the sample item.
4. The method of claim 1, the step of determining the embedded encoding of the few-interaction sample user, comprising:
determining a multi-interaction sample user adjacent to the low-interaction sample user, wherein the low-interaction sample user and the multi-interaction sample user have sample items of common interaction;
and pooling the embedded codes of the adjacent multi-interaction sample users to generate the embedded codes of the users with less interaction samples.
5. The method of claim 1, wherein before the step of setting the feature information of the nodes of the interaction graph using the embedded coding of the multi-interaction sample user, the embedded coding of the sample item, and the embedded coding of the less-interaction sample user, further comprises:
determining the sample users and the sample items as nodes in an interactive graph, and determining the interactive information of the sample users and the sample items as edges in the interactive graph;
constructing an interaction graph based on each node in the interaction graph and the edges in the interaction graph;
and respectively obtaining attribute information of the plurality of sample users and the plurality of sample items, and determining the attribute information as initial characteristic information of each node in the interactive graph.
6. The method of claim 1, wherein the step of setting feature information of nodes of an interaction graph using the embedded coding of the multi-interaction sample user, the embedded coding of the sample item, and the embedded coding of the less-interaction sample user comprises:
and respectively adding the embedded codes of the multiple interaction sample users, the embedded codes of the sample items and the embedded codes of the few interaction sample users to the initial characteristic information of the corresponding nodes in the interaction graph, and generating the characteristic information of the nodes.
7. The method of claim 1, wherein the step of training an initial recommendation model based on a graph neural network using the interaction graph to obtain a trained recommendation model comprises:
inputting the interaction diagram into the initial recommendation model, and training the initial recommendation model to obtain a trained recommendation model;
the training is to minimize a first loss value and a second loss value, wherein the first loss value is determined according to a predicted result and an actual interaction relation of whether the sample user interacts with the sample item, and the second loss value is determined according to a predicted result and an actual correlation of a correlation between the sample user and the sample item.
8. A recommendation method, comprising:
acquiring an object to be recommended, wherein the object to be recommended comprises a user to be recommended or an item to be recommended;
inputting the object to be recommended into a trained recommendation model to obtain a recommendation result, wherein the recommendation model is obtained by training according to the method of any one of claims 1 to 7.
9. A recommendation model training apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a third acquisition module, wherein the first acquisition module is configured to acquire a plurality of sample users, a plurality of sample items and interaction information of the sample users and the sample items;
the screening module is configured to screen out multiple interaction sample users and few interaction sample users from the plurality of sample users according to the interaction information;
a calculation module configured to calculate an embedded code of the multi-interaction sample user and an embedded code of the sample item using interaction information of the multi-interaction sample user and the sample item;
a determination module configured to determine an embedded encoding of the few-interaction sample user;
the setting module is configured to set feature information of nodes of an interaction graph by utilizing the embedded codes of the multi-interaction sample users, the embedded codes of the sample items and the embedded codes of the less-interaction sample users, wherein edges are determined according to the interaction information by taking the sample users and the sample items as the nodes in the interaction graph;
and the training module is configured to train the initial recommendation model based on the graph neural network by using the interaction graph to obtain the trained recommendation model.
10. A recommendation device, comprising:
the second acquisition module is configured to acquire the object to be recommended;
a recommending module configured to input the object to be recommended into a trained recommending model to obtain a recommending result, wherein the recommending model is obtained by training according to the method of any one of claims 1-7.
11. A computing device, comprising:
a memory and a processor;
the memory is for storing computer-executable instructions, and the processor is for executing the computer-executable instructions, which when executed by the processor implement the steps of the method of any one of claims 1 to 7 or 8.
12. A computer readable storage medium storing computer executable instructions which, when executed by a processor, carry out the steps of the method of any one of claims 1 to 7 or claim 8.
CN202210635074.7A 2022-06-07 2022-06-07 Recommendation model training method, recommendation method and recommendation device Active CN114925279B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210635074.7A CN114925279B (en) 2022-06-07 2022-06-07 Recommendation model training method, recommendation method and recommendation device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210635074.7A CN114925279B (en) 2022-06-07 2022-06-07 Recommendation model training method, recommendation method and recommendation device

Publications (2)

Publication Number Publication Date
CN114925279A true CN114925279A (en) 2022-08-19
CN114925279B CN114925279B (en) 2024-07-23

Family

ID=82813395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210635074.7A Active CN114925279B (en) 2022-06-07 2022-06-07 Recommendation model training method, recommendation method and recommendation device

Country Status (1)

Country Link
CN (1) CN114925279B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110046952A (en) * 2019-01-30 2019-07-23 阿里巴巴集团控股有限公司 A kind of training method and device, a kind of recommended method and device of recommended models
CN110879864A (en) * 2019-10-29 2020-03-13 南京大学 Context recommendation method based on graph neural network and attention mechanism
US10650432B1 (en) * 2016-11-28 2020-05-12 Amazon Technologies, Inc. Recommendation system using improved neural network
CN111723292A (en) * 2020-06-24 2020-09-29 携程计算机技术(上海)有限公司 Recommendation method and system based on graph neural network, electronic device and storage medium
CN112035683A (en) * 2020-09-30 2020-12-04 北京百度网讯科技有限公司 User interaction information processing model generation method and user interaction information processing method
US20210174164A1 (en) * 2019-12-09 2021-06-10 Miso Technologies Inc. System and method for a personalized search and discovery engine
CN113240490A (en) * 2021-05-18 2021-08-10 中国人民大学 Intelligent service transaction recommendation method and system based on graph neural network
US20210248449A1 (en) * 2020-02-12 2021-08-12 Jianing Sun Recommender system using bayesian graph convolution networks
US20210248513A1 (en) * 2020-09-02 2021-08-12 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for training online prediction model, device and storage medium
US20210312290A1 (en) * 2020-11-16 2021-10-07 Baidu Online Network Technology (Beijing) Co., Ltd. Method for recommending object, computing device and computer-readable storage medium
CN113538079A (en) * 2020-04-17 2021-10-22 北京金山数字娱乐科技有限公司 Recommendation model training method and device, and recommendation method and device
CN113761388A (en) * 2021-07-26 2021-12-07 清华大学 Recommendation method and device, electronic equipment and storage medium
SG11202107143QA (en) * 2020-05-27 2021-12-30 Baidu online network technology beijing co ltd Voice packet recommendation method and apparatus, device and storage medium
CN114065048A (en) * 2021-11-25 2022-02-18 西安电子科技大学 Article recommendation method based on multi-different-pattern neural network
CN114461871A (en) * 2021-12-21 2022-05-10 北京达佳互联信息技术有限公司 Recommendation model training method, object recommendation device and storage medium
CN114491263A (en) * 2022-01-27 2022-05-13 浙江大学 Recommendation model training method and device, and recommendation method and device
CN114519145A (en) * 2022-02-22 2022-05-20 哈尔滨工程大学 Sequence recommendation method for mining long-term and short-term interests of users based on graph neural network

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10650432B1 (en) * 2016-11-28 2020-05-12 Amazon Technologies, Inc. Recommendation system using improved neural network
CN110046952A (en) * 2019-01-30 2019-07-23 阿里巴巴集团控股有限公司 A kind of training method and device, a kind of recommended method and device of recommended models
CN110879864A (en) * 2019-10-29 2020-03-13 南京大学 Context recommendation method based on graph neural network and attention mechanism
US20210174164A1 (en) * 2019-12-09 2021-06-10 Miso Technologies Inc. System and method for a personalized search and discovery engine
US20210248449A1 (en) * 2020-02-12 2021-08-12 Jianing Sun Recommender system using bayesian graph convolution networks
CN113538079A (en) * 2020-04-17 2021-10-22 北京金山数字娱乐科技有限公司 Recommendation model training method and device, and recommendation method and device
SG11202107143QA (en) * 2020-05-27 2021-12-30 Baidu online network technology beijing co ltd Voice packet recommendation method and apparatus, device and storage medium
CN111723292A (en) * 2020-06-24 2020-09-29 携程计算机技术(上海)有限公司 Recommendation method and system based on graph neural network, electronic device and storage medium
US20210248513A1 (en) * 2020-09-02 2021-08-12 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for training online prediction model, device and storage medium
CN112035683A (en) * 2020-09-30 2020-12-04 北京百度网讯科技有限公司 User interaction information processing model generation method and user interaction information processing method
US20210209446A1 (en) * 2020-09-30 2021-07-08 Beijing Baidu Netcom Science And Technology Co., Ltd. Method for generating user interactive information processing model and method for processing user interactive information
US20210312290A1 (en) * 2020-11-16 2021-10-07 Baidu Online Network Technology (Beijing) Co., Ltd. Method for recommending object, computing device and computer-readable storage medium
CN113240490A (en) * 2021-05-18 2021-08-10 中国人民大学 Intelligent service transaction recommendation method and system based on graph neural network
CN113761388A (en) * 2021-07-26 2021-12-07 清华大学 Recommendation method and device, electronic equipment and storage medium
CN114065048A (en) * 2021-11-25 2022-02-18 西安电子科技大学 Article recommendation method based on multi-different-pattern neural network
CN114461871A (en) * 2021-12-21 2022-05-10 北京达佳互联信息技术有限公司 Recommendation model training method, object recommendation device and storage medium
CN114491263A (en) * 2022-01-27 2022-05-13 浙江大学 Recommendation model training method and device, and recommendation method and device
CN114519145A (en) * 2022-02-22 2022-05-20 哈尔滨工程大学 Sequence recommendation method for mining long-term and short-term interests of users based on graph neural network

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李淑芝;余乐陶;邓小鸿;李志军;: "结合Skip-gram和加权损失函数的神经网络推荐模型", 计算机工程与应用, no. 19 *

Also Published As

Publication number Publication date
CN114925279B (en) 2024-07-23

Similar Documents

Publication Publication Date Title
CN110428058B (en) Federal learning model training method, device, terminal equipment and storage medium
CN111368219B (en) Information recommendation method, device, computer equipment and storage medium
Bickel et al. A nonparametric view of network models and Newman–Girvan and other modularities
CN112035743B (en) Data recommendation method and device, computer equipment and storage medium
CN111291170B (en) Session recommendation method and related device based on intelligent customer service
CN106354856B (en) Artificial intelligence-based deep neural network enhanced search method and device
CN111008335B (en) Information processing method, device, equipment and storage medium
US11244153B2 (en) Method and apparatus for processing information
CN112925973B (en) Data processing method and device
CN113379449B (en) Multimedia resource recall method and device, electronic equipment and storage medium
CN115062732A (en) Resource sharing cooperation recommendation method and system based on big data user tag information
CN113051480A (en) Resource pushing method and device, electronic equipment and storage medium
CN112749323B (en) Method and device for constructing user portrait
CN115660116A (en) Sparse adapter-based federated learning method and system
CN110059172B (en) Method and device for recommending answers based on natural language understanding
WO2022001887A1 (en) Method and apparatus for training item coding model
CN111667018B (en) Object clustering method and device, computer readable medium and electronic equipment
EP4285292A1 (en) Distributed machine learning with new labels using heterogeneous label distribution
CN113450167A (en) Commodity recommendation method and device
CN113516524B (en) Method and device for pushing information
CN112100507B (en) Object recommendation method, computing device and computer-readable storage medium
CN115564532A (en) Training method and device of sequence recommendation model
CN114925279A (en) Recommendation model training method, recommendation method and recommendation device
CN113327145B (en) Article recommendation method and device
CN114780847A (en) Object information processing and information pushing method, device and system

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