Model training method, device, electronic device and storage medium

By constructing a cross-domain comparison recommendation model, using graph connection relationships and contrast learning technology, the problems of data sparseness and popularity bias in traditional methods are solved, and the diversity of recommendation results and the reliability of knowledge representation are improved.

CN114281976BActive Publication Date: 2024-11-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202110995198.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-27
Publication Date
2024-11-19
Estimated Expiration
2041-08-27

AI Technical Summary

Technical Problem

Traditional cross-domain recommendation methods in cold start and non-popular fields have low diversity in recall results and the reliability of knowledge representations, and cannot effectively convey the different preferences of the objects.

Method used

By constructing a cross-domain comparison recommendation model, the attribute feature vector is extracted using graph connection relationships, the sub-loss values ​​are calculated and the model parameters are adjusted, and the diversity and reliability of knowledge representations are enhanced by combining intra-domain and inter-domain comparison learning.

Benefits of technology

It improves the diversity and recall performance of recommended results, alleviates the problems of data sparseness and popularity bias, and enhances the stability and effectiveness of knowledge transfer between different fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114281976B_ABST
    Figure CN114281976B_ABST
Patent Text Reader

Abstract

The present application provides a model training method, device, electronic device and storage medium. The method performs at least one iterative training on a cross-domain comparative recommendation model to be trained based on an acquired sample graph set to obtain a target cross-domain comparative recommendation model, wherein the sample graph set includes: sample graphs constructed based on multiple set attribute information and multiple sample recommendation texts in a source domain and a target domain, respectively, and a sample graph obtained by expanding the sample graph corresponding to the target domain, thereby alleviating the problems of data sparsity and popularity bias, enhancing cross-domain connections, and thereby improving the diversity of recall results; when determining the sub-loss value in each round of iteration, intra-domain comparative learning is performed on each set attribute information in the sample graph before and after the expansion, so as to improve the reliability representation of each set attribute information in the recall process, thereby improving the recall performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology and discloses a model training method, device, electronic device and storage medium. Background Art

[0002] Personalized recommendation is to recommend content of interest to the subject based on his / her profile and historical behavior, and has been widely used in various fields of life. At present, recommendation systems usually adopt a two-stage architecture of recall and recommendation. Recall is used to generate candidate texts for recommendation, aiming to efficiently retrieve some (usually hundreds) personalized high-quality content from a large corpus. The result of recall determines the input of sorting, so recall pays more attention to the diversity of recommendation results than sorting.

[0003] In the actual recommendation process, the behavior of the object reflects the object's preference. If the content that the object is interested in is pushed only based on the object's preference, the content browsed by the object will be limited to a single field, forming a cocoon effect. To solve this problem, most current recommendation systems use cross-domain recommendation methods.

[0004] Cross-domain Recommendation (CDR) methods transfer knowledge learned from different source domains to the target domain to balance the recommendation results. A good CDR recall should comprehensively convey the different preferences of objects from different target domains.

[0005] However, in traditional CDR recall, the knowledge transfer between the source domain and the target domain is highly dependent on objects and object behaviors. For cold-start fields with fewer object behaviors and non-popular fields with low content exposure, due to data sparsity and popularity bias, the recall results rarely include content from these fields, reducing the diversity of recommendation results; in addition, considering that object behaviors are limited and cannot involve all fields, the correlation information between different fields cannot be fully learned, and the reliability of knowledge representation is poor. Summary of the invention

[0006] The embodiments of the present application provide a model training method, device, electronic device and storage medium to improve the reliability of knowledge representation in the recall stage, thereby improving the diversity of recommendation results.

[0007] In a first aspect, an embodiment of the present application provides a training method for a cross-domain comparison recommendation model, including:

[0008] Obtaining a sample graph set; the sample graph set includes: sample graphs constructed based on multiple set attribute information and multiple sample recommendation texts in the source domain and the target domain, respectively, and a sample graph obtained by expanding the sample graph corresponding to the target domain;

[0009] Based on the sample graph set, the cross-domain comparative recommendation model to be trained is iterated for at least one time to obtain a target cross-domain comparative recommendation model, wherein in each iteration, the following operations are performed:

[0010] Adopting the cross-domain comparative recommendation model to be trained, based on the graph connection relationship between the set attribute information corresponding to each of the extracted sample graphs, respectively extracting the attribute feature vectors of each of the set attribute information corresponding to each of the sample graphs; wherein each of the set attribute information realizes graph connection through the associated sample recommendation text;

[0011] Based on the obtained attribute feature vectors corresponding to the respective set attribute information of the respective sample graphs, respectively calculating the sub-loss values ​​of the respective set attribute information in the corresponding domains;

[0012] Based on the obtained sub-loss values, a target loss value is determined, and parameters of the cross-domain comparison recommendation model to be trained are adjusted based on the target loss value.

[0013] In a second aspect, an embodiment of the present application provides a recommendation device, including:

[0014] A sample acquisition module, used to acquire a sample graph set; the sample graph set includes: sample graphs constructed based on multiple set attribute information and multiple sample recommendation texts in the source domain and the target domain, and a sample graph obtained by expanding the sample graph corresponding to the target domain;

[0015] A model training module, used to perform at least one iterative training on the cross-domain comparison recommendation model to be trained based on the sample atlas set to obtain a target cross-domain comparison recommendation model; wherein the model training module includes a feature extraction unit, a loss value calculation unit, and a parameter adjustment unit;

[0016] During each iteration:

[0017] The feature extraction unit is used to use the cross-domain comparative recommendation model to be trained to extract attribute feature vectors of each set attribute information corresponding to each sample graph based on the graph connection relationship between each set attribute information corresponding to each extracted sample graph; wherein each set attribute information realizes graph connection through the associated sample recommendation text;

[0018] The loss value calculation unit is used to calculate the sub-loss value of each set attribute information in the corresponding domain based on the attribute feature vector corresponding to each set attribute information of each of the obtained sample graphs;

[0019] The parameter adjustment unit is used to determine a target loss value based on the obtained sub-loss values, and to adjust the parameters of the cross-domain comparison recommendation model to be trained based on the target loss value.

[0020] Optionally, a sample map building module is also included, which is used to:

[0021] For each sample domain, the following operations are performed respectively: each set attribute information in a sample domain is used as a corresponding graph node, and the sample recommendation texts connected by the each set attribute information in the sample domain are used as corresponding graph edges, and based on each node and the graph edges connecting the each node, a sample graph corresponding to the sample domain is constructed; wherein the sample domain is the source domain or the target domain.

[0022] Optionally, the sample map building module is also used to:

[0023] Deleting at least one node in the sample graph corresponding to the one sample domain;

[0024] Delete at least one edge in the sample graph corresponding to the sample domain.

[0025] Optionally, the feature extraction unit is specifically used to:

[0026] For each set attribute information in one of the sample graphs, the following operations are performed respectively:

[0027] Determining, according to the sample recommendation text connected to a piece of setting attribute information, a set of adjacent setting attribute information corresponding to the piece of setting attribute information;

[0028] respectively determining the similarity between each adjacent setting attribute information in the adjacent setting attribute information set and the one setting attribute information;

[0029] According to each determined similarity, respectively determine a multi-head attention coefficient of corresponding adjacent set attribute information and the one set attribute information;

[0030] According to the determined multi-head attention coefficients, the attribute feature vectors of the adjacent set attribute information are weighted to obtain the attribute feature vector of the one set attribute information.

[0031] Optionally, the loss value calculation unit is specifically used to:

[0032] For each set attribute information in the non-expanded first-category sample map, the following operations are performed respectively:

[0033] Determine a sub-loss value of the one set attribute information in the corresponding sample domain according to the similarity between the attribute feature vector of the one set attribute information and the attribute feature vector of the adjacent set attribute information, and the similarity between the attribute feature vector of the one set attribute information and the attribute feature vector of the non-adjacent set attribute information; and

[0034] For each set attribute information in the expanded second type sample map, the following operations are performed respectively:

[0035] Based on the similarity between an attribute feature vector of a set attribute information and an attribute feature vector of the corresponding set attribute information in the sample map before expansion, and the similarity between the attribute feature vector of the corresponding set attribute information and the attribute feature vectors of non-adjacent set attribute information of the set attribute information, the sub-loss value of the set attribute information in the corresponding sample domain is determined.

[0036] Optionally, the loss value calculation unit is further used to:

