A method, device and equipment for cross-domain recommendation and model training, and a storage medium

CN117093774BActive Publication Date: 2026-11-03HANGZHOU NETZHIYI INNOVATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202311008482.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-10
Publication Date
2026-11-03
Estimated Expiration
2043-08-10

AI Technical Summary

Technical Problem

Traditional cross-domain recommendation algorithms cannot effectively utilize information from auxiliary domains, resulting in poor cross-domain recommendation performance, especially among users with sparse historical data, where accurate and diverse recommendations cannot be achieved.

Method used

By introducing a shared user vector that represents a user's general interests in the target domain and at least one auxiliary domain that is distinct from the target domain, and simultaneously training unique user vectors, a cross-domain recommendation model is generated to characterize users' interests and preferences in multiple domains.

Benefits of technology

It enables accurate and diverse recommendations for users within the target domain, improves the effectiveness of cross-domain recommendations, and can more comprehensively characterize user interests, thereby enhancing the accuracy and diversity of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117093774B_ABST
    Figure CN117093774B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a method, device, equipment and storage medium for cross-domain recommendation and model training. The model training method can include: obtaining a training sample set, the training sample set including id features of a sample user, id features of a sample item, and a first target similarity between the sample user and a first sample item in a target domain; inputting the training sample set into a to-be-trained model to generate a target domain sample user vector and a first sample item vector by the to-be-trained model, and output a first predicted similarity between the sample user and the first sample item; wherein the target domain sample user vector includes a target unique sample user vector and a shared sample user vector; iteratively training the model based on the first predicted similarity and the first target similarity until a first loss function converges or the number of iterations reaches an upper limit. Embodiments of the present disclosure can effectively solve the problem of sparse recommended content in the target domain and improve the recommendation effect of the target domain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this disclosure relate to the field of communication technology, and more specifically, the embodiments of this disclosure relate to a method, apparatus, device and storage medium for cross-domain recommendation and model training. Background Technology

[0002] This section is intended to provide background or context for the embodiments of this disclosure as set forth in the claims. The description herein is not intended to be a prior art simply because it is included in this section.

[0003] Content recommendation helps users find truly interesting content amidst a sea of ​​information. Therefore, it's typically necessary to determine user interests based on historical data (including browsing history, past preferences, and other behavioral data) to provide accurate content recommendations. However, traditional recommendation algorithms often only work with users in a specific domain who have abundant historical data, failing to provide recommendations to users with sparse historical data in that domain. For example, in video recommendation scenarios, some less active users have sparse video behavior data (including watching, giving coins, liking, etc.) within that domain, making it difficult to characterize their interests and preferences, hindering accurate and diverse recommendations. Cross-domain recommendation aims to combine information from multiple domains for content recommendation, that is, by introducing information from other domains (auxiliary domain / source domain) to assist in accurate recommendations within the target domain, improving the recommendation effect within the target domain.

[0004] Currently, cross-domain recommendation algorithms in related technologies cannot make good use of information from auxiliary domains, resulting in poor cross-domain recommendation performance. Summary of the Invention

[0005] In a first aspect of this disclosure, a method for training a cross-domain recommendation model is provided, comprising:

[0006] A training sample set is obtained, which includes the ID features of sample users, the ID features of sample items, and the target similarity between the sample users and the sample items; the sample items include a first sample item in the target domain and a second sample item in at least one auxiliary domain that is different from the target domain; the target similarity includes a first target similarity between the sample user and the first sample item, and a second target similarity between the sample user and the second sample item;

[0007] The training sample set is input into the model to be trained, so that the model to be trained generates a target domain sample user vector corresponding to the sample user and a first sample item vector corresponding to the first sample item, and outputs a first predicted similarity between the sample user and the first sample item based on the target domain sample user vector and the first sample item vector; wherein, the target domain sample user vector includes a target-specific sample user vector for representing the sample user's unique interest in the target domain, and a shared sample user vector for representing the sample user's general interest in the target domain and the auxiliary domain;

[0008] The model is iteratively trained based on the first predicted similarity and the first target similarity until the first loss function converges or the number of iterations reaches the upper limit.

[0009] Optionally, the training sample set includes a training positive sample set and a training negative sample set, wherein the training positive sample set contains sample items that have historical interaction behavior with the sample user, and the training negative sample set contains sample items that have no such historical interaction behavior with the sample user.

[0010] Optionally, the model to be trained generates the target domain sample user vector corresponding to the sample user, including: the model to be trained generates the target unique sample user vector and the shared sample user vector based on the ID feature of the sample user; and fuses the target unique sample user vector and the shared sample user vector to obtain the target domain sample user vector.

[0011] Optionally, the method further includes: the model to be trained generating an auxiliary domain sample user vector corresponding to the sample user and a second sample item vector corresponding to the second sample item, and outputting a second predicted similarity between the sample user and the second sample item based on the auxiliary domain sample user vector and the second sample item vector; wherein, the auxiliary domain sample user vector includes an auxiliary unique sample user vector used to characterize the sample user's unique interest in the auxiliary domain, and the shared sample user vector; the model is iteratively trained based on the second predicted similarity and the second target similarity until the second loss function converges or the number of iterations reaches the upper limit.

[0012] Optionally, the first loss function includes a first result loss function corresponding to the target domain sample user vector, and a first intermediate value loss function corresponding to the target unique sample user vector and the shared sample user vector; the second loss function includes a second result loss function corresponding to the auxiliary domain sample user vector, and a second intermediate value loss function corresponding to the auxiliary unique sample user vector and the shared sample user vector.

[0013] Optionally, the first result loss function is used to calculate the loss value of the predicted similarity between the target domain sample user vector and the first sample item vector; the second result loss function is used to calculate the loss value of the predicted similarity between the auxiliary domain sample user vector and the second sample item vector.

