Cross-domain recommendation method and related equipment

By obtaining data sets from multiple fields in the recommendation system, feature extraction and weight weighting fusion are performed, data sparse problems are solved, and the performance and user experience of the recommendation system are improved.

CN119441633APending Publication Date: 2025-02-14ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411471069.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-21
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

When dealing with sparse data, it is difficult for existing recommendation systems to accurately analyze user preferences, resulting in poor recommendation performance and low recommendation accuracy.

Method used

By obtaining data sets from multiple fields, feature extraction is performed for the target entity, weighting is determined based on the data density of each field, and weighting is carried out to improve the recommended performance of the target field.

Benefits of technology

Effectively utilize data from auxiliary fields, improve the recommendation accuracy and performance of target fields, and improve user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119441633A_ABST
    Figure CN119441633A_ABST
Patent Text Reader

Abstract

The invention provides a cross-domain recommendation method and related equipment. The method comprises the following steps: acquiring data sets of a plurality of fields; wherein the data set of each field comprises data related to a plurality of entities in the field; the plurality of entities comprise a target entity; on the basis of the data sets of the multiple fields, feature extraction is carried out on the target entities, and multiple target entity features corresponding to the multiple fields are obtained; determining the weight of the plurality of fields relative to any target field in the plurality of fields according to the data density of the entities contained in the data set of the plurality of fields; and based on the weights of the plurality of fields, performing weighted fusion on the plurality of target entity features, and based on the target entity features after weighted fusion, executing a recommendation task related to the target entity in the target field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] One or more embodiments of the present specification relate to the technical field of cross-domain recommendation, and in particular, to a cross-domain recommendation method and related devices. Background Art

[0002] In most recommendation systems, user preferences in a certain field are usually analyzed based on the interaction between users and items in that field (such as likes, ratings, and comments), so as to predict items that users are interested in and recommend them to users. However, some users tend to have only interaction with a very small number of items, especially newly registered users have no interaction with any items, or newly added items have no interaction with any users. This phenomenon of lack of interaction is also called data sparsity problem.

[0003] Data sparsity is a long-standing problem in many recommendation systems. Since the data in sparse domains is very limited, it is impossible to accurately analyze user preferences, resulting in poor recommendation performance and low recommendation accuracy in sparse domains. To this end, cross-domain recommendation technology is proposed. The basic idea of ​​cross-domain recommendation is to use data from auxiliary domains (or source domains) to improve the recommendation performance of the target domain. For example, data from social media and short video domains can be used to assist in recommending products to users in the shopping domain.

[0004] Therefore, how to reasonably utilize the data in the auxiliary field to effectively improve the recommendation performance in the target field is an urgent problem to be solved. Summary of the invention

[0005] In view of this, one or more embodiments of the present specification provide a cross-domain recommendation method and related devices.

[0006] In a first aspect, this specification provides a cross-domain recommendation method, the method comprising:

[0007] Acquire data sets in multiple fields; wherein the data sets in each field include data related to multiple entities in the field; the multiple entities include a target entity;

[0008] Based on the data sets of the multiple fields, feature extraction is performed on the target entities respectively to obtain multiple target entity features corresponding to the multiple fields;

[0009] determining weights of the plurality of fields relative to any target field among the plurality of fields according to data densities of entities contained in the data sets of the plurality of fields;

[0010] Based on the weights of the multiple fields, the multiple target entity features are weightedly fused, and based on the weighted fused target entity features, a recommendation task related to the target entity is performed in the target field.

[0011] In a second aspect, this specification provides a cross-domain recommendation device, the device comprising:

[0012] An acquisition unit, configured to acquire data sets in multiple fields; wherein the data sets in each field include data related to multiple entities in the field; and the multiple entities include a target entity;

[0013] A feature extraction unit, configured to extract features for the target entities based on the data sets of the multiple fields, and obtain multiple target entity features corresponding to the multiple fields;

[0014] a weight determination unit, configured to determine weights of the plurality of fields relative to any target field among the plurality of fields according to data densities of entities contained in the data sets of the plurality of fields;

[0015] The recommendation unit is used to perform weighted fusion on the multiple target entity features based on the weights of the multiple fields, and perform a recommendation task related to the target entity in the target field based on the weighted fusion target entity features.

[0016] Accordingly, the present specification also provides a computing device, comprising: a memory and a processor; the memory stores a computer program / instruction that can be executed by the processor; when the processor executes the computer program / instruction, the cross-domain recommendation method described in the first aspect above is executed.

[0017] Accordingly, the present specification also provides a computer-readable storage medium on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the cross-domain recommendation method as described in the first aspect above is executed.

[0018] Accordingly, the present specification also provides a computer program product, which includes a computer program / instruction. When the computer program / instruction is executed by a processor, the cross-domain recommendation method as described in the first aspect above is executed.

[0019] In summary, the present application can determine the weights of different fields relative to the target field according to the data density of different fields, that is, determine the different needs of the target field to migrate knowledge from different fields (including the target field itself). Furthermore, for public entities (such as target entities) included in multiple fields, the public entity features extracted from multiple fields can be weighted and fused according to the respective weights of the multiple fields. Subsequently, the more comprehensive and accurate public entity features after the weighted fusion can be used to assist the target field in performing recommendation tasks related to the public entity, thereby effectively improving the recommendation quality of the target field, ensuring cross-domain recommendation performance, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1a-1d is a schematic diagram of a set of cross-domain recommendation paradigms provided by an exemplary embodiment;

[0021] Figure 2 is a flowchart of a cross-domain recommendation method provided by an exemplary embodiment;

[0022] Figure 3 is a schematic diagram of a fine-tuning process of another cross-domain recommendation method provided by an exemplary embodiment;

[0023] Figure 4 is a schematic diagram of shielding attention weights based on a mask vector provided by an exemplary embodiment;

[0024] Figure 5 is a structural schematic diagram of a cross-domain recommendation device provided by an exemplary embodiment;

[0025] Figure 6 It is a structural diagram of a computing device provided by an exemplary embodiment. DETAILED DESCRIPTION

[0026] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with one or more embodiments of this specification. Instead, they are merely examples of devices and methods consistent with some aspects of one or more embodiments of this specification as detailed in the appended claims.

[0027] It should be noted that: in other embodiments, the steps of the corresponding method are not necessarily performed in the order shown and described in this specification. In some other embodiments, the steps included in the method may be more or less than those described in this specification. In addition, a single step described in this specification may be decomposed into multiple steps for description in other embodiments; and multiple steps described in this specification may be combined into a single step for description in other embodiments.

[0028] It should be noted that the “plurality” mentioned in this application refers to two or more than two.

[0029] In addition, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0030] First, some terms in this specification are explained to facilitate understanding by those skilled in the art.