[0037] Based on the attribute feature vectors of each set attribute information in the sample graphs corresponding to the source domain and the target domain, a sub-loss value between the source domain and the target domain is calculated.

[0038] Optionally, the sample atlas includes at least a first sample atlas corresponding to the source domain and a second sample atlas corresponding to the target domain; and the loss value calculation unit is specifically used to:

[0039] Calculating a first loss value between the source domain and the target domain based on attribute feature vectors of the same set attribute information in the first sample map and the second sample map;

[0040] Calculating a second loss value between the source domain and the target domain based on attribute feature vectors of adjacent set attribute information in the first sample graph and the second sample graph;

[0041] A sub-loss value between the source domain and the target domain is determined according to the first loss value and the second loss value.

[0042] Optionally, the loss value calculation unit is specifically used to:

[0043] Determine a first loss value between the source domain and the target domain based on the similarity between the attribute feature vectors of the same set attribute information in the first sample graph and the second sample graph, and the similarity between the attribute feature vectors of the same set attribute information in the first sample graph and the attribute feature vectors of the set attribute information that are not adjacent to the same set attribute information in the second sample graph;

[0044] The loss value calculation unit is specifically used for:

[0045] Determine a set of adjacent setting attribute information of target setting attribute information in the second sample graph, wherein the target setting attribute information is the same setting attribute information in the first sample graph and the second sample graph;

[0046] A second loss value between the source domain and the target domain is determined based on the similarity between the attribute feature vectors of the target setting attribute information in the first sample graph and the attribute feature vectors of the adjacent setting attribute information in the adjacent setting attribute information set, and the similarity between the attribute feature vectors of the target setting attribute information in the first sample graph and the attribute feature vectors of the setting attribute information that does not belong to the adjacent setting attribute information set in the second sample graph.

[0047] Optionally, the recommendation device further includes:

[0048] A response module, configured to respond to a recommendation request sent by a target object and obtain a set of recommended texts corresponding to the target object;

[0049] An acquisition module, configured to adopt a target cross-domain comparison recommendation model to obtain a plurality of target recommended texts belonging to a plurality of fields based on each recommended text in the recommended text set and the set attribute information connected to each recommended text;

[0050] A display module is used to display the multiple target recommendation texts to the target object.

[0051] In an embodiment of the present application, a sample graph is constructed based on multiple set attribute information and multiple sample recommendation texts in a source domain and a target domain respectively, and each set attribute information is connected by a graph through an associated sample recommendation text, thereby obtaining a knowledge representation reflecting different interests of the object, and the sample graph corresponding to the target domain is expanded to obtain an expanded sample graph, thereby achieving a more balanced and effective knowledge representation in the target domain; in each round of model iterative training, a cross-domain comparative recommendation model to be trained is adopted, and based on the graph connection relationship between each set attribute information corresponding to each extracted sample graph, attribute feature vectors of each set attribute information corresponding to each sample graph are extracted respectively; based on each attribute feature vector corresponding to each obtained sample graph, sub-loss values ​​of each set attribute information in the corresponding domain are calculated respectively, and based on each obtained sub-loss value, a target loss value is determined, and parameters of the cross-domain comparative recommendation model to be trained are adjusted based on the target loss value. By expanding the sample graph, the problems of sample sparsity and popularity bias in recall can be alleviated, the reliability of knowledge representation can be improved, and the recall performance can be improved; and because the sample graph reflects the object's interests in different fields through multiple set attribute information, the diversity of recommended content can be improved when making recommendations based on the trained target cross-domain comparison recommendation model. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] Figure 1A A schematic diagram of the structure of a cross-domain comparison recommendation system is provided for an embodiment of the present application;

[0053] Figure 1B A schematic diagram of the structure of a cross-domain comparison recommendation system is provided for an embodiment of the present application;

[0054] Figure 2A A sample map provided in an embodiment of the present application;

[0055] Figure 2B A schematic diagram of an expanded sample map provided in an embodiment of the present application;

[0056] Figure 2C A schematic diagram of another expanded sample map provided in an embodiment of the present application;

[0057] Figure 3A A flowchart for obtaining a cross-domain comparison recommendation model provided for an application embodiment;

[0058] Figure 3B A flowchart of each round of model training provided in an embodiment of the present application;

[0059] Figure 3C A flowchart of extracting attribute feature vectors provided in an embodiment of the present application;

[0060] Figure 3DA flow chart for calculating the single domain and intra-domain sub-loss values ​​provided in the embodiment of the present application;

[0061] Figure 3E A flow chart for calculating the inter-domain sub-loss value provided in an embodiment of the present application;

[0062] Figure 4A A partial graph structure of a node in a sample graph corresponding to a set attribute information provided in an embodiment of the present application;

[0063] Figure 4B A relationship diagram between sample graphs before and after expansion provided in an embodiment of the present application;

[0064] Figure 4C A schematic diagram of inter-domain comparative learning provided in an embodiment of the present application;

[0065] Figure 5 An overall schematic diagram of the cross-domain comparison recommendation model training provided in an embodiment of the present application;

[0066] Fig. 6A A flow chart of the cross-domain comparison recommendation method provided in an embodiment of the present application;

[0067] Figure 6B A schematic diagram of the cross-domain comparison recommendation process provided in an embodiment of the present application;

[0068] Figure 7 A recommended device structure diagram provided for an embodiment of the present application;

[0069] Figure 8 A structural diagram of an electronic device provided in an embodiment of the present application;

[0070] Fig. 9 A structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0071] In order to better understand the technical solution provided by the embodiments of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0072] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0073] In order to help those skilled in the art better understand the technical solution of the present application, the basic concepts involved in the present application are explained below.

[0074] Matthew effect: a polarization phenomenon that exists. In the embodiments of the present application, it means that more popular content is more recommended, and less popular content is less recommended.

[0075] Source domain: contains recommended texts in multiple fields, such as film and television, shopping, news, sports, etc.

[0076] Target domain: It also contains recommendation texts from multiple fields. The object behaviors corresponding to the recommendation texts in the target domain are less than those in the source domain.

[0077] Cross-domain recommendation: Transfer the knowledge learned in the source domain to the target domain for recommendation.

[0078] At present, the CDR recall stage realizes knowledge transfer by learning the knowledge representation of the source domain and the target domain respectively, and then constructing a mapping function based on the aligned objects and their behavior representations. It mainly faces the following challenges:

[0079] 1) When modeling the interaction between millions of objects and recommended texts, there is usually a serious data sparsity problem because objects have less interaction with recommended texts in the cold start domain and lack object behavior. In addition, due to the Matthew effect, sample data is more biased towards popular recommended texts with high exposure, which makes popular recommended texts even more popular, resulting in long-tail recommended texts. In this way, the constructed model inevitably damages the recommendation probability of cold start domains and long-tail recommended texts, and the damage will even increase exponentially with the increase of recall level.

[0080] 2) Since the alignment of the source domain and the target domain depends on the representation of objects and their behaviors, the model cannot learn reliable knowledge representation for cold-start domains with less interaction between objects and recommended texts, and the recall performance of CDR is reduced. In addition, in CDR, only objects and their behaviors are used to associate recommended texts in different fields, resulting in low stability and effectiveness of knowledge transfer in cross-domain recommendations.

[0081] 3) Diversity is an important indicator for evaluating recall results, but the stability and effectiveness of knowledge transfer between the source domain and the target domain are low, and the preferences of objects in different target domains cannot be comprehensively transferred, which reduces the diversity of recommendation results.

[0082] In order to solve the above problems, the embodiments of the present application provide a training device, electronic device and storage medium for a cross-domain comparison recommendation model. Specifically, based on the interaction between multiple set attribute information and multiple sample recommendation texts, sample graphs corresponding to the source domain and the target domain are respectively constructed to enhance cross-domain connections to solve the problems of data sparsity and popularity bias, and a graph neural network aggregator is used to learn the interests of objects in different fields based on the similarity loss between adjacent set attribute information in a single sample domain, thereby improving the diversity of recall results.

[0083] In order to strengthen cross-domain knowledge transfer, an embodiment of the present application provides a cross-domain contrastive recommendation (Contrastive Cross-Domain Recommendation, CCDR) method for intra-domain contrastive learning (intra-CL) and inter-domain contrastive learning (inter-CL). Among them, intra-CL performs additional self-supervised learning based on the expanded sample graph to learn more reliable knowledge representation in the target domain, thereby improving CDR recall performance. Inter-CL designs three contrastive learning tasks, which respectively perform cross-domain mapping of the source domain and the target domain based on behavioral objects, semantic information, and adjacent nodes, realize multi-channel cross-domain recall, and maximize the interactive information between different types of set attribute information, thereby improving the effectiveness and stability of cross-domain knowledge transfer.