[0014] Optionally, the first intermediate value loss function is used to calculate the loss value of the predicted similarity between the target unique sample user vector and the first sample item vector, and the loss value of the predicted similarity between the shared sample user vector and the first sample item vector; the second intermediate value loss function is used to calculate the loss value of the predicted similarity between the auxiliary unique sample user vector and the second sample item vector, and the loss value of the predicted similarity between the shared sample user vector and the second sample item vector.

[0015] In a second aspect of this disclosure, a cross-domain recommendation method is provided, comprising:

[0016] Obtain the ID characteristics of the target user and the ID characteristics of the items to be recommended in the target domain;

[0017] Based on the ID features of the target user and the ID features of the item to be recommended, a user vector corresponding to the target user and an item vector corresponding to the item to be recommended are generated respectively; wherein, the user vector includes a unique user vector for representing the unique interests of the target user in the target domain, and a shared user vector for representing the general interests of the target user in the target domain and at least one auxiliary domain different from the target domain;

[0018] The similarity between the target user and the recommended item is calculated based on the user vector and the item vector, and a preset number of target items are recommended to the target user based on the similarity.

[0019] In a third aspect of this disclosure, a training apparatus for a cross-domain recommendation model is provided, comprising:

[0020] A sample acquisition unit is used to acquire a training sample set, which includes the ID features of sample users, the ID features of sample items, and the target similarity between the sample users and the sample items; the sample items include a first sample item in the target domain and a second sample item in at least one auxiliary domain that is different from the target domain; the target similarity includes a first target similarity between the sample user and the first sample item, and a second target similarity between the sample user and the second sample item;

[0021] The output unit is configured to input the training sample set into the model to be trained, so that the model to be trained generates a target domain sample user vector corresponding to the sample user and a first sample item vector corresponding to the first sample item, and outputs a first predicted similarity between the sample user and the first sample item based on the target domain sample user vector and the first sample item vector; wherein, the target domain sample user vector includes a target-specific sample user vector representing the sample user's unique interest in the target domain, and a shared sample user vector representing the sample user's general interest in the target domain and the auxiliary domain;

[0022] The training unit is used to iteratively train the model based on the first predicted similarity and the first target similarity until the first loss function converges or the number of iterations reaches the upper limit.

[0023] In a fourth aspect of this disclosure, a cross-domain recommendation apparatus is provided, comprising:

[0024] The acquisition unit is used to acquire the ID characteristics of the target user and the ID characteristics of the items to be recommended in the target domain;

[0025] The generation unit is configured to generate a user vector corresponding to the target user and an item vector corresponding to the item to be recommended, based on the ID features of the target user and the ID features of the item to be recommended, respectively; wherein, the user vector includes a unique user vector representing the unique interests of the target user in the target domain, and a shared user vector representing the general interests of the target user in the target domain and at least one auxiliary domain different from the target domain;

[0026] The recommendation unit is used to calculate the similarity between the target user and the item to be recommended based on the user vector and the item vector, and recommend a preset number of target items to the target user based on the similarity.

[0027] In a fifth aspect of this disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the methods described in the embodiments of the first / second aspects described above.

[0028] In a sixth aspect of this disclosure, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the embodiments of the first / second aspects above.

[0029] The above-described embodiments of this disclosure have at least the following beneficial effects:

[0030] This paper presents a training method for a cross-domain recommendation model. During training, a shared user vector is introduced to represent a user's general interests in the target domain and at least one auxiliary domain distinct from the target domain. Then, this shared user vector and a unique user vector representing a user's unique interests in the target domain are trained simultaneously. This allows the trained cross-domain recommendation model to accurately characterize both the user's unique interests in the target domain and their general interests across multiple domains. In other words, by characterizing a more comprehensive range of user interests, the model enables accurate and diverse content recommendations, thus achieving cross-domain recommendations across multiple domains and effectively improving the recommendation performance in the target domain. Attached Figure Description

[0031] The above and other objects, features, and advantages of this disclosure will become readily apparent from the following detailed description of exemplary embodiments, taken in conjunction with the accompanying drawings. Several embodiments of this disclosure are illustrated in the drawings by way of example and not limitation, in which:

[0032] Figure 1 This is an exemplary embodiment of an architecture diagram of a cross-domain recommendation system;

[0033] Figure 2 This is a flowchart illustrating a training method for a cross-domain recommendation model, provided in an exemplary embodiment.

[0034] Figure 3 This is a schematic diagram of the architecture of a cross-domain recommendation model provided in an exemplary embodiment;

[0035] Figure 4 This is a flowchart illustrating a cross-domain recommendation method provided in an exemplary embodiment;

[0036] Figure 5 This is a block diagram of a cross-domain recommendation model training device provided in an exemplary embodiment;

[0037] Figure 6 This is a block diagram of a cross-domain recommendation device provided in an exemplary embodiment;

[0038] Figure 7 This is a schematic diagram of a readable storage medium capable of implementing the above-described method, provided as an exemplary embodiment;

[0039] Figure 8 This is a schematic diagram of an electronic device capable of implementing the above-described method, provided as an exemplary embodiment.

[0040] In the accompanying drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation

[0041] The principles and spirit of this disclosure will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement this disclosure, and are not intended to limit the scope of this disclosure in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.

[0042] Those skilled in the art will recognize that embodiments of this disclosure can be implemented as a system, apparatus, device, method, or computer-readable storage medium. Therefore, this disclosure can be specifically implemented in the following forms: entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.

[0043] According to embodiments of this disclosure, a method, apparatus, device, and storage medium for cross-domain recommendation and model training are proposed.

[0044] In this document, it should be understood that any number of elements in the accompanying drawings is for illustrative purposes only and not as a limitation, and any naming is for distinction only and has no limiting meaning. Furthermore, the data involved in this disclosure may be data authorized by the user or fully authorized by the parties.

[0045] The principles and spirit of this disclosure will be explained in detail below with reference to several representative embodiments.

[0046] Application Scenarios Overview