[0031] (1) Cross-Domain Recommendation (CDR) is a recommendation system technology that uses data from one or more source domains to improve the quality of recommendations in the target domain. In traditional recommendation systems, recommendation algorithms usually only use data from a single domain to predict user preferences. However, in practical applications, user behaviors and interests are often multifaceted and may span different domains or platforms. For example, a user's shopping behavior, social media activities, and online video viewing history all reflect the user's interests and preferences.

[0032] Cross-domain recommendation aims to solve the following problems:

[0033] Cold-Start Problem: When a new user or item joins the recommendation system, due to the lack of historical interaction data, traditional recommendation methods find it difficult to accurately generate personalized recommendations for these new users or items. Cross-domain recommendation can alleviate the cold-start problem by leveraging data in other domains.

[0034] Data sparsity problem: In many cases, even the existing interactions between users and items are very sparse, which means that most users do not give feedback on most items, such as likes, ratings, and comments. Cross-domain recommendations can increase the amount of available information by introducing data from other domains, thereby improving recommendation accuracy.

[0035] Enhanced diversity: Data from different fields can help capture more comprehensive and diverse user interests, thereby providing richer and more diverse recommendation results.

[0036] See also Figure 1a-1d , Figure 1a-1d It is a schematic diagram of a set of cross-domain recommendation paradigms provided by an exemplary embodiment.

[0037] like Figure 1a-1d As shown in Figure 2, according to the migration paradigm, existing cross-domain recommendation models can generally be divided into four categories:

[0038] a. One-to-one paradigm refers to using data from a source domain to improve the recommendation performance of a target domain.

[0039] b. Many-to-one paradigm refers to using data from multiple source domains to improve the recommendation performance of a target domain.

[0040] c. One-to-many paradigm refers to using data from one source domain to improve the recommendation performance of multiple target domains.

[0041] d. Many-to-many paradigm refers to using data from multiple fields to improve the recommendation performance of these multiple fields. Among them, the many-to-many paradigm can serve almost all CDR scenarios, that is, the many-to-many paradigm can be applied to the other three paradigms.

[0042] (2) Negative Transfer. Although cross-domain recommendation can use data from different domains to improve recommendation performance, in practice, it may encounter the problem of negative transfer. Negative transfer refers to the fact that some source domains or some data in the source domain are "negative information" for the target domain. If the data in different source domains cannot be reasonably used and the data from different source domains are simply directly transferred to the target domain, the recommendation quality of the target domain will be seriously reduced. Especially in many-to-many cross-domain recommendation, as the number of source domains continues to increase, the negative transfer problem becomes more serious.

[0043] Based on this, this specification provides a technical solution that can clarify the weights of different fields relative to the target field based on the data density of different fields, so that the target field can reasonably utilize the data in different fields according to the weights of different fields to effectively assist the target field in performing recommendation tasks.

[0044] During implementation, the present application first obtains data sets in multiple fields; wherein the data sets in each field contain data related to multiple entities in the field, and the multiple entities may include a target entity. Furthermore, the present application may perform feature extraction for the target entity based on the data sets in multiple fields, and obtain multiple target entity features corresponding to the multiple fields. Furthermore, the present application may determine the weights of the multiple fields relative to any target field in the multiple fields based on the data density of the entities contained in the data sets in the multiple fields. Furthermore, the present application may perform weighted fusion of the above-mentioned multiple target entity features based on the weights of the multiple fields, and perform recommendation tasks related to the target entity in the target field based on the weighted fusion of the target entity features.

[0045] In the above technical solution, the present application can determine the weights of different fields relative to the target field according to the data density of different fields, that is, determine the different degrees of demand for the target field to migrate knowledge from different fields (including the target field itself). Furthermore, for public entities (such as target entities) included in multiple fields, the public entity features extracted from multiple fields can be weighted and fused according to the weights of the multiple fields. Subsequently, the more comprehensive and accurate public entity features after the weighted fusion can be used to assist the target field in performing recommendation tasks related to the public entity, thereby effectively improving the recommendation quality of the target field, ensuring cross-domain recommendation performance, and improving the user experience.

[0046] See also Figure 2 , Figure 2 FIG. 1 is a flow chart of a cross-domain recommendation method provided by an exemplary embodiment. The method can be applied to a cross-domain recommendation system. Figure 2 As shown, the method may specifically include the following steps S201 to S204.

[0047] Step S201, obtaining data sets in multiple fields; wherein the data sets in each field include data related to multiple entities in the field; and the multiple entities include a target entity.

[0048] First, the cross-domain recommendation system can first obtain data sets in multiple fields, wherein the data sets in each field can contain data related to multiple entities in the field.

[0049] In an illustrated embodiment, the data set of each field may be a heterogeneous graph constructed based on data related to multiple entities in the field. The heterogeneous graph of each field may include multiple different types of nodes and edges connecting the nodes, the nodes may represent entities in the field, and the edges may represent the relationships between the entities.

[0050] Illustratively, the above-mentioned multiple fields may include any multiple fields in the fields of shopping, short video, music, gaming, and social media, and this specification does not specifically limit this.

[0051] Exemplarily, the above-mentioned different types of nodes (entities) may include users and items, and the edges connecting users and items may represent various interactive relationships such as likes, comments, ratings, reposts, purchases or collections, etc., which are not specifically limited in this specification.

[0052] In an illustrated embodiment, there may be associations between multiple fields. Accordingly, the multiple entities included in the multiple fields may have the same target entity (ie, a common entity), such as the same target user or the same target item.

[0053] In one illustrated embodiment, see Figure 3 , Figure 3 FIG. 1 is a flow chart of another cross-domain recommendation method provided by an exemplary embodiment. Figure 3 As shown, the multiple fields may specifically include field D 0 、Field D 1 and field D 2 , and field D 0 、Field D 1 and field D 2 The heterogeneous graph includes common target entities, such as the same target users.

[0054] For example, Figure 3 The area D shown 0 It can be the shopping field, correspondingly, field D 0 The heterogeneous graph G 0 It can include the interactive relationships between multiple users and multiple products, such as browsing, evaluating, adding to cart and shopping.

[0055] For example, Figure 3 Area D shown 1 It can be the short video field, correspondingly, field D 1 The heterogeneous graph G 1 The video may include interactions between multiple users and multiple videos, such as play, like, comment, and forward.

[0056] For example, Figure 3 Area D shown 2 It can be the field of music, correspondingly, field D 2 The heterogeneous graph G 2 The interactive relationship between multiple users and multiple music works may be included, such as playing, liking, commenting and rating, etc., which is not specifically limited in this specification.

[0057] Step S202: Based on the data sets of the multiple fields, feature extraction is performed on the target entities respectively to obtain multiple target entity features corresponding to the multiple fields.