[0084] At the same time, under the framework of multi-task learning (MTL), the embodiments of the present application combine all or part of the recall loss of the source domain, the recall loss of the target domain, the intra-domain recall loss and the inter-domain recall loss, thereby further improving the diversity of the recommendation results.

[0085] In order to more clearly understand the design concept of the present application, the application scenarios of the embodiments of the present application are introduced as follows.

[0086] Figure 1A A schematic diagram of the structure of a cross-domain comparison recommendation system is provided for an embodiment of the present application; Figure 1AAs shown, the application scenario may include at least a processing device 10 (eg, a smart terminal 100) and a server 200. The smart terminal 100 may include but is not limited to Figure 1A The server 200 may be a standalone server, or a server cluster or distributed service system composed of multiple servers (200-1, 200-2, ...). The embodiment of the present application does not impose any restrictions on the types and numbers of smart terminals and servers.

[0087] like Figure 1A As shown, a recommendation application 110 may be installed on the smart terminal 100, which may include but is not limited to Figure 1A The application 110-1 or the application 110-2 in the smart recommendation system, etc. The server 200 is installed with the server-side application of the intelligent recommendation system. The target cross-domain comparison recommendation model provided by the embodiment of the present application is deployed on the application of the smart terminal 100. The server 200 can obtain the recommended text required by the smart device 100 by accessing the database 300, such as statistical data, text, text index, etc., and send it to the smart device 100 via the network 400, and the smart terminal 100 displays it to the target object. Among them, the network 30 can be a network for information transmission in a broad sense, and can include one or more communication networks, such as a wireless communication network, the Internet, a private area network, a local area network, a metropolitan area network, a wide area network or a cellular data network.

[0088] This embodiment of the application also provides a structural diagram of another cross-domain comparison recommendation system, see Figure 1B The system includes a smart terminal 100 and a processing device 10 (e.g., a server 200). The server 200 is deployed with a target cross-domain comparison recommendation model provided by an embodiment of the present application, which obtains the recommended text required by the smart device 100 by accessing the database 300, and returns it to the smart terminal 100, which is then displayed to the target object.

[0089] It should be noted that Figure 1A and Figure 2B The database 300 in the example stores sample recommendation texts in different fields, and each sample recommendation text is associated with at least one set attribute information.

[0090] In the following description, only a single server or terminal device is described in detail, but those skilled in the art should understand that the single intelligent terminal 100, server 200 and database 300 shown are intended to indicate that the technical solution of the present application involves operations of the terminal device, server and database. The single intelligent terminal and the single server and database are described in detail at least for the convenience of explanation, and do not imply any limitation on the type or location of the intelligent terminal and the server.

[0091] based on Figure 1A and Figure 1B In view of the application scenario, the target cross-domain comparison recommendation model involved in the embodiments of the present application is described in detail below.

[0092] In the embodiment of the present application, a sample graph set required for the target cross-domain comparison recommendation model is first constructed. For each sample domain, the following operations are performed respectively: each set attribute information in a sample domain is used as a corresponding graph node, each sample recommendation text connected by each set attribute information in a sample domain is used as a corresponding graph edge, and a sample graph corresponding to a sample domain is constructed based on each node and the graph edge connecting each node.

[0093] Optionally, the attribute information is set to be multiple key nodes reflecting different interests of the object, such as behavior object, recommended text, text label, text category, publishing media and keywords. Specifically, the behavior object is a group of objects clustered together according to the basic portrait of the object. The objects in the same object group have the same gender, age group, and region. The behavior object alleviates data sparsity and accelerates offline training. The text label represents the object's fine-grained interest in the sample recommended text, the text category represents the object's coarse-grained interest in the sample recommended text, the publishing media represents the producer of the sample recommended text, and the keyword describes the semantic information extracted from the title or content of the sample recommended text.

[0094] The same sample recommendation text may have multiple set attribute information, and the nodes of each sample domain are connected through the sample recommendation text. The graph edge of a sample graph specifically includes:

[0095] For a sample recommendation text connected to a behavior object node (referred to as a UI edge), if the number of times a sample recommendation text is interacted by an object group is greater than a set threshold (for example, 3 times), a UI edge is constructed. In addition, when constructing the UI edge, different weights corresponding to the interaction behaviors of multiple objects in an object group (such as browsing, clicking, purchasing, sharing, liking, etc.) are considered;

[0096] A sample recommendation text connected to a sample recommendation text (referred to as an II edge for short) is constructed if two sample recommendation texts appear in adjacent positions (i.e., in context) in a session, which can reflect the behavior order information of the objects in the session;

[0097] The sample recommendation text connected to the text label (referred to as TI edge) reflects the fine-grained classification information of the sample recommendation text;

[0098] The sample recommendation text connected to the text category (referred to as CI edge) reflects the coarse-grained classification information of the sample recommendation text;

[0099] The sample recommendation text connected to the publishing media (referred to as MI edge) associates the sample recommendation text with its content producer or publishing platform;

[0100] The sample recommendation text connected to the topic word (abbreviated as WI edge) is used to reflect the semantic information of the sample recommendation text.

[0101] In the sample graph of the embodiment of the present application, each graph edge is undirected, and the number of edges can be weighted according to the type and importance of the edge, for example, the count of UI edges. Compared with the traditional UI graph constructed based on object behavior and sample recommendation text, the sample graph of the embodiment of the present application is based on different types of heterogeneous nodes and edges, describing the object's preference for sample recommendation text from different perspectives, and by introducing other heterogeneous information (such as II edges, TI edges, CI edges, MI edges, WI edges) as a supplement to the UI, the accuracy and reliability of the knowledge representation in different fields are improved, and the potential association information between different fields is established through multiple set attribute information, thereby improving the diversity of knowledge representation in different fields.

[0102] Figure 2A A sample map provided by an embodiment of the present application is exemplified. Figure 2A As shown, circles represent nodes of the sample graph, and thin solid lines represent sample edges of the graph. Specifically, 5 people in "Object Group 1" shared sample recommendation text 1, 12 people liked sample recommendation text 1, and 8 people liked sample recommendation text 2. The coarse-grained classification information corresponding to sample recommendation text 1 is "sports competition", and the fine-grained classification information corresponding to sample recommendation text 1 is "volleyball". The fine-grained classification information corresponding to sample recommendation text 2 is "volleyball". 4 people in "Object Group 2" liked sample recommendation text 3, and the fine-grained classification information corresponding to sample recommendation text 3 is "volleyball". 3 people in "Object Group 3" shared sample recommendation For text 4, 15 people liked sample recommendation text 4, 2 people shared sample recommendation text 5, and 2 people liked sample recommendation text 5. The fine-grained classification information corresponding to sample recommendation text 4 is "gymnastics", and the coarse-grained classification information corresponding to sample recommendation text 4 is "sports competition". The fine-grained classification information corresponding to sample recommendation text 5 is "actor". The object "gymnastics" in sample recommendation text 6 became an "actor" after retiring. Six people in "object group 4" liked sample recommendation text 7. The keyword in sample recommendation texts 8 and 9 is "team competition".

[0103] The sample domain in the above embodiment of the present application includes at least a source domain and a target domain. Among them, the object behaviors corresponding to the sample recommendation text in the source domain are more than the object behaviors corresponding to the sample recommendation text in the target domain. In order to improve the reliability of the connection knowledge between nodes, the sample graph corresponding to the target domain is expanded to obtain an expanded sample graph. Specifically, the expanded sample graph can be obtained by at least one of the following methods:

[0104] Delete at least one node in the sample graph corresponding to a sample domain (target domain);

[0105] Delete at least one edge in the sample graph corresponding to a sample domain (target domain).

[0106] For example, Figure 2A For example, delete the sample recommendation text 1 between the "volleyball" node and the "sports competition" node, the sample recommendation text 5 between the "swimming" node and the "sports competition" node, and the sample recommendation text 6 between the "actor" node and the "gymnastics" node, and get the expanded sample graph, such as Figure 2B shown.

[0107] For example, Figure 2A Take the “Team Competition” node as an example, and delete the edges associated with the node, i.e., sample recommendation texts 8 and 9, to obtain the expanded sample graph, as shown in Figure 2C shown.