[0047] In traditional recommendation algorithms, due to limited historical data for some users in a particular domain—such as browsing history and past preferences—it's impossible to achieve accurate content recommendations for these users based on sparse historical data. Therefore, cross-domain recommendation algorithms are needed to improve recommendation performance in the target domain by incorporating information from other domains.

[0048] In related technologies, cross-domain recommendation algorithms often fail to effectively utilize information from auxiliary domains, resulting in poor cross-domain recommendation performance. For example, some cross-domain recommendation algorithms can only achieve cross-domain recommendations from a single auxiliary domain to a single target domain, meaning they can only achieve cross-domain recommendations between two domains and cannot achieve cross-domain recommendations between multiple domains, which easily leads to poor cross-domain recommendation performance.

[0049] Therefore, it is evident that how to achieve cross-domain recommendation across multiple domains to improve the effectiveness of cross-domain recommendation is an urgent problem to be solved.

[0050] It should be noted that the above application scenarios are shown only to facilitate understanding of the spirit and principles of this disclosure, and the implementation of this disclosure is not limited in any way. On the contrary, the implementation of this disclosure can be applied to any applicable scenario. Invention Overview

[0052] In view of this, this specification provides a technical solution for cross-domain recommendation and model training.

[0053] The core concept of this specification is to provide a training method for a cross-domain recommendation model. During the training process, a shared user vector is introduced to represent a user's general interests in the target domain and at least one auxiliary domain distinct from the target domain. Then, this shared user vector and a unique user vector representing a user's unique interests in the target domain are trained simultaneously. This allows the trained cross-domain recommendation model to accurately characterize a user's unique interests in the target domain and general interests across multiple domains, enabling precise content recommendations based on these unique and general interests. This achieves cross-domain recommendation across multiple domains and effectively improves the recommendation performance in the target domain.

[0054] Exemplary methods

[0055] The technical concept of this specification will be described in detail below through specific embodiments.

[0056] System Architecture

[0057] Figure 1 This is an exemplary embodiment of an architecture diagram of a cross-domain recommendation system, such as... Figure 1 As shown, the cross-domain recommendation system may include an electronic device 10 and a server 11. The electronic device 10 is the recommended object according to this specification, and the server 11 can send a preset number of target items to the electronic device 10 in response to a recommendation request sent by the electronic device 10 in the target domain.

[0058] In the embodiments of this disclosure, the electronic device 10 may include, but is not limited to, smartphones, desktop computers, tablets, laptops, e-book readers, smartwatches, smart bracelets, and other electronic devices with certain computing capabilities. Furthermore, the electronic device may run software or websites of the categories of instant messaging, social networking, games, and education, and may be applied to scenarios involving multi-person audio and video calls.

[0059] The server can include a single server, a server cluster consisting of multiple servers, or a cloud server. Specifically, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0060] The terminal and the server can be connected directly or indirectly through wired or wireless communication, and this disclosure does not impose any special restrictions.

[0061] Please see Figure 2 , Figure 2 This is a flowchart illustrating a training method for a cross-domain recommendation model, as provided in an exemplary embodiment. The method may include the following steps:

[0062] S201: Obtain a training sample set, the training sample set including the ID features of sample users, the ID features of sample items, and the target similarity between the sample users and the sample items; the sample items include a first sample item in the target domain and a second sample item in at least one auxiliary domain that is different from the target domain; the target similarity includes a first target similarity between the sample users and the first sample item, and a second target similarity between the sample users and the second sample item.

[0063] In domain-specific recommendation, both users and items belong to entities within a domain. Each entity possesses its own unique ID feature; that is, each user and each item has a unique ID feature. Entity ID features are typically manually encoded sequentially. Items from different domains are usually different. For example, items in the video domain are videos, while items in the image-text domain are image-text items. Therefore, during the training of a cross-domain recommendation model, it is necessary not only to obtain the first sample items from the target domain but also the second sample items from the auxiliary domain, where the auxiliary domain is different from the target domain. This disclosure does not limit the number of auxiliary domains; that is, there can be one or more auxiliary domains. The similarity between users and items characterizes the interaction behavior between users and items. The greater the similarity, the richer the interaction behavior, indicating a higher level of user interest in the item.

[0064] The first target similarity between a sample user and the first sample item can be calculated based on the sample user's historical interaction behavior with the first sample item. Similarly, the second target similarity between a sample user and the second sample item can be calculated based on the sample user's historical interaction behavior with the second sample item. The process of calculating the similarity between users and items based on historical interaction behavior can refer to relevant technologies, and this disclosure does not impose any limitations on it. Both the first and second target similarities are ground truth values, which are the targets of model training.

[0065] Taking the target domain as domain A and the auxiliary domain as domain B, and the sample user M as an example, the training sample set includes the ID feature of the sample user M, the ID features of all items in domain A and domain B, and the target similarity between the sample user M and the sample items includes: the first target similarity between the sample user M and the first sample item in domain A, and the second target similarity between the sample user M and the second sample item in domain B.

[0066] In some possible implementations, the training sample set can be divided into a training positive sample set and a training negative sample set. For the same sample user, the corresponding training sample set can include a training positive sample set and a training negative sample set. The training positive sample set contains sample items that have historical interaction with the sample user (hereinafter referred to as "positive sample items"), while the training negative sample set contains sample items that have no historical interaction with the sample user (hereinafter referred to as "negative sample items"). Negative sample items can be divided into items that were historically recommended to the user but the user did not interact with, and items that were never recommended to the user. Since the user's interaction with the items reflects the user's level of interest in the items, the sample user's level of interest in positive sample items is much higher than the sample user's level of interest in negative sample items. That is, the target similarity between the sample user and positive sample items is much greater than the target similarity between the sample user and negative sample items. The number of positive and negative sample items can be the same or different; this disclosure does not impose any restrictions on this.

[0067] In conjunction with the above embodiments, positive sample items may include items from the first sample items that have historical interaction with sample user M, and items from the second sample items that have historical interaction with sample user M. Negative sample items may include items from the first sample items that do not have historical interaction with sample user M, and items from the second sample items that do not have historical interaction with sample user M.