[0058] Furthermore, the cross-domain recommendation system can extract features of the target entities in each of the multiple fields based on the data set of the field (such as a heterogeneous graph) to obtain the target entity features in the field, and finally obtain multiple target entity features corresponding one-to-one to the multiple fields.

[0059] It should be noted that this specification does not specifically limit the specific implementation method of feature extraction.

[0060] In one illustrated embodiment, the cross-domain recommendation system can adopt a graph embedding method to perform graph embedding processing on target entities in multiple fields based on heterogeneous graphs in multiple fields, thereby obtaining multiple embedding vectors for characterizing the target entities in the multiple fields, that is, obtaining multiple target entity embeddings corresponding one-to-one to the multiple fields.

[0061] For example, assuming that the target domain is the shopping domain and the target entity is the target user, the target user embedding in the target domain can be used to characterize the shopping preference of the target user; assuming that the target domain is the shopping domain and the target entity is the target item, the target item embedding in the target domain can be used to characterize the group of people who like the target item, and so on. This specification does not make any specific limitations on this.

[0062] Furthermore, in addition to common target entities in multiple fields, the graph embedding method can also be used for other entities in each field (such as other users and objects) to generate embeddings for each entity in each field, which is not specifically limited in this specification.

[0063] In one illustrated embodiment, in order to ensure the lightweight of the graph embedding structure and reduce the complexity of the graph embedding, a re-examined graph neural network may be used to learn the embedding of users and items.

[0064] For example, field D x User U i The embedded update rule can be expressed as follows:

[0065]

[0066] in, It is field D x User U in i The embedding at iteration step q+1, d i It is field D x The heterogeneous graph G x User U in i The angle of Ri is the heterogeneous graph G x User U i Neighbor set, W x,q It is field D x The transformation parameters.

[0067] For example, field D x Items in V j The embedding update rule of can be shown as follows:

[0068]

[0069] in, It is field D x Items in V j The embedding at iteration step q+1, d j It is field D x The heterogeneous graph G x Items in V j The angle of Rj is the heterogeneous graph G x Medium Item V j Neighbor set, W x,q It is field D x The transformation parameters.

[0070] Please also read Figure 3 , combined with the above formula (1) and formula (2), taking the target entity as the target user as an example, Figure 3 From the field D 0 The target entity feature 0 extracted from Take the target entity as the target item as an example, Figure 3 From the field D 0 The target entity feature 0 extracted from

[0071] Similarly, taking the target entity as the target user as an example, Figure 3 From the field D 1 The target entity feature 1 extracted from Take the target entity as the target item as an example, Figure 3 From the field D 1The target entity feature 1 extracted from

[0072] Similarly, taking the target entity as the target user as an example, Figure 3 From the field D 2 The target entity feature 2 extracted from Take the target entity as the target item as an example, Figure 3 From the field D 2 The target entity feature 2 extracted from

[0073] Step S203: determining weights of the multiple fields relative to any target field in the multiple fields according to the data density of the entities contained in the data sets of the multiple fields.

[0074] It should be noted that the knowledge transfer strategy in traditional cross-domain recommendation systems tends to transfer knowledge learned from one domain to another. However, in many-to-many cross-domain recommendation scenarios, things become more complicated because many-to-many cross-domain recommendations need to utilize data from multiple domains to improve their own recommendation performance. Based on this, in an illustrated embodiment, multiple embeddings of public entities (such as the above-mentioned target entities) generated from multiple domains can be combined through an attention mechanism to obtain a combined embedding of public entities in each domain, wherein the combined embedding of public entities in each domain can retain the knowledge learned from multiple domains to varying degrees.

[0075] It should be noted that the attention mechanism can give different attention to the public entity embeddings (such as target user embeddings / target item embeddings) generated from different fields. Based on this, for public entities in multiple fields, this application aims to integrate the public entity embeddings from different fields through appropriate attention weights, in order to reduce the impact of inaccurate embeddings learned from sparse fields and emphasize accurate embeddings learned from dense fields.

[0076] Next, the weighted combination process of public entity embedding in multiple fields involved in this application will be described.

[0077] First, based on the above attention mechanism, domain D x User U in i Combination embedding It can be expressed as shown in the following formula (3):

[0078]

[0079] Among them, W x,y It is field D y For field D xThe weight vector is used to represent the domain D y The knowledge in the domain D x The importance of It is field D y User U in i The embedding vector of . Where ⊙ represents element-wise multiplication, also known as the Hadamard product, which refers to the multiplication of elements at corresponding positions of two vectors or matrices of the same dimension. Where k is The dimension of this application uses the softmax activation function to ensure a is the number of multiple fields, and a can be an integer greater than or equal to 2. x , multiple fields (including field D x itself) for the field D x The attention weight can be expressed as W x = {W x,0 ,W x,1 ,...,W x,a-1},W x ∈R a×k .

[0080] Similarly, field D x Items in V j Combination embedding The representation of can refer to the above formula (3), which will not be repeated here.

[0081] As shown in formula (3), compared with field D x User U in i Original embedding For example, combined embedding In addition to holding field D with a certain weight x Self-generated embeddings In addition, the user U generated in other fields is also integrated with different weights i The embedding of x (i.e., target domain) user U i The comprehensiveness and accuracy of embedding.

[0082] As mentioned above, the attention mechanism can control the importance of user embeddings / item embeddings learned from multiple domains based on the attention weights of different domains. However, the attention weights are often obtained through training samples from different domains. Since most domains are likely to be sparse domains and contain only a limited number of training samples, it is difficult to learn the differences between different domains based on these very small number of training samples, which makes it difficult to properly adjust the attention weights corresponding to sparse domains. This is also the main reason for negative transfer in many-to-many cross-domain recommendation scenarios.

[0083] Based on this, this application further proposes an active masked attention (AMA) mechanism based on the attention mechanism shown in the above formula (3) to better improve the recommendation performance in sparse fields.

[0084] Below, the active shielding attention mechanism in this application will be explained.

[0085] In an illustrated embodiment, after the cross-domain recommendation system obtains multiple target entity features (i.e., target entity embeddings) corresponding to multiple fields one by one through the above step S202, it can first calculate the data density of the entities contained in the data sets of multiple fields, and then determine the weights of the multiple fields relative to any target field in the multiple fields according to the data density of the entities contained in the multiple fields. The so-called data density of the entity may include the density of the interaction relationship between users and items in the heterogeneous graph, and the details can be referred to the aforementioned terminology explanation part, which will not be repeated here.