[0108] Based on the sample graphs corresponding to the source domain, the sample graphs corresponding to the target domain, and the expanded sample graphs contained in the sample graph set, the cross-domain comparative recommendation model to be trained is iteratively trained. For the training process, see Figure 3A :

[0109] S301: The processing device obtains a sample atlas set.

[0110] In S301, the sample graph set includes a sample graph constructed based on multiple set attribute information and multiple sample recommendation texts in the source domain, a sample graph constructed based on multiple set attribute information and multiple sample recommendation texts in the target domain, and a sample graph obtained by expanding the sample graph corresponding to the target domain. The setting of the set attribute information and the construction process of the sample graph refer to the above embodiment and will not be repeated here.

[0111] S302: The processing device performs at least one iterative training on the cross-domain comparison recommendation model to be trained based on the sample atlas set to obtain a target cross-domain comparison recommendation model.

[0112] In S302, the processing device performs multiple rounds of training on the cross-domain comparison recommendation model to be trained based on each sample graph in the sample graph set, stops training when the target loss value of the model is not greater than the preset convergence threshold, and uses the cross-domain comparison recommendation model output in the last round as the target cross-domain comparison recommendation model. Since the sample graphs in the sample graph set contain other heterogeneous interaction information in addition to the UI edge, the cross-domain connectivity is stronger, so as to learn the interests of the object in different fields, thereby solving the problems of data sparsity and popularity bias and improving the diversity of recall results; and in each round of training, in addition to considering the loss of nodes in the source domain and the target domain, the (target domain) inter-domain loss is calculated by comparing the sample graphs corresponding to the target domain before and after expansion, so as to learn a more reliable knowledge representation in the target domain, thereby improving the CDR recall performance.

[0113] In specific implementation, each round of training of the target cross-domain comparison recommendation model includes the following steps. Figure 3B :

[0114] S3021: The processing device adopts the cross-domain comparison recommendation model to be trained, and based on the graph connection relationship between the set attribute information corresponding to each extracted sample graph, respectively extracts the attribute feature vectors of each set attribute information corresponding to each sample graph.

[0115] In S3021, FIG. 2A to FIG. 2C As shown in the sample graph, each set attribute information in a sample graph is connected through the associated sample recommendation text. That is, a sample recommendation text connects two adjacent nodes in a sample graph. For any node i corresponding to a set attribute information in a sample graph, the adjacent node set N of the node i , constitutes the graph structure relationship feature, and combined with the attribute feature vector of the set attribute information itself, the attribute feature vector of the set attribute information can be extracted.

[0116] In the embodiment of the present application, Graph Attention Networks (GAT) is used as the aggregator of GNN to extract the attribute feature vector of each set attribute information. The following takes any set attribute information in one of the sample graphs as an example to describe the attribute feature vector extraction process, see Figure 3C :

[0117] S3021_1: The processing device determines a set of adjacent setting attribute information corresponding to the setting attribute information according to a sample recommendation text connected to the setting attribute information.

[0118] In S3021_1, two set attribute information are associated with the same sample recommendation text, indicating that the two set attribute information are adjacent, which is shown in the sample graph, that is, the nodes corresponding to the two set attribute information are connected by an edge. One set attribute information can be adjacent to multiple set attribute information through multiple sample recommendation texts, and multiple set attribute information constitutes a set of adjacent set attribute information.

[0119] Figure 4A is a partial graph structure of a node i in a sample graph corresponding to a set attribute information; Figure 4A As shown, the adjacent attribute information set N corresponding to node i i Contains multiple nodes, in Figure 4A In the example, the node k in the adjacent attribute information set is the adjacent node of node i; since there is no common edge between node j and node i (such as the sample recommendation text represented by the dotted line), node j does not belong to N i , therefore, node j is a non-neighboring node of node i. Figure 4A Indicated by a hollow circle with a dotted line.

[0120] S3021_2: The processing device determines the similarity between each piece of adjacent setting attribute information in the adjacent setting attribute information set and one setting attribute information.

[0121] In S3021_2, taking the determination of the similarity between any adjacent setting attribute information in the adjacent setting attribute information set and the setting attribute information as an example, the calculation formula is as follows:

[0122]

[0123] Where x represents the number of network layers, W represents the shared parameters of layer x, which is used to increase the dimension of node features through linear mapping, and [·||·] represents the attribute feature vector e of node i. i and the attribute feature vector e of node k k After the dimension increase, the concatenation is performed. a(·) represents a function based on a single layer feed forward neural network that maps the concatenated high-dimensional attribute feature vector to a real number. is the similarity between the attribute information corresponding to node i and node k in layer x, The larger it is, the stronger the correlation between node i and node k is.

[0124] Optionally, the value of x in the embodiment of the present application is 2.

[0125] S3021_3: The processing device determines the multi-head attention coefficients of the corresponding adjacent set attribute information and one set attribute information respectively according to the determined similarities.

[0126] In S3021_3, taking the multi-head attention coefficient between the set attribute information corresponding to node i and node k and the adjacent set attribute information as an example, the similarity is obtained. Finally, the nonlinear function LeakyReLU is used to determine multiple attention coefficients And normalized, the multi-head attention coefficient formula is:

[0127]

[0128] S3021_4: The processing device weights the attribute feature vectors of each adjacent set attribute information according to the determined multi-head attention coefficients to obtain an attribute feature vector of the set attribute information.

[0129] In S3021_4, the attribute feature vector of the set attribute information corresponding to the weighted node i is expressed as:

[0130]

[0131] Where σ represents the LeakyReLU activation function.

[0132] It should be noted that the embodiment of the present application does not impose any restrictive requirements on the type of GNN aggregator used in S3021_1 to S3021_4. For example, a graph convolution neural network (GCN) or a graph sample and aggregate (GraphSAGE) model may also be used.

[0133] S3022: The processing device calculates the sub-loss value of each set attribute information in the corresponding domain based on the attribute feature vector corresponding to each set attribute information of each obtained sample spectrum.

[0134] Since the sample recommendation text in the (cold start) target domain has less historical behavior, the traditional embedding-based recall method (such as matrix factorization (MF)) cannot obtain sufficient supervision information from the sparse data corresponding to the interaction with the sample recommendation text, and therefore cannot learn reliable representations of objects and texts for recall. In S3022, the sample graph built based on the embodiment of the present application contains rich heterogeneous interaction information, and can obtain more adjacent nodes from multiple aspects such as behavior objects, conversations, classifications, semantics, and sample recommendation texts, thereby enhancing the connection between different fields and improving the reliability of node feature representations used for recall.

[0135] In the embodiment of the present application, for the sake of description, the non-expanded sample map is recorded as the first type of sample map, the first type of sample map includes the sample map corresponding to the source domain (recorded as the first sample map) and the sample map corresponding to the target domain (recorded as the second sample map), and the expanded sample map is recorded as the second type of sample map. For each set attribute information in different types of sample maps, the calculation process of the sub-loss value is referred to in Figure 3D :

[0136] For each set attribute information in the first type of sample map, execute S3022_1:

[0137] S3022_1: The processing device determines a sub-loss value of a setting attribute information in a corresponding domain based on the similarity between an attribute feature vector of the setting attribute information and an attribute feature vector of adjacent setting attribute information, and the similarity between an attribute feature vector of the setting attribute information and an attribute feature vector of non-adjacent setting attribute information.

[0138] In S3022_1, all nodes in a sample graph are located in the same space, in which all types of graph edges are regarded as unsupervised information to supplement the deficiency of UI edges so that more nodes are adjacent.

[0139] Take the calculation of the sub-loss value of any set attribute information (corresponding to node i) in the corresponding sample domain (including the source domain or the target domain) in a sample graph as an example, see Figure 4A , node k is the node corresponding to the adjacent attribute information of node i, node j is the node corresponding to the non-adjacent attribute information of node i, and the attribute feature vector of node i is e i , the attribute feature vector of node k is e k , the attribute feature vector of node j is e j , construct a loss function based on neighbor similarity to calculate the sub-loss value, the calculation formula is as follows:

[0140]

[0141] Where T represents the matrix transpose.

[0142] In S3022_1, the sub-loss value is calculated based on the loss function of neighbor similarity. Compared with the classic MF method that only considers UI edges, on the one hand, all types of interactive information between heterogeneous setting attribute information and sample recommendation texts are fully utilized in recall. These interactive information comes from UI edges, II edges, TI edges, CI edges, MI edges and WI edges, which helps to capture different preferences of objects to balance the accuracy and diversity of recall; on the other hand, by introducing other heterogeneous nodes and edges besides UI edges, unsupervised information is increased, which effectively solves the long tail items in CDR recall and is conducive to the recommendation of text in cold start areas.