[0068] In this embodiment, by setting up two types of sample sets, namely a training positive sample set and a training negative sample set, the model can be modified based on the training of the negative sample set, which helps to further improve the accuracy of model training.

[0069] S202: Input the training sample set into the model to be trained, so that the model to be trained generates a target domain sample user vector corresponding to the sample user and a first sample item vector corresponding to the first sample item, and outputs a first predicted similarity between the sample user and the first sample item based on the target domain sample user vector and the first sample item vector; wherein, the target domain sample user vector includes a target-specific sample user vector for representing the sample user's unique interest in the target domain, and a shared sample user vector for representing the sample user's general interest in the target domain and the auxiliary domain.

[0070] Figure 3 This is a schematic diagram of the architecture of a cross-domain recommendation model provided in an exemplary embodiment. For example... Figure 3 As shown, the cross-domain recommendation model includes a vector layer 301, a fusion layer 302, and a prediction layer 303. The vector layer 301 generates a target-specific sample user vector corresponding to the target domain, and a shared sample user vector corresponding to both the target and auxiliary domains. The target-specific sample user vector represents the sample user's unique interest in a first sample item in the target domain. The shared sample user vector represents the sample user's general interest in both the first and second sample items.

[0071] Furthermore, in vector layer 301, the model to be trained generates corresponding sample item vectors based on the ID features of the sample items. Since the main goal of this embodiment is to improve the recommendation effect in the target domain, a first sample item vector can be generated based on the ID features of the first sample item. The process of generating the sample user vector and the sample item vector can refer to related technologies, and this disclosure does not limit it.

[0072] The fusion layer 302 is used to merge the target-specific sample user vector and the shared sample user vector to obtain the target domain sample user vector. This target domain sample user vector covers the sample user's unique interests in the target domain, as well as the sample user's general interests in the target domain and auxiliary domain.

[0073] The prediction layer 303 is used to calculate the first predicted similarity between the sample user and the first sample item in the target domain based on the target domain sample user vector and the first sample item vector. For example, the similarity can be predicted by dot product operation. The dot product operation calculates the angle between two vectors. When the dot product value between the target domain sample user vector and a certain first sample item vector is the largest, it means that the angle between the two vectors is the smallest, that is, the two vectors are the closest, and that is, the similarity between the first sample item vector and the target domain sample user vector is the largest. Of course, those skilled in the art can also use other algorithms / techniques to calculate the first predicted similarity according to actual needs, and this disclosure does not limit this. After obtaining the first predicted similarity in the prediction layer, the first predicted similarity is output to facilitate the subsequent training process.

[0074] In some possible implementations, target-specific sample user vectors and shared sample user vectors are generated at the vector layer, specifically based on the sample user's ID features. The model to be trained maps the sample user's ID features to the corresponding target-specific sample user vector at the vector layer based on the interaction behavior between the sample user and the first sample item. Simultaneously, based on the interaction behavior between the sample user and the first and second sample items, the sample user's ID features are mapped to the shared sample user vector. Therefore, the shared sample user vector represents the sample user's general interest in the target and auxiliary domains, while the target-specific sample user vector represents the sample user's unique interest in the target domain. Then, the target-specific sample user vector and the shared sample user vector are fused at the fusion layer to obtain the target domain sample user vector. Specifically, an interest fusion function can be used to fuse the vectors, such as the concat or add function, or a multi-layer MLP network can be designed for learnable vector fusion. Different fusion functions achieve different effects. For example, using the concat function to fuse vectors increases the number of channels in the target domain sample user vector, but does not increase the features of the target domain sample user vector. The `add` function can add features to the target domain sample user vectors, making them more feature-rich, but it does not increase the number of channels in the target domain sample user vectors. Those skilled in the art can choose the specific fusion operation according to actual needs, and this disclosure does not impose any restrictions in this regard.

[0075] In this embodiment, by fusing the target-specific sample user vector corresponding to the target domain and the shared sample user vector corresponding to the target domain and auxiliary domain, the fused vector can cover the sample user's unique interests in the target domain and general interests in multiple domains, achieving the effect of interest transfer between domains, thereby depicting a more comprehensive range of sample user interests.

[0076] In some possible implementations, the model to be trained can also generate a second sample item vector based on the ID feature of the second sample item. Simultaneously, based on the interaction behavior between the sample user and the second sample item, the ID feature of the sample user is mapped to a corresponding auxiliary unique sample user vector. The auxiliary unique sample user vector represents the sample user's unique interest in the auxiliary domain. Then, the auxiliary unique sample user vector and the shared sample user vector are fused to obtain the auxiliary domain sample user vector. The auxiliary domain sample user vector encompasses the sample user's unique interest in the auxiliary domain, as well as the sample user's general interest in both the target domain and the auxiliary domain.

[0077] The second predicted similarity between a sample user and a second sample item in the auxiliary domain can be calculated based on the user vector in the auxiliary domain and the item vector in the second sample domain. The specific calculation method can be found in the calculation process for the first predicted similarity.

[0078] In this embodiment, based on the calculation of the first predicted similarity between the sample user and the first sample item in the target domain, the second predicted similarity between the sample user and the second sample item in the auxiliary domain is also calculated. This allows for simultaneous training of the target domain and the auxiliary domain, and ultimately, the cross-domain recommendation model trained can improve the recommendation performance of both the target domain and the auxiliary domain.

[0079] S203: The model is iteratively trained based on the first predicted similarity and the first target similarity until the first loss function converges or the number of iterations reaches the upper limit.

[0080] A loss function measures the difference between a model's predictions and the actual values. Generally, a smaller loss function indicates better model performance. The model is iteratively trained based on the first predicted similarity and the first target similarity. When the first loss function converges, it means the difference between the first predicted similarity and the first target similarity is very small or even zero. At this point, the model training is considered complete, and accurate recommendations for the target domain can be made to the user based on the first predicted similarity output by the model.