[0086] Specifically, the cross-domain recommendation system can first obtain the initial weight vectors of multiple domains relative to the target domain. Assume that the target domain is domain D x , the initial weight vector can be W in the above formula (3) x,y , as mentioned above, the initial weight vector W x,y It can often be obtained through training samples from multiple fields.

[0087] In one illustrated embodiment, a training sample may include an interaction between a user and an item, such as a purchase of product B by user A, a like of video C by user A, a forwarding of video C by user A, and so on. This specification does not make any specific limitations on this.

[0088] Furthermore, the probability of the target domain needing to migrate data from multiple domains can be calculated based on the data density of the entities contained in the data set of the target domain and the total data density of the entities contained in the data sets of multiple domains. The demand probability can be used to indicate the degree of the target domain needing to migrate data from multiple domains.

[0089] For example, assume that the target domain is domain D x , field D x Probability of needing to migrate data from multiple domains p x It can be expressed as the following formula (4):

[0090]

[0091] Among them, den x It is field D x The data density, den t It is the total data density of multiple fields. It should be understood that when a new field is added, or an existing field is deleted, or the data in the field changes, the above den x and den t are all likely to change, and accordingly, the demand probability p x It will also change accordingly.

[0092] Furthermore, based on the above formula (4), the probability p of the target domain requiring data migration from multiple domains is calculated. x After that, according to the demand probability p x , determine the weights of multiple fields for the target field.

[0093] It is understandable that if the data density of the target domain is relatively sparse compared to the total data density of multiple domains, for example, the target domain is the shopping domain, and many users have only bought one or two items, the extracted user preferences are obviously one-sided and inaccurate. In this case, the cross-domain recommendation system should make more use of data from other domains, that is, the target domain will have a greater probability of needing to migrate data from multiple domains, and accordingly, the weight of multiple domains to the target domain will be greater.

[0094] If the data density of the target domain is relatively dense compared to the total data density of multiple domains, for example, the target domain is the shopping domain, and most users have purchased and browsed many products, then the extracted user preferences are obviously more comprehensive and accurate. In this case, the cross-domain recommendation system should use less data from other domains, that is, the probability of the target domain needing to migrate data from multiple domains will be smaller, and accordingly, the weight of multiple domains to the target domain will be smaller.

[0095] It should be noted that this specification does not specifically limit the specific implementation method of determining the weights of multiple fields with respect to the target field according to the demand probability.

[0096] In an illustrated embodiment, a mask may be set on each of the initial weight vectors of multiple fields according to the demand probability of the target field, thereby obtaining the target weight vectors of the multiple fields.

[0097] Specifically, multiple mask vectors corresponding to multiple fields can be determined according to the demand probability of the target field; each mask vector can contain multiple vector elements, and the value of each vector element is 0 or 1, where a value of 0 represents shielding and a value of 1 represents retention.

[0098] In one illustrated embodiment, the values ​​of multiple vector elements contained in the mask vector corresponding to the target domain are all 1, which means that the present application will not block the target domain's attention weight to itself, that is, it retains the knowledge learned by the target domain from itself and reasonably absorbs the knowledge learned from other domains according to the required probability.

[0099] In an illustrated embodiment, in mask vectors corresponding to other fields among the multiple fields except the target field, the proportion of the number of vector elements with a value of 1 in the total number of all vector elements may match the demand probability.

[0100] For example, assuming that the dimension of the mask vector is 10 (i.e., each mask vector contains 10 vector elements), if the probability p of the target domain requiring data to be migrated from multiple domains is x =0.5, then in the mask vectors corresponding to other fields, the number of vector elements with a value of 1 can be 5, accounting for half of all vector elements, and correspondingly, the number of vector elements with a value of 0 is also 5, also accounting for half of all vector elements.

[0101] For example, assuming that the dimension of the mask vector is 5 (i.e., each mask vector contains 5 vector elements), if the probability p of the target domain requiring data to be migrated from multiple domains is x =0.8, then in the mask vector corresponding to other fields, the number of vector elements with a value of 1 can be 4, accounting for 0.8 (i.e., four-fifths) of all vector elements, and correspondingly, the number of vector elements with a value of 0 is 1, accounting for only 0.2 (i.e., one-fifth) of all vector elements, and so on. This specification does not make any specific limitation on this.

[0102] In an illustrated embodiment, when determining multiple mask vectors corresponding to other fields based on the demand probability of the target field, it can specifically include: using the demand probability as a random probability of setting the value of the vector element to 1, and based on the random probability, randomly setting some vector elements in the mask vector corresponding to other fields to 1.

[0103] Furthermore, after obtaining multiple mask vectors corresponding to multiple fields, the initial weight vectors of the multiple fields can be masked respectively based on the multiple mask vectors corresponding to the multiple fields, so as to obtain the target weight vectors of the multiple fields, that is, the final active shielding attention weight vector.

[0104] Exemplarily, when performing mask processing on the initial weight vectors of multiple fields, the initial weight vectors of multiple fields can be firstly subjected to element-wise multiplication with their corresponding mask vectors, thereby obtaining intermediate weight vectors of multiple fields. Furthermore, the intermediate weight vectors of multiple fields can be normalized using a softmax activation function to obtain target weight vectors of multiple fields, so that the sum of the values ​​of multiple vector elements at the same position in the multiple target weight vectors is 1.

[0105] For example, see Figure 4 , Figure 4 is a schematic diagram of shielding attention weights based on mask vectors provided by an exemplary embodiment. Figure 4 The examples given illustrate the active masking attention mechanism in this application.

[0106] like Figure 4 As shown, assuming that the target domain is domain D 0 , vector dimension k = 4, domain D 0 For field D 0 The initial weight vector W 0,0 =[0.05,0.13,0.03,0.04], domain D 1 For field D 0 The initial weight vector W 0,1 =[0.85,0.56,0.66,0.95], domain D 2 For field D 0 The initial weight vector W 0,2 =[0.10,0.33,0.31,0.01].

[0107] like Figure 4 As shown, since the target domain is domain D 0 , then with the field D 0 The corresponding mask vector M 0,0 The vector elements in M ​​are all 1, 0,0=[1,1,1,1].

[0108] like Figure 4 As shown, assuming that the demand probability p calculated according to the above formula (4) 0 =0.7581, then we can randomly assign the domain D 1 and field D 2 The corresponding vector elements in the mask vector are set to 1, that is, each vector element has a 0.7581 probability of being set to 1, and finally corresponds to the domain D 1 and field D 2 The number of vector elements with a value of 1 in the corresponding mask vector accounts for nearly 0.7581 of the total number of vector elements.

[0109] like Figure 4 As shown, with field D 1 The corresponding mask vector M 0,1 =[0,1,1,1], and domain D 2 The corresponding mask vector M 0,2 =[1,0,1,1], in the mask vector M 0,1 and M 0,2 In the figure, the proportion of vector elements with a value of 1 is 0.75.

