CN113761388A - Recommendation method and device, electronic equipment and storage medium - Google Patents

Recommendation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113761388A
CN113761388A CN202110846408.0A CN202110846408A CN113761388A CN 113761388 A CN113761388 A CN 113761388A CN 202110846408 A CN202110846408 A CN 202110846408A CN 113761388 A CN113761388 A CN 113761388A
Authority
CN
China
Prior art keywords
user
item
social
information
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110846408.0A
Other languages
Chinese (zh)
Inventor
高宸
李勇
李念
金德鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
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 Tsinghua University filed Critical Tsinghua University
Priority to CN202110846408.0A priority Critical patent/CN113761388A/en
Publication of CN113761388A publication Critical patent/CN113761388A/en
Pending legal-status Critical Current

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/9536Search customisation based on social or collaborative filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/01Social networking

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Tourism & Hospitality (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention provides a recommendation method, a recommendation device, electronic equipment and a storage medium, wherein the method comprises the following steps: inputting a user item social data set into a trained item recommendation model to obtain interaction prediction information of each user and each item, wherein the user item social data set comprises at least one item of user-user social information, user-item-user influence behavior information and user-item interaction information, and the trained item recommendation model is obtained by training based on a user item social sample data set; and generating the item recommendation information of each user according to the interaction prediction information of each user and each item.

Description

Recommendation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a recommendation method and apparatus, an electronic device, and a storage medium.
Background
Recommendation systems (recommendation systems) are now used in many information services platforms, which aim to automatically recommend personalized Item (Item) lists, such as goods in e-commerce platforms, other users in social services platforms, etc., depending on the historical behavior of the User (User).
However, the recommendation method in the prior art often only considers the influence of the homogeneity in the social relationship on the user information, that is, the behavior among users with social connections is more similar to the behavior of strange users. In a real scene, the behaviors of the user (such as purchasing on an e-commerce platform) are often directly influenced by friends, which is called social influence, and the behaviors are not effectively modeled in the past social recommendation work, so that the modeling of the real behaviors of the user is inaccurate, and the recommendation is inaccurate.
Therefore, how to recommend the information is inaccurate becomes a problem to be solved in the industry.
Disclosure of Invention
The invention provides a recommendation method, a recommendation device, electronic equipment and a storage medium, which are used for solving the problem of inaccurate recommendation in the prior art.
The invention provides a recommendation method, which comprises the following steps:
inputting a user item social data set into a trained item recommendation model to obtain interaction prediction information of each user and each item, wherein the user item social data set comprises at least one item of user-user social information, user-item-user influence behavior information and user-item interaction information, and the trained item recommendation model is obtained by training based on a user item social sample data set;
and generating the item recommendation information of each user according to the interaction prediction information of each user and each item.
According to a recommendation method provided by the present invention, before the inputting the user item social data set into the trained item recommendation model, the method further comprises:
constructing a user social graph based on user-user social sample information in the user item social sample data group, and performing user interest embedding propagation according to the user social graph to obtain a target interest representation;
and constructing a user item social graph based on the user-item-user influence behavior sample information in the user item social sample data group, and performing social influence embedding propagation according to the user item social graph to obtain a target social influence representation.
According to a recommendation method provided by the present invention, before the inputting the user item social data set into the trained item recommendation model, the method further comprises:
acquiring a plurality of user-item interaction sample information and first positive and negative sample labels corresponding to the user-item interaction sample information, and acquiring a plurality of user-item-user influence behavior sample information and second positive and negative sample labels corresponding to the user-item-user influence behavior sample information;
using each piece of user-item interaction sample information and the first positive and negative sample labels as a first training sample to obtain a plurality of first training samples;
taking each user-item-user influence behavior sample information and the second positive and negative sample labels as a second training sample to obtain a plurality of second training samples;
and training a preset item recommendation model by using the plurality of first training samples and the plurality of second training samples.
According to a recommendation method provided by the present invention, the training of the preset item recommendation model by using the plurality of first training samples and the plurality of second training samples includes:
determining user item interaction prediction information of the first training sample based on the target interest characterization and the target social influence characterization so as to optimize a first loss function of a project recommendation model according to the user item interaction prediction information of the first training sample and the first positive and negative sample labels;
optimizing a second loss function of the item recommendation model based on the second training sample;
and alternately optimizing the first loss function and the second loss function, and stopping training under the condition of meeting a preset optimization condition to obtain a trained project recommendation model.
The present invention also provides a recommendation apparatus, comprising: the processing module is used for inputting a user item social data set into a trained item recommendation model to obtain interaction prediction information of each user and each item, wherein the user item social data set comprises at least one of user-user social information, user-item-user influence behavior information and user-item interaction information, and the trained item recommendation model is obtained based on user item social sample data set training;
and the recommending module is used for generating the item recommending information of each user according to the interactive predicting information of each user and each item.
According to a recommendation apparatus provided by the present invention, the apparatus further comprises: embedding a propagation module;
the embedded propagation module is used for constructing a user social graph based on user-user social sample information in the user item social sample data group, and performing user interest embedded propagation according to the user social graph to obtain a target interest representation;
and constructing a user item social graph based on the user-item-user influence behavior sample information in the user item social sample data group, and performing social influence embedding propagation according to the user item social graph to obtain a target social influence representation.
According to the recommendation device provided by the invention, the device further comprises a training module;
the training module is used for acquiring a plurality of user-item interaction sample information and first positive and negative sample labels corresponding to the user-item interaction sample information, and acquiring a plurality of user-item-user influence behavior sample information and second positive and negative sample labels corresponding to the user-item-user influence behavior sample information;
using each piece of user-item interaction sample information and the first positive and negative sample labels as a first training sample to obtain a plurality of first training samples;
taking each user-item-user influence behavior sample information and the second positive and negative sample labels as a second training sample to obtain a plurality of second training samples;
and training a preset item recommendation model by using the plurality of first training samples and the plurality of second training samples.
According to the recommendation device provided by the invention, the training module is further specifically configured to determine user item interaction prediction information of the first training sample based on the target interest characterization and the target social influence characterization, so as to optimize a first loss function of a project recommendation model according to the user item interaction prediction information of the first training sample and the first positive and negative sample labels;
optimizing a second loss function of the item recommendation model based on the second training sample;
and alternately optimizing the first loss function and the second loss function, and stopping training under the condition of meeting a preset optimization condition to obtain a trained project recommendation model.
The invention also provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned methods when executing the program.
The invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the method of recommendation as described in any of the above.
According to the recommendation method, the recommendation device, the electronic equipment and the storage medium, the influence of the social information on the item selection of the user is fully considered from the three aspects of the user-user social information, the user-item-user influence behavior information and the user-item interaction information, and the interaction prediction information between each user and the item is determined through the item recommendation model capable of fully representing the user interest and the social influence, so that the item recommendation is more accurately performed aiming at the user according to the interaction prediction information under the condition that the social influence is fully considered.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of a recommendation method provided in an embodiment of the present invention;
FIG. 2 is a diagram of a user project social relationship, according to an embodiment of the present application;
FIG. 3 is a diagram illustrating a user social graph embedding and propagating user interests according to an embodiment of the present disclosure;
FIG. 4 is a diagram illustrating embedded propagation on a U-I-U social graph according to an embodiment of the present disclosure;
FIG. 5 is a schematic diagram of a comparative learning framework provided in an embodiment of the present application;
FIG. 6 is a flowchart illustrating a recommendation process for a target user and a project using u, i according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a recommendation device according to an embodiment of the present application;
fig. 8 illustrates a physical structure diagram of an electronic device.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a schematic flow chart of a recommendation method provided in an embodiment of the present invention, as shown in fig. 1, including:
step 110, inputting a user item social data set into a trained item recommendation model to obtain interaction prediction information of each user and each item, wherein the user item social data set comprises at least one of user-user social information, user-item-user influence behavior information and user-item interaction information, and the trained item recommendation model is obtained by training based on a user item social sample data set;
the user item social database described in the present application may be specifically obtained from historical data of a user, and may filter out user information and item information with too little interaction data in the historical data, for example, filter out user information and item information with a number of interactions less than 5.
The item information described in the present application may be user commodity information, or a video link item of a social network site, or the like.
In the application, the user-user social information may specifically be data information used for representing that social influence exists between users, the user-item interaction information may refer to data information in which an interaction relationship exists between a user and an item, and the user-item-user influence behavior information may specifically refer to data information in which a user has social influence on other users on a specific item.
The trained project recommendation model described in the application can fully consider the influence of user interest and social influence on project selection of a user, so that the interactive prediction information between the user and each project can be accurately predicted, and the interactive prediction information can be a floating point type score and is used for representing the possibility of interaction between the user and the project.
And 120, generating item recommendation information of each user according to the interaction prediction information of each user and each item.
Specifically, since the interaction prediction information of each user and each item represents the possibility that the user may interact with the item, in the embodiment of the present application, K items with the largest interaction prediction information corresponding to each user may be generated as the item recommendation information of the user.
In the embodiment of the application, from the three aspects of user-user social information, user-item-user influence behavior information and user-item interaction information, the influence of the social information on the selection of the items of the user is fully considered, and the interaction prediction information between each user and each item is determined through an item recommendation model capable of fully representing the user interest and the social influence, so that the item recommendation is more accurately performed on the user according to the interaction prediction information under the condition that the social influence is fully considered.
Optionally, before the inputting the user item social data set into the trained item recommendation model, the method further comprises:
constructing a user social graph based on user-user social sample information in the user item social sample data group, and performing user interest embedding propagation according to the user social graph to obtain a target interest representation;
and constructing a user item social graph based on the user-item-user influence behavior sample information in the user item social sample data group, and performing social influence embedding propagation according to the user item social graph to obtain a target social influence representation.
Specifically, in the embodiment of the present application, in order to characterize a user-item interaction behavior and a user-user social relationship, a unified graph is first constructed according to user-item interaction information Y, user-user social information S, and user-item-user influence behavior information B as input data, fig. 2 is a user-item social relationship graph of the embodiment of the present application, as shown in fig. 2, nodes in fig. 2 are users and items, edges on the graph include an interaction behavior (u, i), where a user u interacts an item i; a social relationship (u, u '), where user u has a social connection with u'; social influencing behavior (u, u)*,i*) Here user u is about his friend u*In item i*Social influence is generated. Further, a user Social Graph and a user project Social Graph, namely a user-user (U-U Social Graph) Social Graph and a user-project-user (U-I-U Social Graph) Social Graph, are constructed to respectively model the user interest and the Social influence under the homogeneity semantics.
More specifically, user behavior is doubly influenced by both interests themselves and from social interaction. Is composed ofModeling of these two influencing factors is shown, where a decoupling embedding layer is introduced, and each factor is assigned an embedded expression separately. In particular, two embedding matrices are constructed for all users,
Figure BDA0003180899160000081
where D is the dimension of the embedding vector,
Figure BDA0003180899160000088
is the set of all users. I and S respectively represent two factors of user interest and social influence. To ensure consistency of the hidden space, two embedding matrices are constructed for the project as well,
Figure BDA0003180899160000082
here, the
Figure BDA0003180899160000083
Is a collection of all items. Thus, one-hot (one-hot) user and item codes can be converted into embedded vectors using the above-described embedding matrix.
Based on the two constructed social graphs and the introduced embedded vectors representing the interests and social influences of the users, the learning of embedded expression is carried out by using a novel graph volume operation, and then social homogeneity and social influences are captured respectively. For heterogeneous social homogeneity modeling, an attention-based embedded expression propagation mechanism is employed here for user interest learning in homogeneity semantics. For explicit modeling of social influence, here messaging is done on the path of U-I-U.
The user-user social graph contains implicit social relationships between users, i.e., there is a tendency for similar interests among friends. However, in a real scenario, the homogeneity is often heterogeneous, i.e. for a certain user, the interest similarity level between different friends is different. In view of this diverse homogeneity, attention mechanisms are used here in embedding propagation. For the target user u, the embedding propagation process is as follows:
Figure BDA0003180899160000084
wherein the content of the first and second substances,
Figure BDA0003180899160000085
is the set of friends of user u. The superscript l indicates the number of layers propagated,
Figure BDA0003180899160000086
the attention weight corresponding to the homogeneity strength between the user u' and the target user u is calculated in the manner,
Figure BDA0003180899160000087
wherein <, > refers to inner product operation.
Fig. 3 is a schematic diagram of embedding and propagating user interests in a social graph of a user according to an embodiment of the present disclosure, and as shown in fig. 3, embedded expressions for representing user interests may be obtained through multiple layers of embedding and propagating, where high-order social graph structure information is encoded.
In contrast to social homogeneity modeling, social influence modeling is not explicitly explored in many of today's algorithms. The social graph of U-I-U provides such user behavior that expresses social influence, providing the possibility for explicit influence modeling. Given a triplet (u, i, u '), the items i therein can be considered as an information propagation path, controlling how users u, u' affect each other.
A novel gating propagation rule is therefore proposed in the embodiments of the present application to model this impact mechanism. The propagation is divided into two steps, the first step is to aggregate the influence of a particular friend u' on the target user u through a number of different items, for the propagation of the l-th layer, this step is described as,
Figure BDA0003180899160000091
wherein the content of the first and second substances,
Figure BDA0003180899160000092
refers to the collection of items involved in the social influence behavior between users u and u'. W is element-by-element multiplicationlIs a linear parameter matrix, and the linear parameter matrix,
Figure BDA0003180899160000093
the attention weights corresponding to the influence strengths of the different items.
In particular, the present invention relates to a method for producing,
Figure BDA0003180899160000094
expressing the magnitude of the influence strength between the users u and u 'on the item i, wherein the first item in the above formula represents that for each influence propagation path of (u, i, u'), the related item characterization is used as a control to select which social influence is propagated; the second term represents a kind of jump connection for directly transferring information from the domain. Having obtained each friend's explicit social influence, all influences from different friends are aggregated in an attention-based manner here,
Figure BDA0003180899160000095
here, the
Figure BDA0003180899160000096
Refers to the set of all users who have a social impact on user u.
Figure BDA0003180899160000097
Is the overall influence weight of friend u'. Specifically, the weight is calculated as follows,
Figure BDA0003180899160000101
fig. 4 is a schematic diagram of embedded propagation on a U-I-U social graph provided in an embodiment of the present application, and as shown in fig. 4, embedded expressions for representing social influence can be obtained through multi-layer embedded propagation, where high-order social graph structure information is encoded.
After L times of embedding propagation of the convolutional layer, L +1 sets of user and item embedding characteristics respectively modeling user interest and social influence are obtained, wherein the characteristics initialized at the 0 th layer are included. Aggregating all layers of characteristics through mean pooling operation, and fusing classical cooperative signals to obtain target interest characteristics and target social influence characteristics which are respectively as follows:
Figure BDA0003180899160000102
Figure BDA0003180899160000103
wherein the second term in the formula is a layer of embedded aggregation on the user-item interaction graph, representing a shallow layer of collaboration signals;
Figure BDA0003180899160000104
refers to the collection of items that user u has interacted with.
In the embodiment of the application, according to the user social graph and the user project social graph, the embedded expression representing the social influence and the user interest can be obtained through multi-layer embedded propagation, and the collaborative information is fused, so that the target interest representation and the target social influence representation are obtained, the representation can be more accurately carried out, and the accuracy of subsequent model training is ensured.
Optionally, before the inputting the user item social data set into the trained item recommendation model, the method further comprises:
acquiring a plurality of user-item interaction sample information and first positive and negative sample labels corresponding to the user-item interaction sample information, and acquiring a plurality of user-item-user influence behavior sample information and second positive and negative sample labels corresponding to the user-item-user influence behavior sample information;
using each piece of user-item interaction sample information and the first positive and negative sample labels as a first training sample to obtain a plurality of first training samples;
taking each user-item-user influence behavior sample information and the second positive and negative sample labels as a second training sample to obtain a plurality of second training samples;
and training a preset item recommendation model by using the plurality of first training samples and the plurality of second training samples.
Specifically, in the embodiment of the present application, both the first training sample and the second training sample include an observed training sample and a randomly sampled training sample, and the observed training sample is generated according to historical data based on a user, which means that an interaction relationship between the user and a project actually occurs, or a user who selects the project actually occurs after receiving social influence of other users, so that the observed first training sample corresponds to a first positive sample tag, and the observed second training sample corresponds to a second positive sample tag; the randomly generated first training sample corresponds to a first negative sample label, and the randomly generated second training sample corresponds to a second negative sample label.
The training of the preset item recommendation model by using the plurality of first training samples and the plurality of second training samples comprises:
determining user item interaction prediction information of the first training sample based on the target interest characterization and the target social influence characterization so as to optimize a first loss function of a project recommendation model according to the user item interaction prediction information of the first training sample and the first positive and negative sample labels;
optimizing a second loss function of the item recommendation model based on the second training sample;
and alternately optimizing the first loss function and the second loss function, and stopping training under the condition of meeting a preset optimization condition to obtain a trained project recommendation model.
In particular, the second loss function in this application refers to a loss function that assists in contrast learning, which in fact lacks clear interpretability in order to avoid modeling social impact as performing a multi-layer convolution operation on a user-item social graph. To give more explicit, rich semantics to impact representations, contrast learning is introduced here to assist model optimization.
In particular, social influence data
Figure BDA0003180899160000128
Used as positive samples, and randomly mining negative samples for each positive sample triplet (u, u', i), including two layers: project level and friend level. The two levels are respectively used for learning and explaining which user u affects friend u 'on item i but not other items, and why user u affects friend u' through item i but not other users. Considering the multi-layer operation of convolution, the objective function to be optimized for contrast learning is,
Figure BDA0003180899160000121
Figure BDA0003180899160000122
wherein the content of the first and second substances,
Figure BDA0003180899160000123
and
Figure BDA0003180899160000124
the training sample set for comparative learning, which is two levels of projects and friends, is defined as follows,
Figure BDA0003180899160000125
Figure BDA0003180899160000126
where N is the number of negative samples for each positive sample. j, v refer to negative items and negative friends, respectively.
FIG. 5 is a schematic diagram of a comparative learning framework provided in the embodiment of the present application, and as shown in FIG. 5, for each triplet (u, u', i), a function g is usedl(u, u', i) to predict whether it is an observed socially influential behavior, defined as
Figure BDA0003180899160000127
A matching score comprising three parts. Specifically, the first item refers to the similar degree of interest of the user u and the user u ', the second item refers to the preference degree of the user u for the item i, and the third item refers to the preference degree of the user u' for the item i.
Considering the characteristics of all layers together, and considering the two layers of the project and the friends, the final loss function is,
Figure BDA0003180899160000131
by optimizing this objective function, social impact characterizations will be given rich, clear semantics.
Furthermore, function glThe output of (c) characterizes the strength of social influence between particular users u, u' through a certain item i, and is therefore used as a weight in the embedded propagation of the user item social graph, aggregating the influence through different items, which is calculated as follows,
Figure BDA0003180899160000132
for any first training sample, the magnitude of the interaction probability may be calculated using the final token vector obtained as described above,
s(u,i)=sI(u,i)+sS(u,i),
Figure BDA0003180899160000133
the first item in the formula refers to the matching degree of the user preference and the item attribute, and mainly models the user interest; the second term in the formula refers to the magnitude of the intensity that a certain user is affected by their local social circle through a particular item. The optimization function of the recommended main task employs the classical BPR method, which aims to assign a higher score to observed user-item interactions than to observed ones. The first loss function is a function of,
Figure BDA0003180899160000134
here, the
Figure BDA0003180899160000135
A first set of training samples comprising observed first training sample interactions carrying positive labels and randomly sampled first training samples carrying negative labels is included. Theta is a learnable parameter in the model, and lambda is L2And (4) regularizing the coefficient, wherein sigma is a sigmoid function. By optimizing the model in two relatively independent hidden spaces, the characterization capability of the model can be significantly improved. In other words, two main factors, namely user interest and social influence, affecting the user interaction behavior are flexibly embedded into the two sets of corresponding entity representations.
For the first loss function
Figure BDA0003180899160000141
Second loss function of auxiliary contrast learning
Figure BDA0003180899160000142
Here, model optimization is performed at the time of alternate training, and relative importance is weighed by adjusting respective learning rates. Specifically, in each training round, the data is first used
Figure BDA0003180899160000143
Batch-by-batch optimization
Figure BDA0003180899160000144
Reusing data after completion
Figure BDA0003180899160000145
Batch-by-batch optimization
Figure BDA0003180899160000146
And under the condition of meeting the preset training condition, finishing the training to finally obtain the trained project recommendation model.
In the embodiment of the application, the first loss function is trained based on the first training sample capable of fully representing social influence and user interest, and meanwhile, the model is trained in an alternate training mode by combining with the second loss function for assisting learning, so that the recommendation accuracy of the recommendation model can be effectively guaranteed.
Optionally, in the embodiment of the present application, a customized Top-K recommendation list is generated for each user by using user behavior data within a period of time, for example, within three months, and it is first necessary to collect user-item interaction data, user-user social relationship, and user-item-user social influence data within a corresponding period of time. The method comprises the steps of firstly, collecting user behavior data in corresponding time on an e-commerce and social interaction platform database, filtering out users and items (namely commodities on the two platforms) with the interaction number less than 5, and respectively carrying out sharing and group buying behaviors among the users according to corresponding social interaction influence data. According to the collected and filtered data, a user project social graph and a user social graph are constructed, and relevant data expressed in the graph comprise:
user-commodity interaction data: { (u, i)1),(u,i2),(u,i3),(u,i4),(u,i5) }, user-user social relationship: { (u, u'1),(u,u′2),(u,u′3),(u,u′4)},
User-goods-user social impact data: { (u, u'1,i1),(u,u′4,i5),(u,u′3,i2),(u,u′3,i3)}。
Firstly, initializing an embedded matrix of a user and an embedded matrix of a commodity, then carrying out user interest embedded propagation, social influence embedded propagation and aggregation according to a user item social graph and a user social graph, then fusing all layers of representations and cooperative signals to obtain a final target interest representation and a target social influence representation, and finally carrying out user-commodity scoring calculation and loss function calculation of a recommended task by using the representations
Figure BDA0003180899160000151
And loss function of contrast learning
Figure BDA0003180899160000152
The loss function calculation requires training negative samples to be sampled randomly before the start of each training round.
The system operation program is written based on the Tensor Flow, the self gradient-based back propagation algorithm is adopted for optimization, and a specific optimizer is the default Adam. And alternately optimizing the loss function. When a certain condition is met, the training is finished, the model parameters are determined, the model parameters can be used for predicting the interaction probability of any user-commodity pair, and accordingly K commodities with the maximum probability can be generated for each user to serve as a recommendation list.
In general, the dimension D of the embedded vector can be selected from 32, 64, 100, 128, the learning rate in training can be adjusted from 1e-3, 3e-4, 1e-4, 3e-5, 1e-5, 3e-6, 1e-6, L2The regularization coefficient lambda can be adjusted among {1e-2, 1e-3, 1e-4, 1e-5, 1e-6}, and the super parameters are determined by adopting a grid searching mode. It is preferable that the data specification of the training lot is set to 128 and 4096 on the e-commerce company platform database, respectively.
Figure BDA0003180899160000153
And
Figure BDA0003180899160000154
the highest recommendation can be reached when the learning rate ratio is 10: 1And (4) performance.
Fig. 6 is a flowchart of recommendation of a target user and an item by using u, i according to an embodiment of the present application, as shown in fig. 6.
The following describes the recommendation device provided by the present invention, and the recommendation device described below and the recommendation method described above can be referred to correspondingly.
Fig. 7 is a schematic structural diagram of a recommendation device provided in an embodiment of the present application, as shown in fig. 7, including: a processing module 710 and a recommendation module 720; the processing module 710 is configured to input a user item social data set into a trained item recommendation model to obtain interaction prediction information of each user and each item, where the user item social data set includes at least one of user-user social information, user-item-user influence behavior information, and user-item interaction information, and the trained item recommendation model is obtained by training based on a user item social sample data set; the recommending module 720 is configured to generate item recommendation information of each user according to the interaction prediction information of each user and each item.
Optionally, the apparatus further comprises: embedding a propagation module;
the embedded propagation module is used for constructing a user social graph based on user-user social sample information in the user item social sample data group, and performing user interest embedded propagation according to the user social graph to obtain a target interest representation;
and constructing a user item social graph based on the user-item-user influence behavior sample information in the user item social sample data group, and performing social influence embedding propagation according to the user item social graph to obtain a target social influence representation.
Optionally, the apparatus further comprises a training module;
the training module is used for acquiring a plurality of user-item interaction sample information and first positive and negative sample labels corresponding to the user-item interaction sample information, and acquiring a plurality of user-item-user influence behavior sample information and second positive and negative sample labels corresponding to the user-item-user influence behavior sample information;
using each piece of user-item interaction sample information and the first positive and negative sample labels as a first training sample to obtain a plurality of first training samples;
taking each user-item-user influence behavior sample information and the second positive and negative sample labels as a second training sample to obtain a plurality of second training samples;
and training a preset item recommendation model by using the plurality of first training samples and the plurality of second training samples.
Optionally, the training module is further specifically configured to determine user item interaction prediction information of the first training sample based on the target interest characterization and the target social influence characterization, so as to optimize a first loss function of a project recommendation model according to the user item interaction prediction information of the first training sample and the first positive and negative sample labels;
optimizing a second loss function of the item recommendation model based on the second training sample;
and alternately optimizing the first loss function and the second loss function, and stopping training under the condition of meeting a preset optimization condition to obtain a trained project recommendation model.
In the embodiment of the application, from the three aspects of user-user social information, user-item-user influence behavior information and user-item interaction information, the influence of the social information on the selection of the items of the user is fully considered, and the interaction prediction information between each user and each item is determined through an item recommendation model capable of fully representing the user interest and the social influence, so that the item recommendation is more accurately performed on the user according to the interaction prediction information under the condition that the social influence is fully considered.
Fig. 8 illustrates a physical structure diagram of an electronic device, and as shown in fig. 8, the electronic device may include: a processor (processor)810, a communication Interface 820, a memory 830 and a communication bus 840, wherein the processor 810, the communication Interface 820 and the memory 830 communicate with each other via the communication bus 840. The processor 810 may call logic instructions in the memory 830 to perform a recommendation method comprising: inputting a user item social data set into a trained item recommendation model to obtain interaction prediction information of each user and each item, wherein the user item social data set comprises at least one item of user-user social information, user-item-user influence behavior information and user-item interaction information, and the trained item recommendation model is obtained by training based on a user item social sample data set; and generating the item recommendation information of each user according to the interaction prediction information of each user and each item.
In addition, the logic instructions in the memory 830 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the recommendation method provided by the above methods, the method comprising: inputting a user item social data set into a trained item recommendation model to obtain interaction prediction information of each user and each item, wherein the user item social data set comprises at least one item of user-user social information, user-item-user influence behavior information and user-item interaction information, and the trained item recommendation model is obtained by training based on a user item social sample data set; and generating the item recommendation information of each user according to the interaction prediction information of each user and each item.
In yet another aspect, the present invention also provides a non-transitory computer-readable storage medium having stored thereon a computer program, which when executed by a processor is implemented to perform the recommendation method provided above, the method comprising: inputting a user item social data set into a trained item recommendation model to obtain interaction prediction information of each user and each item, wherein the user item social data set comprises at least one item of user-user social information, user-item-user influence behavior information and user-item interaction information, and the trained item recommendation model is obtained by training based on a user item social sample data set; and generating the item recommendation information of each user according to the interaction prediction information of each user and each item.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A recommendation method, comprising:
inputting a user item social data set into a trained item recommendation model to obtain interaction prediction information of each user and each item, wherein the user item social data set comprises at least one item of user-user social information, user-item-user influence behavior information and user-item interaction information, and the trained item recommendation model is obtained by training based on a user item social sample data set;
and generating the item recommendation information of each user according to the interaction prediction information of each user and each item.
2. The recommendation method of claim 1, wherein prior to said entering the user item social data set into the trained item recommendation model, the method further comprises:
constructing a user social graph based on user-user social sample information in the user item social sample data group, and performing user interest embedding propagation according to the user social graph to obtain a target interest representation;
and constructing a user item social graph based on the user-item-user influence behavior sample information in the user item social sample data group, and performing social influence embedding propagation according to the user item social graph to obtain a target social influence representation.
3. The recommendation method of claim 2, wherein prior to said entering the user item social data set into the trained item recommendation model, the method further comprises:
acquiring a plurality of user-item interaction sample information and first positive and negative sample labels corresponding to the user-item interaction sample information, and acquiring a plurality of user-item-user influence behavior sample information and second positive and negative sample labels corresponding to the user-item-user influence behavior sample information;
using each piece of user-item interaction sample information and the first positive and negative sample labels as a first training sample to obtain a plurality of first training samples;
taking each user-item-user influence behavior sample information and the second positive and negative sample labels as a second training sample to obtain a plurality of second training samples;
and training a preset item recommendation model by using the plurality of first training samples and the plurality of second training samples.
4. The recommendation method according to claim 3, wherein the training a preset item recommendation model using the plurality of first training samples and the plurality of second training samples comprises:
determining user item interaction prediction information of the first training sample based on the target interest characterization and the target social influence characterization so as to optimize a first loss function of a project recommendation model according to the user item interaction prediction information of the first training sample and the first positive and negative sample labels;
optimizing a second loss function of the item recommendation model based on the second training sample;
and alternately optimizing the first loss function and the second loss function, and stopping training under the condition of meeting a preset optimization condition to obtain a trained project recommendation model.
5. A recommendation device, comprising:
the processing module is used for inputting a user item social data set into a trained item recommendation model to obtain interaction prediction information of each user and each item, wherein the user item social data set comprises at least one of user-user social information, user-item-user influence behavior information and user-item interaction information, and the trained item recommendation model is obtained based on user item social sample data set training;
and the recommending module is used for generating the item recommending information of each user according to the interactive predicting information of each user and each item.
6. The recommendation device of claim 5, further comprising: embedding a propagation module;
the embedded propagation module is used for constructing a user social graph based on user-user social sample information in the user item social sample data group, and performing user interest embedded propagation according to the user social graph to obtain a target interest representation;
and constructing a user item social graph based on the user-item-user influence behavior sample information in the user item social sample data group, and performing social influence embedding propagation according to the user item social graph to obtain a target social influence representation.
7. The recommendation device of claim 6, further comprising a training module;
the training module is used for acquiring a plurality of user-item interaction sample information and first positive and negative sample labels corresponding to the user-item interaction sample information, and acquiring a plurality of user-item-user influence behavior sample information and second positive and negative sample labels corresponding to the user-item-user influence behavior sample information;
using each piece of user-item interaction sample information and the first positive and negative sample labels as a first training sample to obtain a plurality of first training samples;
taking each user-item-user influence behavior sample information and the second positive and negative sample labels as a second training sample to obtain a plurality of second training samples;
and training a preset item recommendation model by using the plurality of first training samples and the plurality of second training samples.
8. The recommendation device according to claim 7, wherein the training module is further configured to determine user item interaction prediction information of the first training sample based on the target interest characterization and the target social influence characterization, so as to optimize a first loss function of an item recommendation model according to the user item interaction prediction information of the first training sample and the first positive and negative sample labels;
optimizing a second loss function of the item recommendation model based on the second training sample;
and alternately optimizing the first loss function and the second loss function, and stopping training under the condition of meeting a preset optimization condition to obtain a trained project recommendation model.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method as claimed in any one of claims 1 to 4 are implemented when the program is executed by the processor.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the recommendation method according to any one of claims 1 to 4.
CN202110846408.0A 2021-07-26 2021-07-26 Recommendation method and device, electronic equipment and storage medium Pending CN113761388A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110846408.0A CN113761388A (en) 2021-07-26 2021-07-26 Recommendation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110846408.0A CN113761388A (en) 2021-07-26 2021-07-26 Recommendation method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113761388A true CN113761388A (en) 2021-12-07

Family

ID=78787944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110846408.0A Pending CN113761388A (en) 2021-07-26 2021-07-26 Recommendation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113761388A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114241264A (en) * 2021-12-17 2022-03-25 深圳尚米网络技术有限公司 User discrimination model training method, user discrimination method and related device
CN114925279A (en) * 2022-06-07 2022-08-19 支付宝(杭州)信息技术有限公司 Recommendation model training method, recommendation method and recommendation device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114241264A (en) * 2021-12-17 2022-03-25 深圳尚米网络技术有限公司 User discrimination model training method, user discrimination method and related device
CN114925279A (en) * 2022-06-07 2022-08-19 支付宝(杭州)信息技术有限公司 Recommendation model training method, recommendation method and recommendation device

Similar Documents

Publication Publication Date Title
CN111611472A (en) Binding recommendation method and system based on graph convolution neural network
CN109102127B (en) Commodity recommendation method and device
US9152969B2 (en) Recommendation ranking system with distrust
US20230153857A1 (en) Recommendation model training method, recommendation method, apparatus, and computer-readable medium
WO2021139524A1 (en) Method and apparatus for processing interaction data by using lstm neural network model
CN113256367B (en) Commodity recommendation method, system, equipment and medium for user behavior history data
CN111695965B (en) Product screening method, system and equipment based on graphic neural network
CN113379494B (en) Commodity recommendation method and device based on heterogeneous social relationship and electronic equipment
CN115270001B (en) Privacy protection recommendation method and system based on cloud collaborative learning
CN113761388A (en) Recommendation method and device, electronic equipment and storage medium
Le et al. A multi-criteria collaborative filtering approach using deep learning and Dempster-Shafer theory for hotel recommendations
WO2023284516A1 (en) Information recommendation method and apparatus based on knowledge graph, and device, medium, and product
Ahamed et al. A recommender system based on deep neural network and matrix factorization for collaborative filtering
CN113674013A (en) Advertisement bidding adjustment method and system based on merchant self-defined rules
Papageorgiou et al. Participatory modelling for poverty alleviation using fuzzy cognitive maps and OWA learning aggregation
Cao et al. Personalized next-best action recommendation with multi-party interaction learning for automated decision-making
WO2021139513A1 (en) Method and apparatus for processing interaction sequence data
CN117669688A (en) Label inference in split learning defense
CN115809374B (en) Method, system, device and storage medium for correcting mainstream deviation of recommendation system
CN116204723A (en) Social recommendation method based on dynamic hypergraph representation learning
CN115599990A (en) Knowledge perception and deep reinforcement learning combined cross-domain recommendation method and system
CN115344794A (en) Scenic spot recommendation method based on knowledge map semantic embedding
CN114936901A (en) Visual perception recommendation method and system based on cross-modal semantic reasoning and fusion
Quesada et al. Using computing with words for managing non-cooperative behaviors in large scale group decision making
CN115516473A (en) Hybrid human-machine learning 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