[0081] In the above embodiments, a shared user vector is introduced to represent the user's general interests in the target domain and at least one auxiliary domain that is different from the target domain. Then, the shared user vector and a unique user vector to represent the user's unique interests in the target domain are trained simultaneously. This allows the trained cross-domain recommendation model to accurately characterize the user's unique interests in the target domain and the general interests across multiple domains. Based on the unique interests and general interests, the model can achieve accurate content recommendation and diverse recommendations for users, effectively improving the recommendation effect in the target domain.

[0082] In some possible implementations, the first loss function may include a first result loss function corresponding to the target domain sample user vector, and a first intermediate value loss function corresponding to the target unique sample user vector and the shared sample user vector. The first result loss function is used to calculate the loss value of the predicted similarity between the target domain sample user vector and the first sample item vector.

[0083] Taking the target domain as domain A, the auxiliary domain as domain B, and the training sample set as including the training positive sample set and the training negative sample set as an example, the specific first result loss function is shown in formula (1):

[0084]

[0085] in, Let A represent the loss value of the first result loss function, A represent the target domain, u represent the sample user, i represent the positive training sample, and j represent the negative training sample. The target domain sample user vector representing sample user u in the target domain A. The vector representing the first positive sample item among the first sample items in the target domain. The first negative sample item vector represents the negative sample item in the first sample item of the target domain. Since the sample users are much more interested in the positive sample items than in the negative sample items, during the training process of positive and negative samples, the difference between the positive and negative samples is maximized, that is, the score of the positive sample is maximized and the score of the negative sample is minimized, so that the loss value is smaller and the convergence effect of the loss function is better.

[0086] In addition to training the target domain sample user vectors after merging, the model can also be trained on the target-specific sample user vectors and shared sample user vectors in the intermediate process. This allows the model to be trained from both the intermediate process dimension and the result dimension, which helps to further improve the training effect of the model and enhance its recommendation performance in the target domain.

[0087] The first intermediate value loss function is used to calculate the loss value of the predicted similarity between the target unique sample user vector and the first sample item vector, and the loss value of the predicted similarity between the shared sample user vector and the first sample item vector, as shown in formulas (2-1) and (2-2):

[0088]

[0089]

[0090] in, The vector representing the unique sample user u in the target domain A. The loss value representing the predicted similarity between the target-specific sample user vector and the first sample item vector; The shared sample user vector representing sample user u in the target domain A and the auxiliary domain B. The loss value representing the predicted similarity between the shared sample user vector and the first sample item vector, A, u, i, j, and The meaning of the representation is the same as in formula (1), and will not be repeated here.

[0091] In some possible implementations, to improve the recommendation performance in the auxiliary domain, the model can be iteratively trained based on the second predicted similarity and the second target similarity until the second loss function converges or the number of iterations reaches its upper limit. When the second loss function converges, it means that the difference between the second predicted similarity and the second target similarity is very small or even zero, which means that accurate recommendations for the auxiliary domain can be achieved for users based on the second predicted similarity output by the trained model.

[0092] Similarly, the second loss function may include a second result loss function corresponding to the auxiliary domain sample user vector, and a second intermediate value loss function corresponding to the auxiliary unique sample user vector and the shared sample user vector. The second result loss function is used to calculate the loss value of the predicted similarity between the auxiliary domain sample user vector and the second sample item vector. In conjunction with the above embodiments, the specific second result loss function is shown in formula (3):

[0093]

[0094] in, The loss value of the second result loss function is represented by B, the auxiliary domain is represented by u, the sample user is represented by i, the training positive sample is represented by j, and the training negative sample is represented by j. The auxiliary domain sample user vector representing sample user u in the auxiliary domain B. The vector representing the second positive sample item in the second sample item of the auxiliary domain. The vector representing the second negative sample item in the second sample item of the auxiliary domain. Similarly, during the training process of positive and negative samples, by maximizing the difference between positive and negative samples, i.e., maximizing the score of positive samples and minimizing the score of negative samples, the loss value is minimized and the convergence effect of the loss function is better.

[0095] The second intermediate value loss function is used to calculate the loss value of the predicted similarity between the auxiliary unique sample user vector and the second sample item vector, as well as the loss value of the predicted similarity between the shared sample user vector and the second sample item vector, as shown in formulas (4-1) and (4-2):

[0096]

[0097]

[0098] in, The auxiliary unique sample user vector representing sample user u in the auxiliary domain B. The loss value representing the predicted similarity between the auxiliary unique sample user vector and the second sample item vector; The shared sample user vector representing sample user u in the target domain A and the auxiliary domain B. The loss value representing the predicted similarity between the shared sample user vector and the second sample item vector, B, u, i, j, and The meaning of the representation is the same as in formula (3), and will not be repeated here.

[0099] In this embodiment, in addition to training the merged auxiliary domain sample user vectors, the auxiliary unique sample user vectors and shared sample user vectors in the intermediate process can also be trained. This allows the model to be trained from both the intermediate process dimension and the result dimension, which helps to further improve the training effect of the model and enhance the recommendation performance of the model in the auxiliary domain.

[0100] In the above embodiments, while training on the first predicted similarity between sample users and items in the target domain, training on the second predicted similarity between sample users and items in the auxiliary domain is also performed. The cross-domain recommendation model that is finally trained can improve the recommendation effect in multiple domains, including the target domain and the auxiliary domain.

[0101] The cross-domain recommendation model trained as described above Figure 4 This is a flowchart illustrating a cross-domain recommendation method as provided in an exemplary embodiment. The method can be applied to, for example... Figure 1 Any of the electronic devices shown. The cross-domain recommendation method may include:

[0102] S401: Obtain the ID characteristics of the target user and the ID characteristics of the items to be recommended in the target domain.

[0103] To make cross-domain recommendations to a target user within a target domain, it is necessary to obtain the ID feature of the target user and the ID feature of the items to be recommended in the target domain.