[0143] For each set attribute information in the first type of sample map, execute S3022_2 respectively:

[0144] S3022_2: The processing device determines a sub-loss value of a set attribute information in a corresponding domain based on the similarity between an attribute feature vector of the set attribute information and the attribute feature vector of the corresponding set attribute information in the sample map before expansion, and the similarity between the attribute feature vector of the corresponding set attribute information and the attribute feature vector of a non-adjacent set attribute information of the set attribute information.

[0145] Contrastive learning is a widely used self-supervised learning (SSL) method that makes full use of the attribute feature vectors of unlabeled sample recommendation text pairs. In S3022_2, for the sample graphs before and after expansion corresponding to the target domain, the set attribute information with corresponding relationship in the sample graph after expansion is used as positive training samples, and the set attribute information without corresponding relationship in the sample graphs before and after expansion is used as negative training samples to determine the intra-domain sub-loss value of the target domain. Optionally, the ratio of positive training samples to negative training samples is 1:10.

[0146] Figure 4B It is the relationship diagram between the sample graphs before and after the expansion corresponding to the target domain. For the second type of sample graph after expansion, taking the calculation of the in-domain sub-loss value of node i and node i' in the target domain as an example, the in-domain loss function formula is as follows:

[0147]

[0148] Where B represents the set of nodes (i, i') corresponding to the same set of attribute information in the sample graph before and after expansion, that is, the positive training sample, SB represents the set of nodes that are not adjacent to node i' in the sample graph after expansion, that is, the negative training sample, e i′ The attribute feature vector representing the set attribute information corresponding to node i' in the expanded sample graph, e i The attribute feature vector representing the attribute information corresponding to the corresponding node i in the sample graph before expansion, e j′ represents the attribute feature vector of the set attribute information corresponding to the node j' that is not adjacent to the node i' in the expanded sample graph, sim(·) represents the similarity function, τ represents the temperature factor,

[0149] In S3022_2, by expanding the various set attribute information in the before and after sample graphs, the sub-loss value within the target domain is calculated, and the reliability representation of the node is enhanced with the sub-loss value, thereby improving the reliability of the recall and alleviating the problems of data sparsity and popularity bias in the recall.

[0150] S3023: The processing device determines a target loss value based on the obtained sub-loss values, and adjusts parameters of the cross-domain comparison recommendation model to be trained based on the target loss value.

[0151] In S3023, the recall loss of the source domain, the recall loss of the target domain, and the intra-domain contrastive learning loss of the target domain are jointly optimized to determine the target loss value, and the formula is as follows:

[0152]

[0153] Among them, λ1, λ2, and λ3 represent the source domain loss respectively. Target domain loss and the in-domain loss L of the target domain intra-CL Weight.

[0154] In some embodiments, in addition to considering the intra-domain contrastive learning loss of the target domain, the embodiments of the present application also consider the inter-domain contrastive learning (inter-CL) loss between the source domain and the target domain. Inter-CL aims to improve the knowledge transfer between different domains through different types of nodes and edges in the sample graph.

[0155] In inter-domain comparative learning, this application realizes knowledge transfer from the source domain to the target domain from three perspectives: behavior objects, semantic information, and adjacent nodes. Figure 4C As shown, s represents the source domain and t represents the target domain. represents the knowledge transfer from the source domain to the target domain based on the behavior object, is the object feature vector of node i in the source domain, is the object feature vector of node i in the target domain, is the object feature vector of node j in the target domain, It represents the knowledge transfer from the source domain to the target domain based on semantic information. Generally, the same text categories, text labels, and keywords in different fields mostly have the same semantic information. Therefore, the semantic information includes at least one of the text categories, text labels, and keywords. is the semantic feature vector of node i in the source domain, is the semantic feature vector of node i in the target domain, is the semantic feature vector of node j in the target domain, represents the knowledge transfer from the source domain to the target domain based on the neighboring nodes between domains. is the node feature vector of node i in the source domain, is the node feature vector of node i in the target domain, is the node feature vector of node k adjacent to node i in the target domain, is the node feature vector of node j that is not adjacent to node i in the target domain,

[0156] It should be noted that Figure 4C This is just an example. For example, the semantic information may also be the published media, that is, it is assumed that most of the content published by the same media account is similar.

[0157] Based on inter-domain contrast learning, after S3022_2 and before S3023, it also includes:

[0158] S3022_3: The processing device calculates the sub-loss value between the source domain and the target domain based on the attribute feature vectors of each set attribute information in the sample atlas corresponding to the source domain and the target domain.

[0159] In S3022_3, the same set attribute information exists in the first sample graph corresponding to the source domain and the second sample graph corresponding to the target domain. For example, object group 1 interacts with the sample recommendation text in the source domain. At the same time, object group 1' also interacts with the sample recommendation text in the target domain. Object group 1 and object group 1' are the same nodes in the first sample graph and the second sample graph. Moreover, the nodes in the second sample graph that are the same as those in the first sample graph include adjacent nodes and non-adjacent nodes. Therefore, the sub-loss value between the source domain and the target domain includes the recall loss of the nodes corresponding to the same set attribute information in the two sample graphs, and the recall loss of the adjacent and non-adjacent set attribute information in the target domain that is the same as the source domain. For details, see Figure 3E :

[0160] S3022_31: The processing device calculates a first loss value between the source domain and the target domain based on the attribute feature vectors of the same set attribute information in the first sample map and the second sample map.

[0161] In S3022_31, when setting the attribute information as the behavior object, Figure 4C For example, through the learning of the GNN aggregator, the same behavior object has a node representation in the first sample graph and a node representation in the second sample graph. However, since the same behavior object has inconsistent behaviors for sample recommendation texts in the source domain and the target domain, the node representations in the two sample graphs are different.

[0162] Taking the same set attribute information in the first sample map and the second sample map as an example, assuming that the set attribute information corresponds to node i in the two sample maps, the attribute feature vectors of the set attribute information in the first sample map and the second sample map are The similarity between them, and the attribute feature vector of the set attribute information in the first sample map The attribute feature vectors of the set attribute information that are not adjacent to the set attribute information in the second sample spectrum The similarity between the source domain and the target domain is used to determine the first loss value between the source domain and the target domain. Specifically, the calculation formula of the first loss value between domains based on the behavior object is as follows:

[0163]

[0164] in, Represents the nodes of other behavior objects in the second sample graph except node i.

[0165] In S3022_31, when the attribute information is set to at least one of a text category, a text label, and a keyword representing semantic information, Figure 4C For example, through the learning of the GNN aggregator, the same text category, text label or keyword has a node representation in the first sample graph and a node representation in the second sample graph. Similar to the calculation of the first inter-domain loss value based on the behavior object, the calculation formula of the first inter-domain loss value based on semantic information is as follows:

[0166]

[0167] in, Represents the nodes of other text categories, text labels, and keywords in the second sample graph except node i.

[0168] It should be noted that the values ​​of the temperature parameter τ in Formula 7 and Formula 8 may be different to highlight the semantic difference.

[0169] S3022_32: The processing device calculates a second loss value between the source domain and the target domain based on the adjacent relationship between each set attribute information in the first sample map and the second sample map.

[0170] When calculating the first loss value in S3022_31, it is assumed that similar sample recommendation texts in different fields may have similar behavior objects, text categories, text tags, keywords, etc. In S3022_32, some sample recommendation texts that do not have explicit mapping of basic set attribute information are considered, such as Figure 4B Therefore, in S3022_32, an indirect (multi-hop) connection is established between the set attribute information in different fields based on the inter-CL of adjacent nodes, that is, when performing knowledge transfer between the source domain and the target domain, the behavior objects, text labels, text categories, publishing media and keywords are mapped as a whole.

[0171] like Figure 4C As shown, assuming that the same set attribute information in the first sample graph and the second sample graph is recorded as the target set attribute information, corresponding to node i in the two sample graphs, first, determine the adjacent set attribute information set of node i in the second sample graph Then, based on the target setting attribute information, the attribute feature vector in the first sample map The attribute feature vectors of the adjacent setting attribute information in the adjacent setting attribute information set are respectively The similarity between them, and the attribute feature vector of the target setting attribute information in the first sample map The attribute feature vectors of the set attribute information in the second sample map that do not belong to the adjacent set attribute information set The similarity between the two domains is used to determine the second loss value between the source domain and the target domain. Specifically, the calculation formula of the second loss value between domains based on adjacent nodes is as follows:

[0172]

[0173] Among them, E A is the set of all nodes in the source domain, is the set of neighboring nodes of node i in the target domain.

[0174] S3022_33: The processing device determines a sub-loss value between the source domain and the target domain based on the first loss value and the second loss value.

[0175] In S3022_32, the three inter-domain loss values ​​are combined to obtain the final inter-domain sub-loss value L inter-CL :

[0176]

[0177] Considering the inter-domain sub-loss value between the source domain and the target domain, the target loss value determined in S3023 is:

[0178]

[0179] Among them, λ4 is the inter-domain loss L inter-CL The corresponding weight.

[0180] The cross-domain comparison recommendation model to be trained in the above embodiment can be an architecture composed of a graph neural network (GNN) with a sample graph processing function, including but not limited to embedded mapping cross-domain recommendation (EMCDR), SSCDR model, deep dual transfer cross-domain recommendation (DDTCDR), transfer meta framework for cross-domain recommendation (TMCDR), and ICAN model.

[0181] Figure 5 This is an overall schematic diagram of cross-domain comparison recommendation model training, such as Figure 5 As shown, the first sample map corresponding to the source domain, the second sample map corresponding to the target domain, and the sample map after the second sample map is expanded are input to the input layer (Input), and the attribute feature vectors of each set attribute information in each sample map are extracted. The attribute feature vectors are increased in dimension and concatenated through the embedding layer (Embedding), and the attribute feature vectors processed by the embedding layer are aggregated by GNN, and a multi-head attention mechanism (Attention) is added. Finally, based on the attribute feature vectors of each set attribute information in the first sample map, the source domain recall loss is calculated. Based on the attribute feature vectors of each set attribute information in the second sample map, calculate the target domain recall loss Based on the attribute feature vectors of each set attribute information in the second sample map and the expanded sample map, calculate the in-domain recall loss L of the target domain intra-CL , based on the attribute feature vectors of each set attribute information in the first sample map and the second sample map, calculate the intra-domain recall loss L of the target domain inter-CL , combined with L intra-CL , L inter-CL Get the final target loss value L.

[0182] In the above embodiment of the present application, sample graphs are built in the source domain and the target domain respectively, each sample graph contains multiple set attribute information and sample recommendation texts to enhance the relevance of different fields, and the sample graph corresponding to the target domain is expanded to alleviate the problems of data sparsity and popularity bias. In the model training stage, the GNN aggregator is used to learn the interests of objects in different fields, thereby reducing the long-tail sample recommendation texts. In order to strengthen cross-domain knowledge transfer, intra-CL and inter-CL are designed, wherein intra-CL performs additional self-supervised learning through the expanded sample graph to learn the reliability knowledge representation of each set attribute information in the target domain, and inter-CL introduces three contrastive learning tasks, which are mapped between the source domain and the target domain based on behavioral objects, semantic information, and adjacent nodes, so that the interactive information between different types of set attribute information and sample recommendation texts is maximized, and the effectiveness and stability of cross-domain knowledge transfer are improved. In addition, under the MTL framework, cross-domain multi-channel recall is performed, combining the recall loss of the source domain, the recall loss of the target domain, the intra-domain contrastive learning loss, and the inter-domain contrastive learning loss to further improve the diversity of the recall results.

[0183] Based on the target cross-domain comparison recommendation model trained in this application, cross-domain recommendation is performed. For details, see Fig. 6A :

[0184] S601: The processing device obtains a set of recommended texts corresponding to the target object in response to a recommendation request sent by the target object.

[0185] In S601 , the processing device obtains a corresponding recommended text set from a backend server of the application in response to a recommendation request sent by a target object through an application, where the recommended text set includes a plurality of recommended texts in different fields.

[0186] S602: The processing device adopts a target cross-domain comparison recommendation model to obtain a plurality of target recommended texts belonging to a plurality of fields based on each recommended text in the recommended text set and the set attribute information connected to each recommended text.

[0187] S603: The processing device displays multiple target recommendation texts to the target object.

[0188] Taking the processing device as a server as an example, Figure 6BA schematic diagram of the cross-domain comparison recommendation process provided by an embodiment of the present application is shown; the target object clicks on the "Haokan" application on the smart terminal and sends a recommendation request to the "Haokan" backend server. After receiving the recommendation request, the backend server accesses the database to obtain a recommended text set, which includes multiple recommended texts in different fields published by users on the "Haokan" platform. The backend server is deployed with a target cross-domain comparison recommendation model. Based on each recommended text in the recommended text set and the set attribute information of each recommended text connected to each recommended text, multiple recommended texts in the fields of current news, celebrity entertainment, public transportation, travel guides, etc. are obtained and sent to the smart terminal, which is displayed to the target object by the smart terminal.

[0189] In order to verify that the CCDR provided by the embodiment of the present application is effective in actual application scenarios, the target cross-domain comparison recommendation model and the traditional cross-domain recommendation model were deployed in a certain video online recommendation system. Except for the recall environment, other data remain unchanged. The effectiveness of the target cross-domain comparison recommendation model is evaluated by comparing three important indicators in cross-domain recommendation: 1) Click-through Rate (CTR), 2) Average user time, and 3) Per capita sharing rate. According to the 8-day online A / B test data, compared with the traditional cross-domain recommendation model, the online CTR of the target cross-domain comparison recommendation model provided by the embodiment of the present application increased by 14.368%, the average user time increased by 6.623%, and the per capita sharing rate increased by 10.401%.