[0110] Furthermore, if Figure 4 As shown, the field D 0 The initial weight vector W 0,0 =[0.05, 0.13, 0.03, 0.04] and the corresponding mask vector M 0,0 =[1,1,1,1] to perform element-wise multiplication and obtain the masked domain D 0 The intermediate weight vector

[0111]

[0112] Similarly, if Figure 4 As shown, the field D 1 The initial weight vector W 0,1 =[0.85,0.56,0.66,0.95] and the corresponding mask vector M 0,1 =[0,1,1,1] to perform element-wise multiplication and obtain the masked domain D 1 The intermediate weight vector

[0113]

[0114] Similarly, if Figure 4 As shown, the field D 2 The initial weight vector W 0,2=[0.10,0.33,0.31,0.01] and the corresponding mask vector M 0,2 =[1,0,1,1] to perform element-wise multiplication and obtain the masked domain D 2 The intermediate weight vector

[0115]

[0116] like Figure 4 As shown in , after masking, it is further necessary to normalize the values ​​in multiple intermediate weight vectors through the softmax activation function to obtain target weight vectors in multiple fields. Figure 4 As shown, field D 0 For field D 0 The target weight vector Field D 1 For field D 0 The target weight vector Field D 2 For field D 0 The target weight vector

[0117] In an illustrated embodiment, in addition to the demand probability p that can be calculated according to the above formula (4), x In addition to determining the weights of multiple fields for the target field, the probability of the target field's demand for migrating data from other fields can be calculated based on the data density of the target field and the data density of other fields, and the weights corresponding to the other fields can be determined based on the demand probabilities corresponding to the other fields.

[0118] For example, assume that the target domain is domain D x , field D x From other fields y The probability of needing to migrate data Among them, den x It is field D x The data density, den y It is field D y data density.

[0119] Accordingly, the mask vectors corresponding to the other fields can be determined according to the demand probabilities between the target field and the other fields. Similarly, in the mask vectors corresponding to the other fields, the proportion of the number of vector elements with a value of 1 in the total number of all vector elements can match the demand probabilities corresponding to the other fields.

[0120] For example, the target domain is still domain D 0 For example, with field D0 The values ​​of the multiple vector elements contained in the corresponding mask vector are all 1.

[0121] Assume that according to domain D 0 and field D 1 The data density of the domain D is calculated 0 From field D 1 The probability p of data migration is 0,1 =0.7, then the demand probability p 0,1 = 0.73 as the random probability of setting the value of the vector element to 1, and based on this random probability, randomly set the vector element corresponding to the domain D 1 Some of the vector elements in the corresponding mask vector are set to 1. Accordingly, assuming that the dimension of the mask vector is 4 (that is, each mask vector contains 4 vector elements), then in the domain D 1 In the corresponding mask vector, the number of vector elements with a value of 1 may be 3, accounting for 0.75 of all vector elements (approximately equal to the demand probability 0.73), and the number of vector elements with a value of 0 may be 1, accounting for 0.25 of all vector elements.

[0122] Assume that according to domain D 0 and field D 2 The data density of the domain D is calculated 0 From field D 2 The probability p of data migration is 0,2 =0.2, then the demand probability p 0,2 = 0.2 as the random probability of setting the value of the vector element to 1, and based on this random probability, randomly set the vector element corresponding to the domain D 2 Some of the vector elements in the corresponding mask vector are set to 1. Accordingly, assuming that the dimension of the mask vector is 5 (that is, each mask vector contains 5 vector elements), then in the domain D 2 In the corresponding mask vector, the number of vector elements with a value of 1 may be 1, accounting for 0.2 of all vector elements, and the number of vector elements with a value of 0 may be 4, accounting for 0.8 of all vector elements, and so on, which is not specifically limited in this specification.

[0123] Furthermore, after obtaining mask vectors corresponding to multiple fields based on different demand probabilities, the initial weight vectors of the multiple fields can be masked based on the multiple mask vectors corresponding to the multiple fields, so as to obtain target weight vectors of the multiple fields. For details, please refer to the description in the above embodiment, which will not be repeated here.

[0124] In addition, it should be noted that in addition to using the data density of each field as prior knowledge to set the mask and thereby appropriately shielding the attention weights of each field, the present application further takes into account that some training samples in the data sets of each field may have uncertainty, so that in each training step of the cross-domain recommendation model, the uncertainty of a batch of training samples in a certain field can be forward calculated first, and then the attention weights for the uncertain samples in the field can be accurately shielded, rather than randomly shielding the attention weights, that is, the attention weights of each field are concretized to the attention weights of each training sample in the field.

[0125] It should be noted that this specification does not specifically limit the specific implementation method of measuring the uncertainty of the sample.

[0126] In an illustrated embodiment, the entropy of the prediction results (representing the degree of confusion) can be used to measure the uncertainty of the sample. For example, for the same training sample, before its attention weight is masked, the prediction results output by the cross-domain recommendation model are very different. That is, the larger the entropy value of the prediction result, the stronger the uncertainty of the training sample, the lower its reference value, or the lower the confidence, and the more likely it is to be negatively affected by the transferred knowledge from other fields. Therefore, the attention weight of the training sample should be reduced.

[0127] For example, the uncertainty γ of a sample can be expressed as shown in the following formula (5):

[0128]

[0129] In an illustrated embodiment, the loss of the prediction result can also be used to measure the uncertainty of the sample. For example, for a certain training sample, before its attention weight is masked, the loss value corresponding to the prediction result output by the cross-domain recommendation model is very large (for example, greater than a preset threshold), then it can be considered that the training sample has strong uncertainty, and so on.

[0130] Or in some possible implementations, any other possible method may be used to measure the uncertainty of the sample, which is not specifically limited in this specification.

[0131] Based on this, according to the above demand probability p x When shielding attention weights for each field, we can first calculate the required probability p according to the above x Determine a shielding ratio, which can be specifically divided by 1 and the demand probability p x The difference is determined as the masking ratio, so that the training samples with the highest uncertainty and masking ratio among all training samples in various fields are selected to mask their attention weights.

[0132] For example, if the demand probability p x =0.8, the calculated shielding ratio is 0.2, so the attention weights can be shielded for the training samples with uncertainty in the first 0.2 (i.e., the first fifth) in each field. Figure 4 The mask vectors of various fields shown in the figure can set the values ​​of the vector elements corresponding to the training samples with the uncertainty in the first fifth in the mask vector to 0, and set the values ​​of the remaining four fifths of the vector elements to 1, instead of setting them randomly.