[0104] S402: Based on the ID features of the target user and the ID features of the item to be recommended, generate a user vector corresponding to the target user and an item vector corresponding to the item to be recommended, respectively; wherein, the user vector includes a unique user vector for representing the unique interests of the target user in the target domain, and a shared user vector for representing the general interests of the target user in the target domain and at least one auxiliary domain different from the target domain.

[0105] The target user's ID features and the ID features of the items to be recommended are input into the cross-domain recommendation model that has been trained. In the vector layer of the model, a corresponding item vector is generated based on the ID features of the items to be recommended. Based on the target user's ID features, a unique user vector is generated to represent the target user's unique interests in the target domain, and a shared user vector is generated to represent the target user's general interests in the target domain and at least one auxiliary domain different from the target domain. Then, the unique user vector and the shared user vector are fused to obtain the user vector. The user vector covers the target user's unique interests in the target domain, as well as the target user's general interests in the target domain and auxiliary domains, providing a more comprehensive representation of user interests. The specific generation and fusion methods of the vectors can be referred to the steps in S202 above, and will not be repeated here.

[0106] S403: Calculate the similarity between the target user and the item to be recommended based on the user vector and the item vector, and recommend a preset number of target items to the target user based on the similarity.

[0107] In the model's prediction layer, the similarity between the user vector and the item vector of the item to be recommended is calculated. A higher similarity between a user vector and the item vector of a particular item indicates a higher level of interest from the target user. Therefore, items to be recommended can be sorted from highest to lowest similarity, and a predetermined number of target items can be selected from the sorted queue and recommended to the target user. For example, items with the highest similarity can be recommended to the target user.

[0108] In this embodiment, the trained model enables cross-domain recommendations to users. Since the model training incorporates general interests between the target domain and auxiliary domains (multiple domains), the trained model can achieve accurate and diverse recommendations for the target domain based on the user's unique interests in the target domain and general interests (more comprehensive interests) across multiple domains.

[0109] Furthermore, since the model training process also trains the user vectors related to the user in the auxiliary domain, it can also achieve accurate and diverse recommendations in the auxiliary domain based on the user's unique interests in the auxiliary domain and common interests across multiple domains.

[0110] Exemplary device

[0111] In an exemplary embodiment of this disclosure, a training apparatus for a cross-domain recommendation model is also provided.

[0112] Please see Figure 5 , Figure 5 This is a block diagram of a training apparatus for a cross-domain recommendation model provided in an exemplary embodiment.

[0113] like Figure 5 As shown, the training device 500 for the cross-domain recommendation model may include: a sample acquisition unit 501, an output unit 502, and a training unit 503. Wherein:

[0114] The sample acquisition unit 501 is used to acquire a training sample set, which includes the ID features of sample users, the ID features of sample items, and the target similarity between the sample users and the sample items; the sample items include a first sample item in the target domain and a second sample item in at least one auxiliary domain that is different from the target domain; the target similarity includes a first target similarity between the sample users and the first sample item, and a second target similarity between the sample users and the second sample item.

[0115] The output unit 502 is configured to input the training sample set into the model to be trained, so that the model to be trained generates a target domain sample user vector corresponding to the sample user and a first sample item vector corresponding to the first sample item, and outputs a first predicted similarity between the sample user and the first sample item based on the target domain sample user vector and the first sample item vector; wherein, the target domain sample user vector includes a target-specific sample user vector representing the sample user's unique interest in the target domain, and a shared sample user vector representing the sample user's general interest in the target domain and the auxiliary domain.

[0116] The training unit 503 is used to iteratively train the model based on the first predicted similarity and the first target similarity until the first loss function converges or the number of iterations reaches the upper limit.

[0117] Optionally, the training sample set includes a training positive sample set and a training negative sample set, wherein the training positive sample set contains sample items that have historical interaction behavior with the sample user, and the training negative sample set contains sample items that have no such historical interaction behavior with the sample user.

[0118] Optionally, the output unit 502 is specifically used for the model to be trained to generate the target unique sample user vector and the shared sample user vector based on the ID features of the sample users; and to fuse the target unique sample user vector and the shared sample user vector to obtain the target domain sample user vector.

[0119] Optionally, the device further includes:

[0120] The auxiliary training unit 504 is used to generate an auxiliary domain sample user vector corresponding to the sample user and a second sample item vector corresponding to the second sample item for the model to be trained, and output a second predicted similarity between the sample user and the second sample item based on the auxiliary domain sample user vector and the second sample item vector; wherein, the auxiliary domain sample user vector includes an auxiliary unique sample user vector representing the sample user's unique interest in the auxiliary domain, and the shared sample user vector; the model is iteratively trained based on the second predicted similarity and the second target similarity until the second loss function converges or the number of iterations reaches the upper limit.

[0121] Optionally, the first loss function includes a first result loss function corresponding to the target domain sample user vector, and a first intermediate value loss function corresponding to the target unique sample user vector and the shared sample user vector; the second loss function includes a second result loss function corresponding to the auxiliary domain sample user vector, and a second intermediate value loss function corresponding to the auxiliary unique sample user vector and the shared sample user vector.

[0122] Optionally, the first result loss function is used to calculate the loss value of the predicted similarity between the target domain sample user vector and the first sample item vector; the second result loss function is used to calculate the loss value of the predicted similarity between the auxiliary domain sample user vector and the second sample item vector.

[0123] Optionally, the first intermediate value loss function is used to calculate the loss value of the predicted similarity between the target unique sample user vector and the first sample item vector, and the loss value of the predicted similarity between the shared sample user vector and the first sample item vector; the second intermediate value loss function is used to calculate the loss value of the predicted similarity between the auxiliary unique sample user vector and the second sample item vector, and the loss value of the predicted similarity between the shared sample user vector and the second sample item vector.

[0124] The specific details of each module of the training device 500 for the aforementioned cross-domain recommendation model have been described in detail in the previous description of the training method and process of the cross-domain recommendation model, so they will not be repeated here.