[0190] Based on the same inventive concept, the present application embodiment provides a recommendation device, which can execute the above-mentioned model training method and cross-domain recommendation method, see Figure 7 , the recommended device includes:

[0191] The sample acquisition module 701 is used to acquire a sample graph set; the sample graph set includes: sample graphs constructed based on multiple set attribute information and multiple sample recommendation texts in the source domain and the target domain, and a sample graph obtained by expanding the sample graph corresponding to the target domain;

[0192] The model training module 702 is used to perform at least one iterative training on the cross-domain comparison recommendation model to be trained based on the sample atlas set to obtain a target cross-domain comparison recommendation model; wherein the model training module includes a feature extraction unit 7021, a loss value calculation unit 7022, and a parameter adjustment unit 7023;

[0193] During each iteration:

[0194] The feature extraction unit 7021 is used to use the cross-domain comparison recommendation model to be trained, and based on the graph connection relationship between the set attribute information corresponding to each of the extracted sample graphs, respectively extract the attribute feature vectors of each of the set attribute information corresponding to each of the sample graphs; wherein each of the set attribute information realizes the graph connection through the associated sample recommendation text;

[0195] The loss value calculation unit 7022 is used to calculate the sub-loss value of each set attribute information in the corresponding domain based on the attribute feature vector corresponding to each set attribute information of each sample spectrum obtained;

[0196] The parameter adjustment unit 7023 is used to determine a target loss value based on each sub-loss value obtained, and to adjust parameters of the cross-domain comparison recommendation model to be trained based on the target loss value.

[0197] Optionally, a sample map building module 703 is also included, which is used to:

[0198] For each sample domain, the following operations are performed respectively: each set attribute information in a sample domain is used as a corresponding graph node, each sample recommendation text connected by each set attribute information in a sample domain is used as a corresponding graph edge, and a sample graph corresponding to a sample domain is constructed based on each node and the graph edge connecting each node; wherein the one sample domain is the source domain or the target domain.

[0199] Optionally, the sample map building module 703 is also used to:

[0200] Deleting at least one node in a sample graph corresponding to a sample domain;

[0201] Delete at least one edge in the sample graph corresponding to a sample domain.

[0202] Optionally, the feature extraction unit 7021 is specifically used for:

[0203] For each set attribute information in a sample map in each sample map, perform the following operations respectively:

[0204] Determine a set of adjacent setting attribute information corresponding to a setting attribute information according to a sample recommendation text connected to the setting attribute information;

[0205] respectively determining the similarity between each adjacent set attribute information and one set attribute information in the adjacent set attribute information set;

[0206] According to each determined similarity, respectively determine the multi-head attention coefficients of the corresponding adjacent set attribute information and one set attribute information;

[0207] According to the determined multi-head attention coefficients, the attribute feature vectors of each adjacent set attribute information are weighted to obtain an attribute feature vector of the set attribute information.