[0133] For example, if the demand probability p x =0.75, the calculated shielding ratio is 0.25, so the attention weights can be shielded for the training samples with uncertainty in the first 0.25 (i.e., the first quarter) in each field. Figure 4 The mask vectors of various fields shown in FIG. 1 can set the values ​​of the vector elements corresponding to the first quarter of the training samples with this uncertainty in the mask vector to 0, and set the values ​​of the remaining three quarters of the vector elements to 1, instead of setting them randomly.

[0134] As mentioned above, in order to solve the negative transfer problem in many-to-many cross-domain recommendations, this application further proposes an active shielding attention mechanism based on the original attention mechanism, which can actively mask the attention weights of each field element by element. Among them, this method not only utilizes prior knowledge (i.e., the data density of each field) to determine the attention weight of the entire field, but also further utilizes a posteriori knowledge (i.e., the uncertainty of training samples in each field) to actively select uncertain samples and shield their attention weights to give them a higher probability of absorbing knowledge learned from other fields, thereby reducing their uncertainty, which helps to improve the recommendation performance of all sparse and dense fields, ensure the overall cross-domain recommendation performance, and improve the user experience.

[0135] Step S204: weightedly fuse the multiple target entity features based on the weights of the multiple fields, and perform a recommendation task related to the target entity in the target field based on the weighted fused target entity features.

[0136] Furthermore, after obtaining the active shielding attention weight vectors (i.e., target weight vectors) of multiple fields based on the above-mentioned active shielding attention mechanism, the target entity features in multiple fields can be weightedly fused, and based on the weighted fused target entity features, the recommendation tasks related to the target entity can be performed in the target field.

[0137] For example, Figure 3 As shown, assuming that the target domain is domain D 0, can be based on multiple fields for this field D 0 The active shielding attention weight vector is used to perform weighted fusion of target entity feature 0, target entity feature 1, and target entity feature 2 in multiple domains to obtain domain D 0 The weighted fusion feature 0 of the target entity in 0 (i.e., the combined embedding 0) can be used to perform the weighted fusion feature 0 in the domain D. 0 Execute the recommendation tasks related to the target entity.

[0138] For example, Figure 3 As shown, assuming that the target domain is domain D 1 , can be based on multiple fields for this field D 1 The active shielding attention weights are used to perform weighted fusion of target entity features 0, target entity features 1, and target entity features 2 in multiple domains to obtain domain D 1 The weighted fusion feature 1 (i.e., combined embedding 1) of the target entity in the domain D can be used in the subsequent 1 Execute the recommendation tasks related to the target entity.

[0139] For example, Figure 3 As shown, assuming that the target domain is domain D 2 , can be based on multiple fields for this field D 2 The active shielding attention weights are used to perform weighted fusion of target entity features 0, target entity features 1, and target entity features 2 in multiple domains to obtain domain D 2 The weighted fusion feature 2 (i.e., combined embedding 2) of the target entity in the domain D can be used in the subsequent 2 Execute the recommendation tasks related to the target entity.

[0140] Specifically, when performing weighted fusion, the embedding vectors of the target entities in multiple fields can be element-wise multiplied with the target weight vectors of multiple fields to obtain the weighted embedding vectors of the target entities in multiple fields. Furthermore, multiple weighted embedding vectors corresponding to multiple fields can be fused to obtain the combined embedding of the target entity in the target field.

[0141] In summary, based on the above active shielding attention mechanism, domain D x User U in i Combination embedding It can be adjusted as shown in the following formula (6):

[0142]

[0143] Among them, field D xIt can be the target domain, user U i Can be a target entity, For field D y For field D x The target weight vector of is the active masking attention weight vector. It is field D y User U in i The embedding vector of Indicates field D y User U in i The weighted embedding vector of .

[0144] Similarly, field D x Items in V j Combination embedding The representation of can refer to the above formula (6), which will not be repeated here.

[0145] In an illustrated embodiment, a recommendation task related to the target entity in the target domain can be performed in the target domain based on the combined embedding of the target entity in the target domain. Exemplarily, the target entity may include a target user and a target item. Accordingly, the score of the target user in the target domain for the target item can be predicted based on the weighted fusion of the target user features and the target item features (e.g., the combined embedding of the target user and the combined embedding of the target item). The score can be used to indicate the willingness of the target user to interact with the target item, or to indicate the target user's liking for the target item, etc., which is not specifically limited in this specification.

[0146] Further, in an illustrated embodiment, it is possible to determine whether to recommend the target item to the target user based on the predicted score, or to determine whether to recommend the target item to the target user, etc., which is not specifically limited in this specification. Exemplarily, if the score is greater than a preset threshold, the cross-domain recommendation system can choose to recommend the target item to the target user, such as outputting it on the homepage of the target user's application, or pushing the target item to the user by sending a message, etc., which is not specifically limited in this specification.

[0147] It should be noted that this specification does not specifically limit the specific implementation method of performing rating prediction based on the combined embedding of the target user and the target item.

[0148] In an illustrated embodiment, it is assumed that the target domain is the above-mentioned domain D x , the target user is domain D x User U in i , the target object is field D x Items in V j , the cross-domain recommendation system can first transform the domain Dx The user U in i Combination embedding And the item V j Combination embedding The input is sent to the Multilayer Perceptron (MLP), which is used to learn the interaction between users and items.

[0149] For example, field D x The output of the MLP can be expressed as follows:

[0150]

[0151] in, Is user U i Combination embedding The output of MIP is Is item V j Combination embedding Output of MIP. Where fu(*) and fv(*) are the MLP networks of user and item embedding with \emph{ReLU} activation function, and are the corresponding parameters of user MLP and item MLP respectively.

[0152] Furthermore, the score prediction can be obtained in the domain Dx according to the cosine similarity, as shown in the following formula (8):

[0153]

[0154] In addition, in many-to-many cross-domain recommendation scenarios, it is often necessary to improve the recommendation performance of different recommendation tasks in multiple fields. For example, it is necessary not only to improve the product recommendation performance in the shopping field, but also to improve the video recommendation performance in the short video field, etc. Therefore, in order to avoid the seesaw phenomenon caused by the joint goal, the present application can also train the AMA-CDR model proposed in this application through a separate optimizer in each field.

[0155] Exemplarily, the objective function of the AMA-CDR model in the present application in the domain Dx can be expressed as shown in the following formula (9):

[0156]

[0157] In summary, based on the original attention mechanism, this application further proposes an active shielding attention mechanism, which can retain more knowledge learned from other fields for sparse fields and shield more knowledge from other fields for dense fields, thereby improving the recommendation performance of all sparse and dense fields.

[0158] In addition, the AMA-CDR proposed in this application is an end-to-end framework with a unique optimization target. It can reduce the target distortion between graph embedding (i.e., the re-examined graph embedding strategy shown in the above formulas (1) and (2)) and the knowledge transfer strategy (i.e., the attention weight of the embedding combination), thereby greatly improving the training effect and recommendation performance of the cross-domain recommendation model.