[0125] In addition, a cross-domain recommendation device is also provided. See [link / reference]. Figure 6 , Figure 6 This is a block diagram of a cross-domain recommendation device provided in an exemplary embodiment.

[0126] like Figure 6 As shown, the cross-domain recommendation device 600 may include: an acquisition unit 601, a generation unit 602, and a recommendation unit 603. Wherein:

[0127] The acquisition unit 601 is used to acquire the ID features of the target user and the ID features of the items to be recommended in the target domain.

[0128] The generation unit 602 is configured to generate a user vector corresponding to the target user and an item vector corresponding to the item to be recommended, based on the ID features of the target user and the ID features of the item to be recommended, respectively; wherein, the user vector includes a unique user vector representing the unique interests of the target user in the target domain, and a shared user vector representing the general interests of the target user in the target domain and at least one auxiliary domain different from the target domain.

[0129] The recommendation unit 603 is used to calculate the similarity between the target user and the item to be recommended based on the user vector and the item vector, and recommend a preset number of target items to the target user based on the similarity.

[0130] The specific details of each module of the aforementioned cross-domain recommendation device 600 have been described in detail in the previous description of the cross-domain recommendation method process, so they will not be repeated here.

[0131] It should be noted that although the training device 500 and several modules or units of the cross-domain recommendation device 600 are mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0132] Exemplary media

[0133] In exemplary embodiments of this disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of this disclosure may also be implemented as a program product including program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of this disclosure.

[0134] Please see Figure 7 , Figure 7 This is a schematic diagram of a readable storage medium provided in an exemplary embodiment, which is capable of implementing the above-described cross-domain recommendation model training method or cross-domain recommendation method.

[0135] refer to Figure 7 As shown, a readable storage medium 700 for implementing the above-described method according to an embodiment of the present disclosure is described. This medium may be a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the readable storage medium of the present disclosure is not limited thereto. In this disclosure, the readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0136] The readable storage medium may be any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof.

[0137] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0138] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0139] Program code for performing the operations of this disclosure can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0140] Exemplary electronic devices

[0141] In an exemplary embodiment of this disclosure, an electronic device is also provided, which is capable of implementing the above-described cross-domain recommendation model training method or cross-domain recommendation method.

[0142] Please see Figure 8 , Figure 8 This is a schematic diagram of an electronic device capable of implementing the above-described method, provided as an exemplary embodiment.

[0143] The following reference Figure 8 To describe an electronic device 800 according to such an embodiment of the present disclosure. Figure 8 The electronic device 800 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments disclosed herein.

[0144] like Figure 8 As shown, the electronic device 800 is manifested in the form of a general-purpose computing device. The components of the electronic device 800 may include, but are not limited to: at least one processing unit 801, at least one storage unit 802, and a bus 803 connecting different system components (including storage unit 802 and processing unit 801).

[0145] The storage unit stores program code, which can be executed by the processing unit 801, causing the processing unit 801 to perform the steps of the various embodiments described above.

[0146] Storage unit 802 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 8021 and / or a cache memory unit 8022, and may further include a read-only memory unit (ROM) 8023.

[0147] Storage unit 802 may also include a program / utility 8024 having a set (at least one) program module 8025, such program module 8025 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may contain the reality of the network environment.

[0148] Bus 803 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0149] Electronic device 800 can also communicate with one or more external devices 804 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with the electronic device 800, and / or with any device that enables the electronic device 800 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 805. Furthermore, electronic device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 806. As shown, network adapter 806 communicates with other modules of electronic device 800 via bus 803. It should be understood that, although... Figure 8 As not shown in the diagram, other hardware and / or software modules may be used in conjunction with the electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0150] From the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, external hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the methods according to the embodiments of this disclosure.

[0151] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.

[0152] It should be noted that although several units / modules or sub-units / modules of the apparatus have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided and embodied by multiple units / modules.

[0153] Furthermore, although the operations of the methods disclosed herein are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all of the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.

[0154] While the spirit and principles of this disclosure have been described with reference to several specific embodiments, it should be understood that this disclosure is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for convenience of expression. This disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims

1. A training method for a cross-domain recommendation model, characterized in that, The method includes: A training sample set is obtained, which includes the ID features of sample users, the ID features of sample items, and the target similarity between the sample users and the sample items; the sample items include a first sample item in the target domain and a second sample item in at least one auxiliary domain that is different from the target domain; the target similarity includes a first target similarity between the sample user and the first sample item, and a second target similarity between the sample user and the second sample item; The training sample set is input into the model to be trained, so that the model to be trained generates a target domain sample user vector corresponding to the sample user and a first sample item vector corresponding to the first sample item, and outputs a first predicted similarity between the sample user and the first sample item based on the target domain sample user vector and the first sample item vector; wherein, the target domain sample user vector includes a target-specific sample user vector for representing the sample user's unique interest in the target domain, and a shared sample user vector for representing the sample user's general interest in the target domain and the auxiliary domain; The model to be trained generates an auxiliary domain sample user vector corresponding to the sample user and a second sample item vector corresponding to the second sample item, and outputs a second predicted similarity between the sample user and the second sample item based on the auxiliary domain sample user vector and the second sample item vector; wherein, the auxiliary domain sample user vector includes an auxiliary unique sample user vector used to characterize the sample user's unique interest in the auxiliary domain, and the shared sample user vector; The model is iteratively trained based on the first predicted similarity and the first target similarity until the first loss function converges or the number of iterations reaches the upper limit. The model is iteratively trained based on the second predicted similarity and the second target similarity until the second loss function converges or the number of iterations reaches the upper limit. The first loss function includes a first result loss function corresponding to the target domain sample user vector and a first intermediate value loss function corresponding to the target unique sample user vector and the shared sample user vector; the second loss function includes a second result loss function corresponding to the auxiliary domain sample user vector and a second intermediate value loss function corresponding to the auxiliary unique sample user vector and the shared sample user vector; the first intermediate value loss function is used to calculate the loss value of the predicted similarity between the target unique sample user vector and the first sample item vector, and the loss value of the predicted similarity between the shared sample user vector and the first sample item vector; the second intermediate value loss function is used to calculate the loss value of the predicted similarity between the auxiliary unique sample user vector and the second sample item vector, and the loss value of the predicted similarity between the shared sample user vector and the second sample item vector.