[0208] Optionally, the loss value calculation unit 7022 is specifically used for:

[0209] For each set attribute information in the non-expanded first-category sample map, the following operations are performed respectively:

[0210] Determine a sub-loss value of a set attribute information in a corresponding domain according to the similarity between an attribute feature vector of the set attribute information and an attribute feature vector of adjacent set attribute information, and the similarity between an attribute feature vector of the set attribute information and an attribute feature vector of non-adjacent set attribute information; and

[0211] For each set attribute information in the expanded second type sample map, the following operations are performed respectively:

[0212] Based on the similarity between an attribute feature vector of a set attribute information and the attribute feature vector of the corresponding set attribute information in the sample map before expansion, and the similarity between the attribute feature vector of the corresponding set attribute information and the attribute feature vector of a non-adjacent set attribute information of the set attribute information, a sub-loss value of the set attribute information in the corresponding domain is determined.

[0213] Optionally, the loss value calculation unit 7022 is further used for:

[0214] Based on the attribute feature vectors of each set attribute information in the sample graphs corresponding to the source domain and the target domain, the sub-loss value between the source domain and the target domain is calculated.

[0215] Optionally, the sample map includes at least a first sample map corresponding to the source domain and a second sample map corresponding to the target domain; the loss value calculation unit 7022 is specifically used for:

[0216] Calculate a first loss value between the source domain and the target domain based on the attribute feature vector of the same set attribute information in the first sample map and the second sample map;

[0217] Calculate a second loss value between the source domain and the target domain based on attribute feature vectors of adjacent set attribute information in the first sample map and the second sample map;

[0218] A sub-loss value between the source domain and the target domain is determined according to the first loss value and the second loss value.

[0219] Optionally, the loss value calculation unit 7022 is specifically used for:

[0220] Determine a first loss value between the source domain and the target domain based on the similarity between the attribute feature vectors of the same set attribute information in the first sample map and the second sample map, and the similarity between the attribute feature vectors of the same set attribute information in the first sample map and the attribute feature vectors of the set attribute information that are not adjacent to the same set attribute information in the second sample map;

[0221] The loss value calculation unit 7022 is specifically used for:

[0222] Determine a set of adjacent setting attribute information of the target setting attribute information in the second sample graph, wherein the target setting attribute information is the same setting attribute information in the first sample graph and the second sample graph;

[0223] Based on the similarity between the attribute feature vectors of the target setting attribute information in the first sample graph and the attribute feature vectors of the adjacent setting attribute information in the adjacent setting attribute information set, and the similarity between the attribute feature vectors of the target setting attribute information in the first sample graph and the attribute feature vectors of the setting attribute information that does not belong to the adjacent setting attribute information set in the second sample graph, the second loss values ​​of the source domain and the target domain are determined.

[0224] Optionally, the recommended equipment also includes:

[0225] A response module 704 is used to respond to the recommendation request sent by the target object and obtain a set of recommended texts corresponding to the target object;

[0226] An acquisition module 705 is used to adopt a target cross-domain comparison recommendation model to obtain a plurality of target recommended texts belonging to a plurality of fields based on each recommended text in the recommended text set and the set attribute information connected to each recommended text;

[0227] The display module 706 is used to display multiple target recommendation texts to the target object.

[0228] As an example, Figure 7 The device in can be used for the model training method and cross-domain recommendation method provided in the embodiments of the present application, and can achieve the same technical effect, which will not be repeated here.

[0229] The above device is an example of a hardware entity. Figure 8 The electronic device shown includes a processor 801 , a storage medium 802 and at least one external communication interface 803 ; the processor 801 , the storage medium 802 and the external communication interface 803 are all connected via a bus 804 .

[0230] The storage medium 802 stores a computer program;

[0231] When the processor 801 executes the computer program, the model training method and cross-domain recommendation method discussed above are implemented.

[0232] Figure 8 In the figure, one processor 801 is taken as an example, but the number of processors 801 is not limited in practice.

[0233] The storage medium 802 may be a volatile memory, such as a random-access memory (RAM); the storage medium 802 may also be a non-volatile memory, such as a read-only storage medium, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the storage medium 802 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The storage medium 802 may be a combination of the above storage media.

[0234] Based on the same inventive concept, an embodiment of the present application provides a terminal device, which is introduced below.

[0235] Please refer to Fig. 9 The terminal device includes a display unit 940, a processor 980 and a memory 920, wherein the display unit 940 includes a display panel 941, which is used to display information input by a user or information provided to a user, as well as various operation interfaces and display pages, etc. In the embodiment of the present application, it is mainly used to display the interface, shortcut window, etc. of the client installed in the terminal device.

[0236] Optionally, the display panel 941 may be configured in the form of a liquid crystal display (LCD) or an organic light-emitting diode (OLED).

[0237] The processor 980 is used to read the computer program and then execute the method defined by the computer program. For example, the processor 980 reads the application of the question-and-answer client, so as to run the application on the terminal device and display the interface of the application on the display unit 940. The processor 980 may include one or more general-purpose processors and may also include one or more DSPs (Digital Signal Processors) to perform related operations to implement the technical solutions provided in the embodiments of the present application.

[0238] The memory 920 generally includes internal memory and external memory, and the internal memory may be a random access memory (RAM), a read-only memory (ROM), and a cache (CACHE), etc. The external memory may be a hard disk, an optical disk, a USB disk, a floppy disk, or a tape drive, etc. The memory 920 is used to store computer programs and other data, and the computer program includes an application corresponding to the client, etc. Other data may include data generated after the operating system or the application is run, and the data includes system data (such as configuration parameters of the operating system) and user data. In the embodiment of the present application, program instructions are stored in the memory 920, and the processor 980 executes the program instructions in the memory 1620 to implement any model training method and cross-domain recommendation method discussed in the previous figure.

[0239] In addition, the terminal device may also include a display unit 940 for receiving input digital information, word information or contact touch operation or non-contact gesture, and generating signal input related to user settings and function control of the terminal device. Specifically, in the embodiment of the present application, the display unit 940 may include a display panel 941. The display panel 941 is, for example, a touch screen, which can collect the user's touch operation on or near it (such as the user's operation on the display panel 941 or on the display panel 941 using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a pre-set program. Optionally, the display panel 941 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the player's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact point coordinates, and then sends it to the processor 980, and can receive and execute commands sent by the processor 980. In an embodiment of the present application, if a user clicks on the display panel 941, the touch detection device in the display panel 941 detects a touch operation, and sends a signal corresponding to the detected touch operation to the touch controller. The touch controller converts the signal into touch point coordinates and sends them to the processor 980. The processor 980 responds to the user operation according to the received touch point coordinates.

[0240] The display panel 941 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the display unit 940, the terminal device may further include an input unit 930, which may include but is not limited to an image input device 931 and other input devices 932. Other input devices 932 may include but are not limited to one or more of a physical keyboard, a function key (such as a volume control key, a switch key, etc.), a trackball, a mouse, and a joystick.

[0241] In addition to the above, the terminal device may also include a power supply 990 for supplying power to other modules, an audio circuit 960, a near field communication module 970, and an RF circuit 910. The terminal device may also include one or more sensors 950, such as an acceleration sensor, a light sensor, a pressure sensor, etc. The audio circuit 960 specifically includes a speaker 961 and a microphone 962, etc. For example, the terminal device can collect the user's voice through the microphone 962 and perform corresponding operations.

[0242] As an embodiment, the number of processors 980 may be one or more, and the processor 980 and the memory 920 may be coupled or relatively independently configured.

[0243] As an example, Fig. 9 The processor 980 in the embodiment can be used to implement the following Figure 7 The functions of each module in.

[0244] As an example, Fig. 9 The processor 980 in can be used to implement the functions of the processing device discussed above.

[0245] Those skilled in the art can understand that: all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions, and the aforementioned computer program can be stored in a computer-readable storage medium. When the computer program is executed, it executes the steps of the above method embodiments; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), disks or optical disks, and other media that can store program codes.

[0246] Alternatively, if the above-mentioned integrated unit of the invention is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present invention can be essentially or partly reflected in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the above-mentioned methods of each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROM, RAM, magnetic disks or optical disks.

[0247] Based on the same technical concept, the embodiment of the present application also provides a computer-readable storage medium, which stores computer instructions. When the above computer instructions are executed on a computer, the computer executes the question expansion method discussed above.