[0159] Corresponding to the implementation of the above method flow, the embodiment of this specification also provides a cross-domain recommendation device. Figure 5 , Figure 5 FIG. 5 is a schematic diagram of a cross-domain recommendation device provided by an exemplary embodiment. The device 50 can be applied to a cross-domain recommendation system. Figure 5 As shown, the device 50 comprises:

[0160] The acquisition unit 501 is used to acquire data sets in multiple fields; wherein the data sets in each field include data related to multiple entities in the field; and the multiple entities include a target entity;

[0161] A feature extraction unit 502 is used to extract features for the target entities based on the data sets of the multiple fields, so as to obtain multiple target entity features corresponding to the multiple fields;

[0162] A weight determination unit 503, configured to determine the weights of the multiple fields relative to any target field among the multiple fields according to the data density of the entities contained in the data sets of the multiple fields;

[0163] The recommendation unit 504 is configured to perform weighted fusion on the multiple target entity features based on the weights of the multiple fields, and perform a recommendation task related to the target entity in the target field based on the weighted fusion target entity features.

[0164] In one illustrated embodiment, the data set for each field is a heterogeneous graph constructed based on data related to multiple entities in the field; the heterogeneous graph includes multiple nodes of different types and edges connecting the nodes, the nodes represent entities in the field, and the edges represent the relationships between entities.

[0165] In an illustrated embodiment, the entities include users and objects; wherein the data density of the entities includes the density of interaction relationships between users and objects.

[0166] In an illustrated embodiment, the feature extraction unit 502 is specifically configured to:

[0167] Based on the heterogeneous graphs of the multiple fields, graph embedding processing is performed on the target entities in the multiple fields respectively to obtain multiple embedding vectors for representing the target entities in the multiple fields.

[0168] In an illustrated embodiment, the weight determination unit 503 is specifically configured to:

[0169] Calculating the probability that the target domain needs to migrate data from the multiple domains according to the data density of entities contained in the data set of any target domain among the multiple domains and the total data density of entities contained in the data sets of the multiple domains;

[0170] The weights of the multiple fields relative to the target field are determined according to the demand probabilities.

[0171] In an illustrated embodiment, the weight determination unit 503 is specifically configured to:

[0172] Obtaining initial weight vectors of the multiple fields relative to the target field;

[0173] Determine, according to the demand probability, a plurality of mask vectors corresponding to the plurality of fields; each mask vector comprises a plurality of vector elements, and a value of each vector element is 0 or 1;

[0174] Based on a plurality of mask vectors corresponding to the plurality of fields, mask processing is performed on the initial weight vectors of the plurality of fields respectively to obtain target weight vectors of the plurality of fields.

[0175] In an illustrated embodiment, the weight determination unit 503 is specifically configured to:

[0176] Performing element-wise multiplication operations on the initial weight vectors of the multiple fields and the corresponding mask vectors respectively to obtain intermediate weight vectors of the multiple fields;

[0177] The intermediate weight vectors of the multiple fields are normalized to obtain the target weight vectors of the multiple fields; wherein the total value of multiple vector elements at the same position in the multiple target weight vectors is 1.

[0178] In one illustrated embodiment, the values ​​of multiple vector elements contained in the mask vector corresponding to the target field are all 1; in the mask vectors corresponding to other fields among the multiple fields except the target field, the proportion of the number of vector elements with a value of 1 in the total number of all vector elements matches the demand probability.

[0179] In an illustrated embodiment, the weight determination unit 503 is specifically configured to:

[0180] The demand probability is used as a random probability of setting the value of a vector element to 1, and based on the random probability, some vector elements in the mask vector corresponding to the other field are randomly set to 1.

[0181] In an illustrated embodiment, the recommendation unit 504 is specifically configured to:

[0182] Performing element-wise multiplication operations on the multiple embedding vectors of the target entity corresponding to the multiple fields and the corresponding target weight vectors, respectively, to obtain multiple weighted embedding vectors of the target entity corresponding to the multiple fields;

[0183] The multiple weighted embedding vectors are fused.

[0184] In an illustrated embodiment, the target entity includes a target user and a target item; the recommendation unit 504 is specifically configured to:

[0185] Based on the weighted fusion of the target user features and the target item features, predicting the score of the target user in the target field for the target item; the score is used to represent the interaction willingness between the target user and the target item;

[0186] According to the predicted score, it is determined whether to recommend the target item to the target user.

[0187] In an illustrated embodiment, the multiple fields include any multiple fields of a shopping field, an audio and video field, a game field, and a social media field.

[0188] The implementation process of the functions and effects of each unit in the above-mentioned device 50 is specifically described in the above-mentioned embodiment, and will not be repeated here. It should be understood that the above-mentioned device 50 can be implemented by software, or by hardware or a combination of software and hardware. Taking software implementation as an example, as a device in a logical sense, it is formed by the processor (CPU) of the device where it is located reading the corresponding computer program instructions into the memory and running them. From the hardware level, in addition to the CPU and memory, the device where the above-mentioned device is located usually also includes other hardware such as chips for wireless signal transmission and reception, and / or other hardware such as boards and cards for realizing network communication functions.

[0189] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the units or modules may be selected according to actual needs to achieve the purpose of the scheme of this specification. Those of ordinary skill in the art may understand and implement it without creative work.

[0190] The devices, units, and modules described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device, a vehicle-mounted computer, or a combination of any of these devices.

[0191] Corresponding to the above method embodiment, the embodiment of this specification also provides a computing device. Figure 6 , Figure 6 It is a structural diagram of a computing device provided by an exemplary embodiment. Figure 6 The computing device shown may be a computing device in a cross-domain recommendation system. Figure 6 As shown, the computing device includes a processor 1001 and a memory 1002, and may further include an input device 1004 (such as a keyboard, etc.) and an output device 1005 (such as a display, etc.). The processor 1001, the memory 1002, the input device 1004, and the output device 1005 may be connected via a bus or other means. Figure 6As shown, the memory 1002 includes a computer-readable storage medium 1003, which stores a computer program that can be run by the processor 1001. The processor 1001 can be a CPU, a microprocessor, or an integrated circuit for controlling the execution of the above method embodiment. When the processor 1001 runs the stored computer program, it can execute the various steps of the cross-domain recommendation method in the embodiment of this specification, including: obtaining data sets of multiple fields; wherein the data sets of each field contain data related to multiple entities in the field; the multiple entities contain target entities; based on the data sets of the multiple fields, feature extraction is performed for the target entities respectively to obtain multiple target entity features corresponding to the multiple fields; according to the data density of the entities contained in the data sets of the multiple fields, the weights of the multiple fields relative to any target field in the multiple fields are determined; based on the weights of the multiple fields, the multiple target entity features are weighted and fused, and based on the weighted fused target entity features, the recommendation task related to the target entity is performed in the target field, and the like.