2. The method according to claim 1, characterized in that, The training sample set includes a training positive sample set and a training negative sample set. The training positive sample set contains sample items that have historical interaction behavior with the sample user, and the training negative sample set contains sample items that have no such historical interaction behavior with the sample user.

3. The method according to claim 1, characterized in that, The model to be trained generates a target domain sample user vector corresponding to the sample user, including: The model to be trained generates the target unique sample user vector and the shared sample user vector based on the ID features of the sample users; The target-specific sample user vector and the shared sample user vector are fused to obtain the target domain sample user vector.

4. The method according to claim 1, characterized in that, The first result loss function is used to calculate the loss value of the predicted similarity between the target domain sample user vector and the first sample item vector; the second result loss function is used to calculate the loss value of the predicted similarity between the auxiliary domain sample user vector and the second sample item vector.

5. A cross-domain recommendation method, characterized in that, The method includes: Obtain the ID characteristics of the target user and the ID characteristics of the items to be recommended in the target domain; Based on the ID features of the target user and the ID features of the item to be recommended, a cross-domain recommendation model obtained by any one of claims 1-4 is used to generate a user vector corresponding to the target user and an item vector corresponding to the item to be recommended, respectively; wherein, the user vector includes a unique user vector for representing the unique interests of the target user in the target domain, and a shared user vector for representing the general interests of the target user in the target domain and at least one auxiliary domain different from the target domain; Based on the user vector and the item vector, the similarity between the target user and the item to be recommended is calculated using the cross-domain recommendation model, and a preset number of target items are recommended to the target user based on the similarity.

6. A training device for a cross-domain recommendation model, characterized in that, The device includes: A sample acquisition unit is used to acquire a training sample set, which includes the ID features of sample users, the ID features of sample items, and the target similarity between the sample users and the sample items; the sample items include a first sample item in the target domain and a second sample item in at least one auxiliary domain that is different from the target domain; the target similarity includes a first target similarity between the sample user and the first sample item, and a second target similarity between the sample user and the second sample item; The output unit is configured to input the training sample set into the model to be trained, so that the model to be trained generates a target domain sample user vector corresponding to the sample user and a first sample item vector corresponding to the first sample item, and outputs a first predicted similarity between the sample user and the first sample item based on the target domain sample user vector and the first sample item vector; wherein, the target domain sample user vector includes a target-specific sample user vector representing the sample user's unique interest in the target domain, and a shared sample user vector representing the sample user's general interest in the target domain and the auxiliary domain; The training unit is used to iteratively train the model based on the first predicted similarity and the first target similarity until the first loss function converges or the number of iterations reaches the upper limit. An auxiliary training unit is configured to generate an auxiliary domain sample user vector corresponding to the sample user and a second sample item vector corresponding to the second sample item for the model to be trained, and output a second predicted similarity between the sample user and the second sample item based on the auxiliary domain sample user vector and the second sample item vector; wherein, the auxiliary domain sample user vector includes an auxiliary unique sample user vector representing the sample user's unique interest in the auxiliary domain, and a shared sample user vector; the model is iteratively trained based on the second predicted similarity and the second target similarity until the second loss function converges or the number of iterations reaches the upper limit; wherein, the first loss function includes a first result loss function corresponding to the target domain sample user vector and a loss function corresponding to the target domain sample item vector. The first intermediate value loss function is used to calculate the predicted similarity between the target unique sample user vector and the first sample item vector, and the predicted similarity between the shared sample user vector and the first sample item vector. The second intermediate value loss function is used to calculate the predicted similarity between the auxiliary unique sample user vector and the second sample item vector, and the predicted similarity between the shared sample user vector and the second sample item vector.

7. The apparatus according to claim 6, characterized in that, The training sample set includes a training positive sample set and a training negative sample set. The training positive sample set contains sample items that have historical interaction behavior with the sample user, and the training negative sample set contains sample items that have no such historical interaction behavior with the sample user.

8. The apparatus according to claim 6, characterized in that, The model to be trained generates a target domain sample user vector corresponding to the sample user, including: The model to be trained generates the target unique sample user vector and the shared sample user vector based on the ID features of the sample users; The target-specific sample user vector and the shared sample user vector are fused to obtain the target domain sample user vector.

9. The apparatus according to claim 6, characterized in that, The first result loss function is used to calculate the loss value of the predicted similarity between the target domain sample user vector and the first sample item vector; the second result loss function is used to calculate the loss value of the predicted similarity between the auxiliary domain sample user vector and the second sample item vector.

10. A cross-domain recommendation device, characterized in that, The device includes: The acquisition unit is used to acquire the ID characteristics of the target user and the ID characteristics of the items to be recommended in the target domain; The generation unit is configured to generate, based on the ID features of the target user and the ID features of the item to be recommended, a cross-domain recommendation model obtained by any one of claims 1-4, a user vector corresponding to the target user and an item vector corresponding to the item to be recommended, respectively; wherein, the user vector includes a unique user vector representing the unique interests of the target user in the target domain, and a shared user vector representing the general interests of the target user in the target domain and at least one auxiliary domain different from the target domain; The recommendation unit is used to calculate the similarity between the target user and the item to be recommended based on the user vector and the item vector through the cross-domain recommendation model, and recommend a preset number of target items to the target user based on the similarity.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1-5.

12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1-5.

Citation Information

Patent Citations

  • Article recommendation method, device and equipment and computer readable storage medium

    CN111291274A

  • Article recommendation model training method of virtual space and article recommendation method and device

    CN115601109A

  • Multi-source heterogeneous migration model training method, device and equipment

    CN116362321A

  • Cross-domain recommendation method and device based on federal learning and attention mechanism

    CN116431915A