[0248] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0249] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A training method for a cross-domain comparative recommendation model, characterized in that: The method comprises: Obtaining a sample graph set; the sample graph set includes: sample graphs constructed based on multiple set attribute information and multiple sample recommendation texts in the source domain and the target domain, respectively, and a sample graph obtained by expanding the sample graph corresponding to the target domain; Based on the sample atlas set, the cross-domain comparative recommendation model to be trained is iteratively trained for at least one time to obtain a target cross-domain comparative recommendation model, wherein during each iteration, the following operations are performed: Using the cross-domain comparative recommendation model to be trained, based on the graph connection relationship between the respective set attribute information corresponding to the extracted sample graphs, attribute feature vectors of the respective set attribute information corresponding to the respective sample graphs are extracted; wherein the respective set attribute information realizes graph connection through the associated sample recommendation text; Based on the obtained attribute feature vectors corresponding to the respective set attribute information of the respective sample maps, respectively calculating the sub-loss values ​​of the respective set attribute information in the corresponding domains; Based on the obtained sub-loss values, a target loss value is determined, and parameters of the cross-domain comparison recommendation model to be trained are adjusted based on the target loss value.

2. The method according to claim 1, wherein The sample map is constructed in the following way: For each sample domain, the following operations are performed respectively: each set attribute information in a sample domain is used as a corresponding graph node, and the sample recommendation text connected by each set attribute information in the sample domain is used as a corresponding graph edge; based on each node and the graph edge connecting the each node, a sample graph corresponding to the sample domain is constructed; wherein the sample domain is the source domain or the target domain.

3. The method according to claim 2, wherein Generate an expanded sample map using at least one of the following methods: Deleting at least one node in the sample graph corresponding to the one sample domain; Delete at least one edge in the sample graph corresponding to the sample domain.

4. The method according to any one of claims 1 to 3, wherein The extracting of attribute feature vectors of each set attribute information corresponding to each sample graph based on the graph connection relationship between each set attribute information corresponding to each sample graph respectively includes: For each set attribute information in one of the sample graphs, perform the following operations: Determining, based on a sample recommendation text connected to a piece of setting attribute information, a set of adjacent setting attribute information corresponding to the setting attribute information; respectively determining the similarity between each adjacent set attribute information in the set of adjacent set attribute information and the one set attribute information; Determining multi-head attention coefficients for corresponding adjacent set attribute information and the one set attribute information respectively according to the determined similarities; According to the determined multi-head attention coefficients, the attribute feature vectors of the adjacent set attribute information are weighted to obtain the attribute feature vector of the set attribute information.

5. The method according to any one of claims 1 to 3, wherein The step of calculating the sub-loss values ​​of the respective set attribute information in the corresponding domain based on the obtained attribute feature vectors corresponding to the respective set attribute information of the respective sample maps includes: For each set attribute information in the non-expanded first-category sample map, perform the following operations: Determining a sub-loss value of the set attribute information in the corresponding domain based on a similarity between an attribute feature vector of the set attribute information and an attribute feature vector of adjacent set attribute information, and a similarity between an attribute feature vector of the set attribute information and an attribute feature vector of non-adjacent set attribute information; and For each set attribute information in the expanded second type sample map, perform the following operations: Based on the similarity between the attribute feature vector of a set attribute information and the attribute feature vector of the corresponding set attribute information in the sample map before expansion, and the similarity between the attribute feature vector of the corresponding set attribute information and the attribute feature vectors of non-adjacent set attribute information of the set attribute information, the sub-loss value of the set attribute information in the corresponding domain is determined.

6. The method according to claim 1, wherein Before determining the target loss value, it also includes: Based on the attribute feature vectors of each set attribute information in the sample atlas corresponding to the source domain and the target domain, a sub-loss value between the source domain and the target domain is calculated.

7. The method according to claim 6, wherein The sample atlas includes at least a first sample atlas corresponding to the source domain and a second sample atlas corresponding to the target domain; The calculating of the sub-loss value between the source domain and the target domain based on the attribute feature vectors of each set attribute information in the sample graphs corresponding to the source domain and the target domain includes: Calculating a first loss value between the source domain and the target domain based on attribute feature vectors of identical set attribute information in the first sample map and the second sample map; Calculating a second loss value between the source domain and the target domain based on attribute feature vectors of adjacent set attribute information in the first sample map and the second sample map; A sub-loss value between the source domain and the target domain is determined according to the first loss value and the second loss value.

8. The method according to claim 7, wherein The calculating a first loss value between the source domain and the target domain based on the attribute feature vector of the same set attribute information in the first sample map and the second sample map includes: Determining a first loss value between the source domain and the target domain based on similarities between attribute feature vectors of the same set attribute information in the first sample graph and the second sample graph, and similarities between the attribute feature vectors of the same set attribute information in the first sample graph and attribute feature vectors of non-adjacent set attribute information in the second sample graph; The calculating a second loss value between the source domain and the target domain based on the attribute feature vectors of adjacent set attribute information in the first sample map and the second sample map includes: Determining a set of adjacent setting attribute information of target setting attribute information in the second sample map, wherein the target setting attribute information is the same setting attribute information in the first sample map and the second sample map; A second loss value between the source domain and the target domain is determined based on the similarity between the attribute feature vectors of the target setting attribute information in the first sample graph and the attribute feature vectors of the adjacent setting attribute information in the adjacent setting attribute information set, and the similarity between the attribute feature vectors of the target setting attribute information in the first sample graph and the attribute feature vectors of the setting attribute information that does not belong to the adjacent setting attribute information set in the second sample graph.

9. The method according to any one of claims 1 to 3 and 6 to 8, wherein: After obtaining the target cross-domain comparison recommendation model, the method further includes: In response to a recommendation request sent by a target object, obtaining a set of recommended texts corresponding to the target object; Adopting a target cross-domain comparison recommendation model, based on each recommended text in the recommended text set and the set attribute information connected to each recommended text, a plurality of target recommended texts belonging to a plurality of fields are obtained respectively; The multiple target recommendation texts are presented to the target object.

10. A recommendation device, characterized in that: include: A sample acquisition module is used to acquire a sample graph set; the sample graph set includes: sample graphs constructed based on multiple set attribute information and multiple sample recommendation texts in the source domain and the target domain, and a sample graph obtained by expanding the sample graph corresponding to the target domain; A model training module is used to perform at least one iterative training on the cross-domain comparative recommendation model to be trained based on the sample atlas set to obtain a target cross-domain comparative recommendation model; wherein the model training module includes a feature extraction unit, a loss value calculation unit, and a parameter adjustment unit; During each iteration: The feature extraction unit is configured to extract attribute feature vectors of each set attribute information corresponding to each sample graph based on the graph connection relationship between each set attribute information corresponding to each sample graph, using the cross-domain comparative recommendation model to be trained; wherein the set attribute information is graph-connected via associated sample recommendation text; The loss value calculation unit is configured to calculate the sub-loss value of each set attribute information in the corresponding domain based on the attribute feature vector corresponding to each set attribute information of each of the obtained sample maps; The parameter adjustment unit is used to determine a target loss value based on the obtained sub-loss values, and adjust the parameters of the cross-domain comparison recommendation model to be trained based on the target loss value.

11. The recommendation device according to claim 10, wherein: Also included are sample graph building modules for: For each sample domain, the following operations are performed respectively: each set attribute information in a sample domain is used as a corresponding graph node, and the sample recommendation text connected by each set attribute information in the sample domain is used as a corresponding graph edge; based on each node and the graph edge connecting each node, a sample graph corresponding to the sample domain is constructed, wherein the sample domain is the source domain or the target domain.

12. The recommendation device according to claim 11, wherein: The sample map building module is also used to: Deleting at least one node in the sample graph corresponding to the one sample domain; Delete at least one edge in the sample graph corresponding to the sample domain.

13. The device according to claim 10, wherein The loss value calculation unit is further used to: Based on the attribute feature vectors of each set attribute information in the sample atlas corresponding to the source domain and the target domain, a sub-loss value between the source domain and the target domain is calculated.

14. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 9 are implemented.

15. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and when the computer instructions are executed on a computer, the computer is caused to perform the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Cross-domain recommendation and model training method and device

    CN112307256A

  • Cross-domain recommendation method and system based on small number of overlapped users

    CN112417298A

  • Cross-domain recommendation method based on multi-view knowledge representation

    CN112541132A

  • System and method for cross-domain recommendations

    US20200142935A1

  • META-transfer learning via contextual invariants for cross-domain recommendation

    US20210110306A1