[0192] For a detailed description of each step of the above cross-domain recommendation method, please refer to the previous content and will not be repeated here.

[0193] Corresponding to the above method embodiment, the embodiment of this specification also provides a computer-readable storage medium, on which a computer program is stored, and when these computer programs are executed by a processor, the various steps of the cross-domain recommendation method in the embodiment of this specification are executed. Please refer to the description of the above embodiment for details, which will not be repeated here.

[0194] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

[0195] In a typical configuration, a terminal device includes one or more CPUs, input / output interfaces, network interfaces, and memory.

[0196] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0197] Computer readable media include permanent and non-permanent, removable and non-removable media and can store information by any method or technology. The information can be computer readable instructions, data structures, program modules or other data.

[0198] Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0199] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0200] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, the embodiments of this specification may take the form of complete hardware embodiments, complete software embodiments or embodiments combining software and hardware. Moreover, the embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

Claims

1. A cross-domain recommendation method, characterized in that: The method comprises: Acquire data sets in multiple fields; wherein the data sets in each field include data related to multiple entities in the field; the multiple entities include a target entity; Based on the data sets of the multiple fields, feature extraction is performed on the target entities respectively to obtain multiple target entity features corresponding to the multiple fields; determining weights of the plurality of fields relative to any target field among the plurality of fields according to data densities of entities contained in the data sets of the plurality of fields; Based on the weights of the multiple fields, the multiple target entity features are weightedly fused, and based on the weighted fused target entity features, a recommendation task related to the target entity is performed in the target field.

2. The method according to claim 1, characterized in that The data set of each field is a heterogeneous graph constructed based on data related to multiple entities in the field; the heterogeneous graph includes multiple nodes of different types and edges connecting the nodes, the nodes represent entities in the field, and the edges represent the relationships between entities.

3. The method according to claim 2, characterized in that The entities include users and items; wherein the data density of the entities includes the density of the interaction relationship between users and items.

4. The method according to claim 3, characterized in that The data sets based on the multiple fields respectively extract features for the target entities to obtain multiple target entity features corresponding to the multiple fields, including: Based on the heterogeneous graphs of the multiple fields, graph embedding processing is performed on the target entities in the multiple fields respectively to obtain multiple embedding vectors for representing the target entities in the multiple fields.

5. The method according to claim 4, characterized in that The step of determining the weights of the multiple fields relative to any target field in the multiple fields according to the data density of the entities contained in the data sets of the multiple fields comprises: Calculating the probability that the target domain needs to migrate data from the multiple domains according to the data density of entities contained in the data set of any target domain among the multiple domains and the total data density of entities contained in the data sets of the multiple domains; The weights of the multiple fields relative to the target field are determined according to the demand probabilities.

6. The method according to claim 5, characterized in that Determining the weights of the multiple fields relative to the target field according to the demand probability includes: Obtaining initial weight vectors of the multiple fields relative to the target field; Determine, according to the demand probability, a plurality of mask vectors corresponding to the plurality of fields; each mask vector comprises a plurality of vector elements, and a value of each vector element is 0 or 1; Based on a plurality of mask vectors corresponding to the plurality of fields, mask processing is performed on the initial weight vectors of the plurality of fields respectively to obtain target weight vectors of the plurality of fields.

7. The method according to claim 6, characterized in that The step of performing mask processing on the initial weight vectors of the multiple fields respectively based on the multiple mask vectors corresponding to the multiple fields to obtain the target weight vectors of the multiple fields includes: Performing element-wise multiplication operations on the initial weight vectors of the multiple fields and the corresponding mask vectors respectively to obtain intermediate weight vectors of the multiple fields; The intermediate weight vectors of the multiple fields are normalized to obtain the target weight vectors of the multiple fields; wherein the total value of multiple vector elements at the same position in the multiple target weight vectors is 1.

8. The method according to claim 7, characterized in that The values ​​of multiple vector elements contained in the mask vector corresponding to the target field are all 1; in the mask vectors corresponding to other fields among the multiple fields except the target field, the proportion of the number of vector elements with a value of 1 in the total number of all vector elements matches the demand probability.

9. The method according to claim 8, characterized in that The step of determining a plurality of mask vectors corresponding to the plurality of fields according to the demand probability comprises: The demand probability is used as a random probability of setting the value of a vector element to 1, and based on the random probability, some vector elements in the mask vector corresponding to the other field are randomly set to 1.

10. The method according to claim 9, characterized in that The weighted fusion of the multiple target entity features based on the weights of the multiple fields includes: Performing element-wise multiplication operations on the multiple embedding vectors of the target entity corresponding to the multiple fields and the corresponding target weight vectors, respectively, to obtain multiple weighted embedding vectors of the target entity corresponding to the multiple fields; The multiple weighted embedding vectors are fused.

11. The method according to any one of claims 1 to 10, characterized in that: The target entity includes a target user and a target item; the recommendation task related to the target entity is performed in the target domain based on the weighted fusion target entity features, including: Based on the weighted fusion of the target user features and the target item features, predicting the score of the target user in the target field for the target item; the score is used to represent the interaction willingness between the target user and the target item; According to the predicted score, it is determined whether to recommend the target item to the target user.

12. The method according to any one of claims 1 to 10, characterized in that: The multiple fields include any multiple fields in the shopping field, the audio and video field, the game field and the social media field.

13. A cross-domain recommendation device, characterized in that: The device comprises: An acquisition unit, configured to acquire data sets in multiple fields; wherein the data sets in each field include data related to multiple entities in the field; and the multiple entities include a target entity; A feature extraction unit, configured to extract features for the target entities based on the data sets of the multiple fields, and obtain multiple target entity features corresponding to the multiple fields; a weight determination unit, configured to determine weights of the plurality of fields relative to any target field among the plurality of fields according to data densities of entities contained in the data sets of the plurality of fields; The recommendation unit is used to perform weighted fusion on the multiple target entity features based on the weights of the multiple fields, and perform a recommendation task related to the target entity in the target field based on the weighted fusion target entity features.

14. A computing device, characterized in that include: Memory and processor; The memory has stored thereon computer programs / instructions executable by the processor; When the processor runs the computer program / instructions, it performs the method according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that: A computer program / instruction is stored thereon, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 12 is implemented.

16. A computer program product, characterized in that The computer program product comprises a computer program / instruction, and when the computer program / instruction is executed by a processor, the method according to any one of claims 1 to 12 is implemented.