Sample processing method and device for cross-domain recommendation model, equipment and storage medium
By obtaining and filtering the interaction characteristics of sample objects in the cross-domain recommendation model and filtering out real strong negative samples, the problem of low cross-domain recommendation accuracy in the existing technology is solved, and higher information recommendation accuracy is achieved.
Patent Information
- Application Number
- CN202310694404.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2043-06-12
AI Technical Summary
The existing cross-domain recommendation model has low information recommendation accuracy in the target domain, mainly because it only focuses on the cross-domain correlation of the feature level of negative samples randomly selected by the target domain during the training process, and fails to effectively utilize cross-domain information at the sample level. .
By obtaining the interactive features of the sample objects in the source domain and the target domain, fusion and screening, fusing and migration interaction features are obtained, and real strong negative samples are selected based on these features and used to train cross-domain recommendation models.
The recommendation accuracy of the cross-domain recommendation model in the target domain is improved, and the accuracy of real strong negative samples is improved through multiple rounds of screening, thereby improving the accuracy of information recommendation.
Smart Images

Figure CN119128508A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to artificial intelligence technology, and in particular to a sample processing method, device, equipment and storage medium for a cross-domain recommendation model. Background Art
[0002] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.
[0003] Item recommendation is an important application of artificial intelligence. In related technologies, recommendation models are often used to recommend items to objects, but the accuracy of the recommendation model depends on the training effect of the model. Cross-domain recommendation uses the rich object behavior information in the source domain as an aid to the target domain, so that better recommendations can be made in the target domain or even multiple domains. In related technologies, the samples used to train the cross-domain recommendation model, the cross-domain recommendation method only focuses on the cross-domain correlation of the feature level of the negative samples randomly extracted from the target domain. The trained cross-domain recommendation model has low accuracy in recommending information in the target domain, which affects the accuracy of information recommendation.
[0004] There is no effective solution to the problem that the cross-domain recommendation model has low accuracy in recommending cross-domain information in the related art. Summary of the invention
[0005] The embodiments of the present application provide a sample processing method, device, electronic device, computer-readable storage medium, and computer program product of a cross-domain recommendation model, which can improve the accuracy of the cross-domain recommendation model in making recommendations in a target domain.
[0006] The technical solution of the embodiment of the present application is implemented as follows:
[0007] The present application provides a sample processing method of a cross-domain recommendation model, the method comprising:
[0008] Acquire a plurality of recommended items of the target domain, wherein the recommended items are used to recommend to the sample object;
[0009] fusing a first interaction feature and a second interaction feature of the sample object to obtain a fused interaction feature of the sample object, wherein the first interaction feature is an interaction feature of the sample object in a source domain, and the second interaction feature is an interaction feature of the sample object in a target domain;
[0010] Determine a similarity index between the fused interaction feature and each of the recommended items, screen out a plurality of strong negative samples from the plurality of recommended items based on the similarity index, and combine the screened plurality of recommended items into a candidate recommended item set;
[0011] Acquire a third interaction feature and a fourth interaction feature of the sample object, wherein the third interaction feature is an interaction feature of a time-sensitive interaction behavior of the sample object in a source domain, and the fourth interaction feature is a cluster center of second interaction features of a plurality of the sample objects in a target domain;
[0012] fusing the third interaction feature and the fourth interaction feature of the sample object to obtain a migration interaction feature of the sample object;
[0013] Based on a similarity index between the migration interaction feature and each of the recommended items in the candidate recommended item set, a plurality of true strong negative samples are screened out from the plurality of strong negative samples, wherein the plurality of true strong negative samples are used to train the cross-domain recommendation model.
[0014] The present application embodiment provides a sample processing device for a cross-domain recommendation model, including:
[0015] A sample acquisition module, configured to acquire a plurality of recommended items of a target domain, wherein the recommended items are used to recommend to a sample object;
[0016] a sample acquisition module, configured to fuse a first interaction feature and a second interaction feature of a sample object to obtain a fused interaction feature of the sample object, wherein the first interaction feature is an interaction feature of the sample object in a source domain, and the second interaction feature is an interaction feature of the sample object in a target domain;
[0017] a sample filtering module, configured to determine a similarity index between the fused interaction feature and each of the recommended items, filter out a plurality of strong negative samples from the plurality of recommended items based on the similarity index, and combine the plurality of recommended items obtained by the filter into a candidate recommended item set;
[0018] The sample acquisition module is configured to acquire a third interaction feature and a fourth interaction feature of the sample object, wherein the third interaction feature is an interaction feature of a time-sensitive interaction behavior of the sample object in a source domain, and the fourth interaction feature is a cluster center of second interaction features of a plurality of the sample objects in a target domain;
[0019] The sample acquisition module is configured to fuse the third interaction feature and the fourth interaction feature of the sample object to obtain a migration interaction feature of the sample object;
[0020] The sample filtering module is configured to filter out a plurality of real strong negative samples from the plurality of strong negative samples based on a similarity index between the migration interaction feature and each of the recommended items in the candidate recommended item set, wherein the plurality of real strong negative samples are used to train the cross-domain recommendation model.
[0021] An embodiment of the present application provides an electronic device, the electronic device comprising:
[0022] A memory for storing computer executable instructions;
[0023] The processor is used to implement the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application when executing the computer executable instructions stored in the memory.
[0024] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application when executed by a processor.
[0025] An embodiment of the present application provides a computer program product, including a computer program or a computer executable instruction. When the computer program or the computer executable instruction is executed by a processor, the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application is implemented.
[0026] The embodiments of the present application have the following beneficial effects:
[0027] Based on the fusion interaction features of sample objects in different domains, multiple recommended items are preliminarily screened to obtain a set of candidate recommended items composed of strong negative samples. Based on the interaction features of sample objects migrating between different domains, the candidate recommended item set is screened to obtain real strong negative samples for training cross-domain recommendation models. Through multiple rounds of screening, the accuracy of the real strong negative samples obtained by screening is improved. The real strong negative samples obtained by screening are used to train cross-domain recommendation models, which can improve the accuracy of the model's information recommendation in the target domain. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 It is a schematic diagram of an application mode of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application;
[0029] Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0030] FIG. 3A to FIG. 3F It is a flowchart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application;
[0031] FIG. 4A to FIG. 4C It is a schematic diagram of the relationship between the features and samples provided in the embodiments of the present application;
[0032] Figure 5 This is an optional flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application;
[0033] FIG. 6A to FIG. 6D It is a table of experimental results provided in the examples of this application. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0035] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0036] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0037] It should be pointed out that the collection and processing of relevant data in this application (for example, data on the interactive behavior of sample subjects) should be strictly in accordance with the requirements of relevant national laws and regulations when applied in instances, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.
[0038] In this application, the technical solution for data capture (for example, recommended projects) is implemented. When the above embodiments of this application are applied to specific products or technologies, the relevant data collection, use and processing processes should comply with the requirements of national laws and regulations, and conform to the principles of legality, legitimacy and necessity. It does not involve the acquisition of data types prohibited or restricted by laws and regulations, and will not hinder the normal operation of the target website.
[0039] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0040] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.
[0041] 1) Item: The target recommended by the recommendation system (e.g., advertising system). For example, items (including real items such as food and clothes, and advertisements for virtual items such as games and game props), and information (e.g., advertisements, news, music, etc.).
[0042] 2) Recommendation system: The recommendation system is a tool that automatically connects users and information. It can help users find information that interests them in an environment with information overload, and can also push information to users who are interested in it.
[0043] 3) Cross-Domain Recommendation (CDR): A recommendation method that uses the recommendation data of the source domain to assist the recommendation processing in the target domain. Assuming that business A is the source domain and business B is the target domain, the rich object behavior information of the source domain is used as an aid to the target domain, so that better recommendations can be made in the target domain or even multiple domains. For example, a community website recommends books to users based on their movie reviews, assuming that the same users have similar preferences for movies and books.
[0044] 4) Negative Samples (NS): Negative samples are a relative concept. For the target category corresponding to the true value, the sample is a positive sample. For all other target categories that do not correspond to the true value, the sample is a negative sample.
[0045] 5) Hard Negative Samples (NHS): Negative samples that are difficult to distinguish or classify compared to positive samples, that is, negative samples whose similarity with positive samples is higher than the similarity threshold, which will lead to large prediction errors.
[0046] 6) Real Hard Negative Samples (RHNS): refers to negative samples that are correctly classified, that is, they are predicted to be negative samples and are actually negative samples.
[0047] 7) False Hard Negative Samples (FHNS): Also known as false strong negative samples, they refer to positive samples that are mistakenly marked as negative samples, that is, they are actually positive samples but are predicted as negative samples.
[0048] 8) Transfer Learning: It is a term in machine learning, which refers to the influence of one learning on another, or the influence of acquired experience on the completion of other activities. Transfer is widely present in the learning of various knowledge, skills and social norms.
[0049] 9) Curriculum Learning: It is a general training strategy that mimics the learning sequence in human courses and gradually increases the difficulty of training samples as the model is optimized.
[0050] 10) Collaborative Filtering (CF): It uses the preferences of a group of people with similar interests and common experiences to recommend information of interest to users. Individuals respond to the information to a certain extent (such as ratings) through a cooperative mechanism and record the response to achieve the purpose of filtering and then assist in screening information in other fields.
[0051] 11) Field, specifically refers to a specific scope or region, and can also refer to the scope of academic thought or social activities. In the embodiments of the present application, field is referred to as domain for short, including any type of field that can perform information recommendation.
[0052] In the related art, the samples used to train the cross-domain recommendation model, the cross-domain recommendation method only focuses on the cross-domain correlation of the feature level of negative samples randomly extracted from the target domain. The trained cross-domain recommendation model has low accuracy in recommending information in the target domain, which affects the accuracy of information recommendation.
[0053] The embodiments of the present application provide a sample processing method of a cross-domain recommendation model, a sample processing device of a cross-domain recommendation model, an electronic device, a computer-readable storage medium, and a computer program product, which can improve the accuracy of the cross-domain recommendation model in making recommendations in a target domain.
[0054] The following describes an exemplary application of an electronic device provided by an embodiment of the present application. The electronic device provided by an embodiment of the present application can be implemented as a laptop, a tablet computer, a desktop computer, a set-top box, a mobile device (for example, a mobile phone, a portable music player, a personal digital assistant, a dedicated messaging device, a portable gaming device), a vehicle terminal, a virtual reality (VR) device, an augmented reality (AR) device, and other types of user terminals), and can also be implemented as a server. Below, an exemplary application when the device is implemented as a terminal device or a server will be described.
[0055] refer to Figure 1 , Figure 1 Schematic diagram of the application mode of the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application; for example, Figure 1The invention involves a server 200, a network 300, a terminal device 400, and a database 500. The terminal device 400 is connected to the server 200 via the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two.
[0056] In some embodiments, the server 200 may be a training server for training a cross-domain recommendation model, and the database 500 stores recommendation items in at least two different domains, and the types of domains include: shopping information on different platforms, multimedia information on different platforms, etc. For example: in the source domain, shopping information is recommended on platform A, and in the target domain, shopping information is recommended on platform B. Another example: videos are recommended in the source domain, and music is recommended in the target domain.
[0057] For example, the server 200 calls the sample processing method of the cross-domain recommendation model provided by the embodiment of the present application, screens out real strong negative samples from multiple sample recommendation items, and trains the cross-domain recommendation model based on the real strong negative samples. Based on the user's information in the source domain, the trained cross-domain recommendation model is called to recommend recommended items in the target domain to the user's terminal device 400. For example, the source domain is the movie field, and the target domain is the book field. Based on the user's preferences in the movie field, books that the user may like are recommended.
[0058] The embodiments of the present application can be implemented through database technology. In short, a database can be regarded as an electronic file cabinet where electronic files are stored. Users can add, query, update, delete, etc. data in the files. The so-called "database" is a collection of data that is stored together in a certain way, can be shared with multiple users, has as little redundancy as possible, and is independent of the application program.
[0059] A database management system (DBMS) is a computer software system designed for managing databases. It generally has basic functions such as storage, retrieval, security, and backup. Database management systems can be classified according to the database model they support, such as relational, XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters, mobile phones; or according to the query language used, such as Structured Query Language (SQL), XQuery; or according to performance focus, such as maximum scale, maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMS can cross categories, for example, supporting multiple query languages at the same time.
[0060] The embodiments of the present application can also be implemented through cloud technology. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model application. It can form a resource pool, which is used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the high development and application of the Internet industry, as well as the promotion of search services, social networks, mobile commerce and open collaboration, each item may have its own hash code identification mark in the future, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately, and all kinds of industry data require strong system backing support, which can only be achieved through cloud computing.
[0061] In some embodiments, the server 200 can be implemented as multiple servers, for example: a sample processing server is used to obtain training samples, a model training server is used to train a cross-domain recommendation model, and an item recommendation server is used to call a trained cross-domain recommendation model.
[0062] In some embodiments, the server may be an independent physical server, or 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 communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The electronic device may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal device and the server may be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present invention.
[0063] See also Figure 2 , Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, Figure 2 The electronic equipment shown is Figure 1 The server 200 includes: at least one processor 410, a memory 450, and at least one network interface 420. The various components in the server 200 are coupled together through a bus system 440. It can be understood that the bus system 440 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in Figure 2 Various buses are labeled as bus system 440 .
[0064] Processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0065] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.
[0066] The memory 450 includes a volatile memory or a non-volatile memory, and may also include both volatile and non-volatile memories. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.
[0067] In some embodiments, memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplarily described below.
[0068] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks;
[0069] A network communication module 452, used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 include: Bluetooth, Wireless Compatibility Certification (WiFi), and Universal Serial Bus (USB), etc.;
[0070] In some embodiments, the device provided in the embodiments of the present application can be implemented in software. Figure 2 The sample processing device 455 of the cross-domain recommendation model stored in the memory 450 is shown, which can be software in the form of programs and plug-ins, including the following software modules: sample acquisition module 4551, sample filtering module 4552, these modules are logical, so according to the functions implemented, they can be arbitrarily combined or further split. Figure 2For the sake of convenience, all the above modules are shown at once, but it should not be considered that the sample processing device 455 of the cross-domain recommendation model excludes the implementation that can only include the model training module 4553. The functions of each module will be explained below.
[0071] The sample processing method of the cross-domain recommendation model provided in the embodiment of the present application will be described in combination with the exemplary application and implementation of the terminal provided in the embodiment of the present application.
[0072] Below, the sample processing method of the cross-domain recommendation model provided by the embodiment of the present application is described. As mentioned above, the electronic device that implements the sample processing method of the cross-domain recommendation model of the embodiment of the present application can be a terminal, a server, or a combination of the two. Therefore, the execution subject of each step will not be repeatedly described below.
[0073] It should be noted that in the following image processing examples, the object is a face. Based on their understanding of the following, those skilled in the art can apply the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application to the processing of image sets including other types of objects.
[0074] See also Figure 3A , Figure 3A is a flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application, which will be combined with Figure 3A The steps shown are explained.
[0075] In step 301, a plurality of recommended items of a target domain are obtained.
[0076] Here, the recommendation item is used to make recommendations to the sample object.
[0077] A field specifically refers to a specific scope or area, and may also refer to the scope of academic thought or social activities. In the embodiments of the present application, a field is referred to as a domain, including any type of field that can be used for information recommendation. Recommended items include items (including actual items such as food and clothes, games, game props and other virtual item advertisements), and information (such as advertisements, news, music, etc.). The sample object may be a user.
[0078] In some embodiments, reference Figure 3B , Figure 3B is a flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application. Before step 302, execute Figure 3B Steps 3011 to 3014 in are described in detail below.
[0079] In step 3011, source domain items corresponding to each interaction behavior performed by the sample object in the source domain are obtained, and features are extracted for each source domain item to obtain source domain item features.
[0080] For example, the interactive behaviors include clicks, browsing, forwarding, commenting, and purchasing. The features of each source domain item that the user interacts with can be extracted through a convolutional neural network or a sequence encoder to obtain the source domain item features. Characterize the features of the i-th source domain item, where S refers to the source domain.
[0081] In step 3012, each source domain item feature is combined into a first interaction feature in a sequence form according to the order in which each interaction behavior in the source domain is executed.
[0082] For example, the execution time of each interaction behavior is obtained, and each source domain project feature is combined into a sequence according to the chronological order to obtain the first interaction feature in the form of a sequence p is the number of interactions.
[0083] In step 3013, the target domain items corresponding to each interactive behavior performed by the sample object in the target domain are obtained, and features are extracted for each target domain item to obtain target domain item features.
[0084] For example, similar to the source domain, the feature extraction process of the target domain is not repeated here. Characterize the j-th target domain item features, where T refers to the target domain (target).
[0085] In step 3014, each target domain item feature is combined into a second interaction feature in a sequence form according to the order in which each interaction behavior in the target domain is executed.
[0086] For example, the execution time of each interaction behavior is obtained, and each target domain item feature is combined into a sequence according to the chronological order to obtain the second interaction feature in the form of a sequence q is the number of interactive behaviors in the target domain.
[0087] In the embodiment of the present application, by obtaining the project features corresponding to the interactive behavior of the object as the interactive features of the object, and characterizing the interactive features by the project features, the accuracy of obtaining recommended items based on the interactive features can be improved. At the same time, compared with the method of converting object information into object features, the computing resources required for obtaining the similarity between the interactive features and the project features are saved.
[0088] Continue to refer Figure 3A In step 302, the first interaction feature and the second interaction feature of the sample object are fused to obtain a fused interaction feature of the sample object.
[0089] For example, the first interaction feature is an interaction feature of the sample object in the source domain, and the second interaction feature is an interaction feature of the sample object in the target domain.
[0090] In some embodiments, the fused interaction features include: a priori interaction features of the sample object in the target domain, and comprehensive interaction features of the sample object for the source domain and the target domain; the comprehensive interaction features are used to characterize the features of the user's interaction behavior in the target domain and the source domain. The priori interaction features refer to the interaction features of the behavior that the user may perform.
[0091] refer to Figure 3C , Figure 3C is a flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application. Step 302 can be performed by Figure 3C Steps 3021 to 3024 are implemented as described in detail below.
[0092] In step 3021, feature prediction is performed based on each source domain item feature in the first interactive feature in sequence form to obtain a first predicted feature.
[0093] Here, the first prediction feature is used to characterize the prior interaction behavior of the sample object in the source domain.
[0094] For example, the target domain sequence S T For example, the source domain sequence can be extracted in the same way, and the embodiments of this application will not be repeated one by one. The input matrix is constructed where d is the embedding feature size, represents the learnable item index embedding feature, Represents the position embedding feature.
[0095] Call the sequence encoder (SASRec sequence recommendation algorithm) to input the matrix D T Linear projection is the query instruction Q T , key K T Sum value V T , and substitute the three into the attention calculation method, which is defined as follows:
[0096]
[0097] Among them, Q T =D T W Q ,K T =D T W K ,V T =D T W V ,W Q ,W K ,W VRespectively represent different linear mapping layers. The embodiment of the present application also obtains the implicit behavior matrix H of the target domain through a point wise feed forward network. T , where the point-wise feedforward network consists of two fully connected layers with a ReLU activation function between the two layers. The implicit behavior matrix H T The acquisition process of is represented by the following formula (2):
[0098]
[0099] Among them, w1, w2 represent weight matrices, b1, b2 are bias vectors. The user's implicit behavior matrix in the source domain is H S The same is true for the user's behavioral interaction sequence S in the source domain S The implicit behavior matrix H of the user in the source domain can be obtained by the same principle as formula (2): S .
[0100] According to the principles of formula (1) and formula (2) above, the prior behavior matrix in the source domain is obtained Behavior interaction sequence S based on the source domain S The features corresponding to the last interactive behavior in and the behavioral interaction sequence S S The relationship between other features in and the last feature is used to predict the first predicted feature of the interactive behavior that the user may perform after the last interactive behavior.
[0101] In step 3022, feature prediction is performed based on each target domain item feature in the second interactive feature in sequence form to obtain a second predicted feature.
[0102] Here, the second prediction feature is used to characterize the prior interaction behavior of the sample object in the target domain.
[0103] According to the principles of formula (1) and formula (2) above, the prior behavior matrix in the target domain is obtained Behavior interaction sequence S based on the target domain T The features corresponding to the last interactive behavior in and the behavioral interaction sequence S T The relationship between other features in and the last feature is used to predict the second prediction feature of the interactive behavior that the user may perform after the last interactive behavior.
[0104] In step 3023, a modified linear function is called to activate the first prediction feature and the second prediction feature to obtain a priori interaction features of the sample object in the target domain.
[0105] Example, rectified linear function MLP f(.) can be realized through a two-layer fully connected network activated by LeakyReLU, the user's prior interaction features in the target domain Obtained by the following formula (3):
[0106]
[0107] in, represents the prior behavior embedding feature (first prediction feature) of the last behavior of user u in the behavior sequence of the source domain, is the prior behavior embedding feature (second prediction feature) of the last behavior in the behavior sequence of the target domain, MLP f (.) represents a two-layer fully connected network activated by LeakyReLU, which is the rectified linear function mentioned above.
[0108] In step 3024, the corrected linear function is called to activate the following parameters to obtain the comprehensive interaction features of the sample object for the source domain and the target domain: the last source domain item feature in the first interaction feature in the sequence form, and the last target domain item feature in the second interaction feature in the sequence form.
[0109] For example, the last source domain item feature in the first interaction feature in the sequence form is the feature that characterizes the interaction behavior closest to the current moment in the source domain, and the last target domain item feature in the second interaction feature in the sequence form is the feature that characterizes the interaction behavior closest to the current moment in the target domain. Similar to the principle of step 3021, the features of the interaction behavior are characterized as the behavior matrix H S and H T , based on the latest interactive features in the behavior sequences in the source and target domains and Calling the corrected linear function to generate comprehensive interaction features
[0110] Continue to refer Figure 3A ,In step 303, a similarity index between the fused interaction feature and each recommended item is determined.
[0111] In some embodiments, step 303 can be implemented by: obtaining a first similarity index between the prior interaction features of the sample object in the target domain and the recommended item features corresponding to each recommended item; obtaining a second similarity index between the comprehensive interaction features of the sample object for the source domain and the target domain and the recommended item features corresponding to each recommended item.
[0112] For example, the prior interaction features of the sample object in the target domain and the recommended item features corresponding to each recommended item are multiplied respectively to obtain the first similarity index corresponding to each recommended item, and each first similarity index is combined into a sequence of in, is the prior interaction feature of the sample object in the target domain Project characteristics of the first project in the target The first similarity index between the sample objects and the recommended item features corresponding to each recommended item are multiplied respectively to obtain the second similarity index corresponding to each recommended item.
[0113] In some embodiments, the similarity indicator may also be the cosine similarity between features in vector form.
[0114] In step 304, a plurality of strong negative samples are screened out from a plurality of recommended items based on a similarity index, and the screened plurality of recommended items are combined into a candidate recommended item set.
[0115] For example, the screening method includes, but is not limited to, sorting the similarity indicators and selecting at least part of the indicators in descending order as strong negative samples.
[0116] In some embodiments, reference Figure 3D , Figure 3D is a flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application. Step 304 can be performed by Figure 3D Steps 3041 to 3044 are implemented as described in detail below.
[0117] In step 3041, each recommended item is sorted in descending order according to the first similarity index, and at least part of the recommended items at the head of the descending sorting result are combined into a first candidate set.
[0118] For example, a preset number of recommended items at the head of the descending sorting result are uniformly sampled, and the sampled recommended items are combined into a first candidate set.
[0119] In step 3042, the positive sample features of the positive sample corresponding to the sample object are obtained, and a third similarity index between the positive sample features and the recommended item features of each recommended item in the first candidate set is obtained.
[0120] For example, the positive sample feature of the positive sample is preconfigured, and the third similarity index of each recommended item can be obtained in the following manner: obtain the product between the positive sample feature and the recommended item feature of the recommended item, and use the product as the third similarity index.
[0121] In step 3043, the recommended items whose third similarity index is greater than the first similarity threshold are deleted from the first candidate set to obtain a second candidate set.
[0122] For example, the first similarity threshold may be preconfigured, or may be dynamically changed according to the difference between the current time and the start time of sample processing.
[0123] In some embodiments, reference Figure 3F , Figure 3F is a flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application. After step 301, execute Figure 3F Steps 3081 to 3085 in are performed to obtain a similarity threshold.
[0124] In step 3081, the recommended item features of the plurality of recommended items, the item clusters to which they belong, and the cluster center item features corresponding to each item cluster are obtained.
[0125] For example, the recommended item feature V in multiple recommended items T Generate project clusters using the K-means algorithm and the corresponding cluster centers (k i is the number of clusters of predefined item clusters), where is a cluster of items with index k Characteristics of cluster center projects.
[0126] In step 3082, based on the recommended item features of each recommended item included in each item cluster and the cluster center item features, the clustering index corresponding to each item cluster is determined.
[0127] For example, for each person who wants to buy a car, the clustering index corresponding to the project cluster is determined by taking a weighted sum of the products between the features of each recommended project in the project cluster and the features of the cluster center project.
[0128] Step 3082 can be implemented in the following manner: For each item cluster, the following processing is performed: Obtain the transposed (v T ) T Features of cluster center items The first product between Get each first product separately and the second ratio between the number of recommended items in the item cluster; and the sum of each second ratio is used as the clustering index of the item cluster. Step 3082 can be represented by the following formula (4):
[0129]
[0130] in, is the clustering index of item cluster i.
[0131] In step 3083, the sum of the ratios between the following parameters of each item cluster is taken as the average clustering index corresponding to the multiple recommended items: the clustering index of the item cluster, the number of clusters of the item cluster.
[0132] For example, the ratio between the clustering index of the project cluster and the number of clusters of the project cluster is represented as The average clustering index
[0133] In step 3084, based on the first difference between the current moment and the start moment of sample processing and the average clustering index, the decayed average clustering index is determined.
[0134] For example, step 3084 can be implemented by: obtaining a preconfigured period attenuation ratio τ, an initial filtering index χ, and a number of sample processing cycles ψ; obtaining an average clustering index s c The third ratio between the initial filtering index χ Assume that the current time is e and the starting time is μ, and take the ratio between the first difference (e-μ) and the number of cycles ψ as the exponent The period decay ratio is used as the base τ to form the time decay parameter The product of the third ratio and the time decay parameter is used as the average clustering index of decay
[0135] In step 3085, the smaller value of the average clustering index and the decayed average clustering index is used as the first similarity threshold.
[0136] For example, the average clustering index and the decayed average clustering index are compared, and the smaller value is used as the first similarity threshold.
[0137] In some embodiments, the start time is set to a time in the future of the current time, in which case the first similarity threshold may be infinite. Steps 3081 to 3085 are also applicable to obtaining the second similarity threshold.
[0138] Continue to refer Figure 3D In step 3044, each recommended item in the second candidate set is sorted in descending order according to the second similarity index, and at least part of the recommended items at the head of the descending sorting result are combined into a candidate recommended item set.
[0139] For example, the second similarity index is the product of the comprehensive interaction feature and the recommended item feature corresponding to each recommended item. For example, the second similarity index of item i in the target domain can be obtained by the following method: The project features of project i in the target domain Multiply them together to obtain the second similarity index of item i in the target domain.
[0140] In step 305, the third interaction feature and the fourth interaction feature of the sample object are obtained.
[0141] For example, the third interaction feature is an interaction feature of a sample object having a time-sensitive interaction behavior in a source domain, and the fourth interaction feature is a cluster center of the second interaction features of multiple sample objects in a target domain;
[0142] In some embodiments, step 305 can be implemented by: taking the last source domain item feature in the first interaction feature in the sequence form as the third interaction feature, wherein the last source domain item feature is used to characterize the last interaction behavior performed by the sample object in the source domain; the third interaction feature can be characterized as Among them, u refers to the user, S is the source domain; obtain the first ratios between the following parameters corresponding to multiple sample objects respectively: the second prediction feature of the sample object in the target domain, and the number of objects in the object cluster to which the sample object belongs; add each first ratio to obtain the fourth interaction feature.
[0143] The number of objects in an object cluster can be obtained through the len() function. The object cluster is also the user cluster, which is represented as the user cluster. The second prediction feature of the sample object in the target domain is the user's prior behavior matrix in the target domain The first ratio can be characterized as Then, each first ratio is added to obtain the fourth interaction feature The formula is as follows (5):
[0144]
[0145] Among them, the len() function is used to quickly obtain the number of elements in a sequence (such as list, tuple, str) and can be used to check the length of a string, list, tuple, dictionary or set. The fourth interactive feature is used to characterize the centroid feature of each user cluster. Among them, k represents the index of the user cluster to which user u belongs.
[0146] In some embodiments, the migration interaction features include: a priori source domain migration interaction features of sample objects, source domain migration interaction features of sample objects; source domain migration interaction features, which are used to characterize the changes in the interactive behavior of an object during the process of migrating from the source domain to the target domain, and a priori source domain migration interaction features, which are used to characterize the changes in the interactive behavior of an object that has not yet been executed during the process of migrating from the source domain to the target domain.
[0147] In step 306, the third interaction feature and the fourth interaction feature of the sample object are fused to obtain a migration interaction feature of the sample object;
[0148] Step 306 can be implemented in the following manner: calling a corrected linear function to activate the first prediction feature and the fourth interaction feature of the sample object to obtain the prior source domain migration interaction feature of the sample object. Calling a corrected linear function to activate the third interaction feature and the fourth interaction feature to obtain the source domain migration interaction feature of the sample object.
[0149] For example, according to the first prediction feature Fourth interactive feature Call the corrected linear function to calculate and obtain the prior source domain migration interaction features According to the third interactive feature and the fourth interactive feature Call the corrected linear function to calculate and obtain the source domain migration interaction feature
[0150] In step 307 , based on a similarity index between the migration interaction feature and each recommended item in the candidate recommended item set, a plurality of true strong negative samples are screened out from the plurality of strong negative samples.
[0151] For example, multiple real strong negative samples are used to train the cross-domain recommendation model. The screening method includes, but is not limited to, sorting the similarity indicators and selecting at least part of the samples in descending order as real strong negative samples.
[0152] In some embodiments, reference Figure 3E , Figure 3E is a flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application. Step 307 can be performed by Figure 3E Steps 3071 to 3076 are implemented as described in detail below.
[0153] In step 3071, a fourth similarity index between the prior source domain migration interaction feature of the sample object and the recommended item feature corresponding to each recommended item is obtained.
[0154] For example, the following processing is performed for each recommended item: the prior source domain migration interaction feature and the recommended item feature are multiplied to obtain a fourth similarity index of the recommended item. The fourth similarity index is the product of matrices.
[0155] In step 3072, each strong negative sample in the candidate recommendation item set is sorted in descending order according to the fourth similarity index, and at least part of the strong negative samples at the head of the descending sorting result are combined into a third candidate set.
[0156] For example, a preset number of strong negative samples at the head of the descending sorting results are uniformly sampled, and the sampled strong negative samples are combined into a third candidate set.
[0157] In step 3073, the positive sample features of the positive sample corresponding to the sample object are obtained, and a third similarity index between the positive sample features and the recommended item features of each recommended item in the third candidate set is obtained.
[0158] For example, the principle of step 3073 is the same as that of step 3043, which will not be repeated here.
[0159] In step 3074, the recommended items whose third similarity index is greater than the second similarity threshold are deleted from the third candidate set to obtain a fourth candidate set.
[0160] For example, the method for obtaining the second similarity threshold can refer to step 3044 above, which will not be repeated here. In the field of sample enhancement processing, the similarity between a false strong negative sample and a positive sample is higher than that between a true strong negative sample and a strong negative sample. The higher the similarity between a strong negative sample and a positive sample, the higher the possibility that the sample belongs to a false strong negative sample. By comparing the similarity index with the similarity threshold, samples whose similarity index is greater than the similarity threshold are deleted, so that there are fewer false strong negative samples in the remaining samples, thereby improving the accuracy of obtaining true strong negative samples.
[0161] In step 3075, a sixth similarity index between the source domain migration interaction feature of the sample object and the recommended item feature corresponding to each recommended item is obtained.
[0162] For example, the following processing is performed for each recommended item: the product between the source domain migration interaction feature of the sample object and the recommended item feature is obtained, and the product is used as the sixth similarity indicator.
[0163] In step 3076, each recommended item in the fourth candidate set is sorted in descending order according to the sixth similarity index, and at least part of the recommended items at the head of the descending sorting result are used as true strong negative samples.
[0164] For example, a preset number of recommended items at the head of the descending sorting result are uniformly sampled, and the sampled recommended items are used as true strong negative samples.
[0165] In the embodiment of the present application, through multiple rounds of screening, the false strong negative samples contained in the final real strong negative samples are reduced, and then, the cross-domain recommendation model can be trained based on the real strong negative samples to improve the accuracy of the model's recommendation in the target domain.
[0166] In some embodiments, after step 307, the cross-domain recommendation model is trained in the following manner: a training sample set is obtained, wherein the training sample set includes: sample interaction features of sample objects, multiple sample recommendation items as positive samples, and multiple sample recommendation items as negative samples, wherein the negative samples include a preconfigured number of real strong negative samples, the sample label value of the negative samples is 0, and the sample label value of the positive samples is 1; based on the training sample set, the initialized cross-domain recommendation model is called to predict the recommendation results, and the recommendation results corresponding to each sample recommendation item are obtained; according to the difference between the recommendation results corresponding to each sample recommendation item and the sample label value, the loss function of the cross-domain recommendation model is determined; based on the loss function, the parameters of the initialized cross-domain recommendation model are updated to obtain the trained cross-domain recommendation model.
[0167] For example, the loss function can be obtained by: performing the following processing for each sample recommendation item: converting the transposed matrix (u T ) T , the matrix of recommended item features for each sample recommended item Multiply them together to get the predicted probability of the sample recommendation item u T is the interaction feature of the target domain; get the logarithm of the predicted probability Sample label value of sample recommendation item The second product is represented by Get the second difference between 1 and the sample label value and get the logarithm of the third difference between 1 and the predicted probability The logarithm of the second difference and the logarithm of the third difference are multiplied to obtain the third product, which is represented as The sum of the second and third products is taken as the sub-loss of the sample recommendation item, and the sub-loss is represented as The loss function of the cross-domain recommendation model is obtained by adding up each sub-loss. The loss function L is represented by the following formula (9):
[0168]
[0169] Among them, R T is the training set of the target domain, and Represent the positive samples and the corresponding negative samples respectively, Represents the predicted probability for (u,d).
[0170] In the embodiment of the present application, multiple recommendation items are preliminarily screened according to the fusion interaction features between sample objects in different domains to obtain a set of candidate recommendation items composed of strong negative samples, and the candidate recommendation item set is screened according to the interaction features of sample objects migrating between different domains to obtain real strong negative samples for training cross-domain recommendation models. Through multiple rounds of screening, the accuracy of the real strong negative samples obtained by screening is improved, and the real strong negative samples obtained by screening are used to train the cross-domain recommendation model to improve the accuracy of the model's information recommendation in the target domain.
[0171] The following describes an exemplary application of the sample processing method of the cross-domain recommendation model according to an embodiment of the present application in a practical application scenario.
[0172] Existing technologies can be roughly divided into three categories: cross-domain recommendation, cross-domain sequential recommendation, and negative sampling methods in the recommendation field. Among them, cross-domain recommendation (CDR) is one of the representative methods to alleviate the data sparsity problem in the recommendation field. It helps improve the performance of the model in the target domain by overlapping users' auxiliary behaviors from other fields. Classic cross-domain recommendation algorithms generally use multi-task learning, alignment constraints, and contrastive learning to simulate cross-domain knowledge transfer. Cross-domain sequential recommendation (CDSR) is a subfield of cross-domain recommendation, that is, compared with traditional cross-domain recommendation, it pays more attention to the multi-domain time behavior sequence of users.
[0173] Existing research mainly includes cross-domain recommendation and negative sampling methods for recommendation. Most of the existing cross-domain recommendation methods only focus on the cross-domain correlation of the feature level of negative samples randomly sampled from the target domain, while ignoring their cross-domain differences at the sample level. Over-optimizing these randomly sampled negative samples at the feature level will ignore the user's source domain preferences to a certain extent, which may lead to suboptimal performance. Negative sampling methods for recommendation are also usually divided into static negative sampling strategies and strong negative sampling strategies according to whether the proposed sampling probability is fixed or not. Among them, the static negative sampling strategy usually performs negative sampling according to a fixed distribution probability, which makes it impossible to dynamically capture the preference changes between users and items during model training. The strong negative sampling strategy is mostly designed on collaborative filtering tasks and may not be directly transferred to cross-domain recommendation tasks and work. In addition, these methods avoid the problem of false strong negative samples by selecting parameters, which is unstable and unexplainable for different data sets, and also makes it challenging to effectively explore and utilize strong negative samples.
[0174] The embodiment of the present application proposes an effective, simple and universal real strong negative sample (RealHNS) sampling method for cross-domain recommendation (CDR) tasks, and proposes a universal real negative sample and a cross-domain real strong negative sample sampler under the cross-domain recommendation task, and filters out the false strong negative samples (FHNS) from all strong negative samples (HNS) and selects the real strong negative samples (RHNS). This can be achieved in the following way: when screening two types of samples, coarse-grained and fine-grained RHNS selectors are performed in turn, and the false strong negative samples in the candidate set are filtered out through a dynamic filter for the project (recommended content). For special cross-domain settings, the embodiment of the present application further designs a new cross-domain real strong negative sample screening method to alleviate the negative information transfer that may exist during the migration of cross-domain recommendation information, and explores the false strong negative samples of different users in special cross-domain settings through a dynamic filter for users, thereby improving the performance of the existing cross-domain recommendation model.
[0175] The sample processing method of the cross-domain recommendation model provided in the embodiment of the present application is significantly different from the related art: (1) coarse-grained and fine-grained strong negative sample selectors are designed in the general true strong negative sample selector to effectively find true strong negative samples, and a false strong negative sample filter for items (recommended content) is used to dynamically filter out strong negative samples that are too similar to positive samples.
[0176] (2) A novel cross-domain negative sample is creatively proposed in the cross-domain true strong negative sample selector to combat the inherent negative information transfer problem in cross-domain recommendation. That is, a dynamic false strong negative sample filter for users is designed, which works together with the coarse-grained and fine-grained strong negative sample selectors to improve the screening and optimization of cross-domain strong negative samples from the user's perspective.
[0177] (3) Through the curriculum learning framework, the relative proportions of random negative samples, true strong negative samples, and false strong negative samples in the training samples are balanced during the model training process.
[0178] (4) The sample processing method of the cross-domain recommendation model provided in the embodiment of the present application is independent of the model, easy to deploy, and can be applied to different negative sampling methods and can bring stable improvements.
[0179] To facilitate understanding of the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application, the relationship between the object and the sample under the cross-domain recommendation is explained.
[0180] refer to Figure 4A , Figure 4A It is a schematic diagram of the relationship between features and samples provided in an embodiment of the present application; it is an illustration of universal false strong negative samples and cross-domain false strong negative samples under a cross-domain recommendation setting, where stars and circles represent features of users and items, respectively. Figure 4A Characterization,General false strong negative samples are close to positive samples.
[0181] refer to Figure 4B , Figure 4B It is a schematic diagram of the relationship between the features and samples provided in the embodiments of the present application; users who deviate from the mainstream cross-domain migration (for example, users have no similarities in preferences for different fields, for example, it is difficult to accurately recommend themes of books that users like through movies) are regarded as outliers, and they will be affected by the errors of non-outliers. As shown by the black arrow, the star represented by the outlier is outside the area where the non-outlier is located.
[0182] refer to Figure 4C , Figure 4C It is a schematic diagram of the relationship between the features and samples provided in the embodiments of the present application; Figure 4C It can be seen that cross-domain false strong negative samples are related to non-outliers in cross-domain recommendations.
[0183] For example, according to the above FIG. 4A to FIG. 4C The relationship between features and synchronization in the field of cross-domain recommendation in this application embodiment analyzes the cross-domain setting and proposes three types of hypotheses: Hypothesis 1: Items (recommended content) that are similar to positive samples are more likely to become false strong negative samples than other samples in cross-domain recommendations. Hypothesis 2: Samples that have strong similarities with the user's source domain features indicate the migration preference of these users and are more likely to become false strong negative samples of non-outliers. Hypothesis 3: Introducing all strong negative samples at the beginning of the training process may lead to computational waste and suboptimal performance.
[0184] A sample processing method proposed in an embodiment of the present application uses a universal true strong negative sample selector and a cross-domain true strong negative sample selector in the sampling process to improve cross-domain recommendations. Specifically, given the behavioral sequence features of the source domain and the target domain, the universal true strong negative samples are sampled by the universal true strong negative sample selector to obtain a universal candidate item set, and the false strong negative samples that may exist in the universal candidate item set are eliminated by the false strong negative sample filter for the item.
[0185] In order to further alleviate the negative transfer inherent in cross-domain recommendation, a cross-domain true strong negative sample selector is set up to dynamically distinguish outliers in the entire user set and false strong negative samples in the cross-domain candidate item set through false strong negative sample filters for users and items.
[0186] The sampling methods of the above two domains (source domain and target domain) are symmetrical and independent of the model, so that the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application can be easily migrated to collaborative filtering (CF) and sequential recommendation (SR) tasks.
[0187] For example, the following is an explanation of the sample processing method of the cross-domain recommendation model provided by the embodiment of the present application in conjunction with the accompanying drawings. Figure 5 , Figure 5 This is an optional flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application. Figure 5 The steps in are explained.
[0188] In step 501, a sequence encoder is called to extract features of the user's behaviors in the source domain and the target domain to obtain behavior sequence features.
[0189] Define the source domain behavior sequence in the source domain S and the target domain T respectively and target domain behavior sequence Where p and q represent the number of behaviors of the user in the source domain and the target domain respectively. and Represent behavior embedding respectively. Given a behavior sequence S S and S T , the real strong negative sample framework attempts to recommend the user's next interactive item in the target domain The source domain behavior sequence is also the first interaction feature mentioned above, and the target domain behavior sequence is also the second interaction feature mentioned above.
[0190] In this embodiment of the application, the sequence recommendation algorithm SASRec is used as a sequence encoder. T For example, the source domain sequence can be extracted in the same way, and the embodiments of this application will not be repeated one by one. The input matrix is constructed where d is the embedding feature size, represents the learnable item index embedding feature, Represents the position embedding feature.
[0191] Call the sequence encoder (sequence recommendation algorithm SASRec) to input the matrix D T Linear projection is the query instruction Q T , key K T Sum value V T , and substitute the three into the attention calculation method, which is defined as follows:
[0192]
[0193] Among them, QT =D T W Q ,K T =D T W K ,V T =D T W V ,W Q ,W K ,W V Respectively represent different linear mapping layers. The embodiment of the present application also obtains the implicit behavior matrix H of the target domain through a point wise feed forward network. T , where the point-wise feedforward network consists of two fully connected layers with a ReLU activation function between the two layers. The implicit behavior matrix H T The acquisition process of is represented by the following formula (2):
[0194]
[0195] Among them, w1, w2 represent weight matrices, b1, b2 are bias vectors. The user's implicit behavior matrix in the source domain is H S The same is true for the user's behavioral interaction sequence S in the source domain S The implicit behavior matrix H of the user in the source domain can be obtained by the same principle as formula (2): S .
[0196] The primary task in solving the false negative problem is to distinguish false strong negative samples from real strong negative samples from the entire project set based on the user's historical interaction information. The embodiment of the present application proposes a universal real strong negative sample selector to select universal real strong negative samples in cross-domain recommendations. Specifically, the embodiment of the present application is designed to obtain a set of candidate projects related to the user's general preferences through coarse-grained real strong negative sample selection, and to remove projects that are too similar to positive samples from the candidate project set through fine-grained real strong negative sample selection, wherein the parameters used as filtering indicators in the fine-grained screening process are dynamic (related to assumption 1 above), which is specifically explained in steps 502 and 503 below.
[0197] In step 502, strong negative samples related to the user's general preference in the entire item set are screened according to multiple behavior sequence features to obtain a candidate item set.
[0198] In related technologies, strong negative sampling usually involves uniformly sampling a fixed number of candidate item sets, and then dynamically selecting items with the highest scores calculated by the recommendation model in the current state from the randomly selected candidate item set as strong negative samples. However, this type of method relies too much on the appropriate number of candidate items, that is, too few candidate items will lead to randomness and unstable quality of strong negative samples, while too many candidate items will greatly increase the hardness of the selected strong negative samples, resulting in optimization deviations of the model. At the same time, the above method also shows obvious parameter changes on different data sets, and cannot achieve consistency improvement relative to static negative sampling methods in all cases.
[0199] The embodiment of the present application samples item candidates related to the user's general preference in cross-domain recommendation by performing a general coarse-grained selection on the entire item set.
[0200] For example, the sequence encoder calculates the prior behavior matrix of the source domain and the target domain at the beginning of each epoch (preset period) and Based on the assumption that "the last behavior in the object's behavior sequence contains his / her overall preference", the prior interaction features of user u are generated, and finally the prior interaction features of the user in the target domain are Obtained by the following formula (3):
[0201]
[0202] in, represents the prior behavior embedding feature (first prediction feature) of the last behavior of user u in the behavior sequence of the source domain, is the prior behavior embedding feature (second prediction feature) of the last behavior in the behavior sequence of the target domain, MLP f (.) represents a two-layer fully connected network activated by LeakyReLU, which is the rectified linear function mentioned above.
[0203] Prior final interaction features for user u and learnable item embedding features To calculate the first similarity index, and sort the first similarity index from large to small, the calculation method is: obtain the product between the project features in the learnable project embedding features and the user's prior interaction features in the target domain. The calculation result represented as a sequence is Each element in the calculation result is the first similarity index corresponding to each project. A fixed number of projects are uniformly sampled from the top range with a larger first similarity index to construct a general candidate project set.
[0204] The embodiment of the present application can sample the general candidate item set based on the prior knowledge of the user's general preferences, alleviating the problem of excessive randomness in selecting the candidate item set in the existing method. It is worth noting that the embodiment of the present application only performs the above operation at the beginning of each period, so it does not introduce too much computational cost. When serving online, it can be achieved through KD-Tree (a tree data structure that stores instance points in k-dimensional space for fast retrieval). Time complexity (the number of times a statement in an algorithm is executed is called statement frequency or time frequency. Time complexity is used to describe the running time of an algorithm).
[0205] In step 503, samples whose similarity with the positive sample reaches a threshold in the candidate item set are eliminated to obtain a general candidate item set.
[0206] Unlike the classic strong negative sampling work that emphasizes that "the higher the score between the user and the item, the more likely it is a false strong negative sample", where the score can be a similarity indicator in the embodiment of the present application, the embodiment of the present application also proposes an additional assumption: in cross-domain recommendations, items similar to positive samples are more likely to be false strong negative samples. This assumption is very intuitive, that is, if a user likes an item, such as character A, he / she is likely to like other similar items, such as character B and character C that belong to the same series as character A.
[0207] Based on the above assumptions, the embodiment of the present application adaptively filters the candidate item set by selecting fine-grained true strong negative samples based on unsupervised clustering. Specifically, the embodiment of the present application selects the item embedding feature V T The project clusters are generated by K-means algorithm and the corresponding cluster centers (k i is the number of clusters of predefined project clusters), and calculate the average project clustering index in Represents the cluster with index k Embedding features of all items in Their corresponding cluster centers Similarity index between them, clustering index of each project cluster It can be defined as the following formula (4):
[0208]
[0209] Clustering index based on each item cluster Calculate the average clustering index Based on the average clustering index s c The proposed filtering index for the project can be set dynamically d(the first similarity threshold above).
[0210] Filtering can be achieved by multiplying the matrix of project features of each project with the matrix of features of the positive sample to obtain the similarity index between each project v and the positive sample (the third similarity index above), and judging whether the similarity index is less than the filtering index s d (the first similarity threshold above), determines whether to remove item v from the set of general candidate items In response to being less than the filter index, the item is kept in the general candidate item set In response to being less than the filter index, from the set of general candidate items Excluded.
[0211] Example, filter indicators d The calculation method of is described in step 506 below.
[0212] In the embodiment of the present application, the filtered general candidate item set The third similarity index corresponding to each item in is sorted respectively, and the items with higher ranking of the third similarity index are evenly sampled.
[0213] Given the behavior matrix H of the source domain and target domain of user u S and H T , based on the latest interactive features in the behavior sequences in the source and target domains and Generate the final user interaction features That is the comprehensive interaction feature mentioned above.
[0214] The present application embodiment calculates the final user interaction features and the filtered set of common candidate items A second similarity metric is then used between the item embedding features in , and then items are selected in the top-ranked item list as universal true strong negative samples.
[0215] Referring to the specific concept of hypothesis 1, the embodiment of the present application believes that items that are closer to positive samples are more likely to be false strong negative samples. Therefore, the proposed general true strong negative sample selector helps to eliminate items that are similar to positive samples, which is a tailor-made solution to the false negative problem in general strong negative samples.
[0216] The embodiment of the present application proposes a cross-domain true strong negative sample selector, which adopts a cross-domain coarse-grained true strong negative sample selector to sample a cross-domain candidate item set related to the user's source domain preference, and designs a cross-domain fine-grained true strong negative sample selector. The selector eliminates potential false strong negative samples in cross-domain migration and cross-domain candidate item sets through dynamic filters for users and items, and further samples cross-domain true strong negative samples in cross-domain recommendations, which is specifically explained in steps 504 and 505 below.
[0217] In step 504, samples related to the user's source domain preference in the general candidate item set are sampled to obtain a cross-domain candidate item set.
[0218] Most of the strong negative sampling methods in related technologies are designed in collaborative filtering tasks and are difficult to directly migrate to cross-domain recommendation scenarios. This is because cross-domain recommendation tasks introduce additional information from the source domain to accurately model the user's complete preferences. As a result, these methods can only avoid the false negative problem in a single domain, but cannot solve the problem of cross-domain positive transfer.
[0219] The embodiments of the present application assume that users with consistent behaviors in the source domain may have similar preferences in the target domain, and propose a coarse-grained true strong negative sample selector to accurately model users' cross-domain preferences in the target domain and their related cross-domain candidate item sets.
[0220] For example, given the prior behavior matrix of the source domain and the target domain and The embodiment of the present application calculates the user's prior behavior matrix in the source domain Perform K-means clustering to generate source domain user clusters Then, based on the source domain user cluster and the user’s prior behavior matrix in the target domain (k u is the number of clusters of user clusters in the source domain) to calculate the centroid features of the target domain Among them, the centroid feature of each user cluster It is the fourth interactive feature mentioned above, the centroid feature of each user cluster The measurement method is as follows:
[0221]
[0222] in, The embedded features that represent the prior behavior of user u in the behavior sequence of the target domain. The len() function is used to quickly obtain the number of elements in a sequence (such as list, tuple, str) and can be used to check the length of a string, list, tuple, dictionary, or set.
[0223] Embedding features of prior behaviors in behavior sequences based on the source domain Center of gravity characteristics Generate prior transferred source domain features in the final space Where k represents the index of the user cluster to which user u belongs.
[0224] Similar to the principle of step 502, based on the prior migration source domain features (the prior source domain transfer interaction feature above) and the learnable item embedding feature V T Calculate the cross-domain similarity index (the fourth similarity index above) and sort the cross-domain similarity index from large to small. The calculation method is to obtain the project features in the learnable project embedding features, the prior migration source domain features The product between A fixed number of items are uniformly extracted from the top range with higher rankings to form a cross-domain candidate set of items.
[0225] Cross-domain project candidate collection It is composed of items related to the user's source domain preferences. Therefore, the embodiment of the present application can accurately simulate the user's migration preferences between two domains through fine-grained analysis and processing.
[0226] In step 505, false strong negative samples in the cross-domain migration and cross-domain candidate item set are eliminated, and real strong negative samples in the cross-domain candidate item set are sampled.
[0227] The purpose of cross-domain recommendation is to transfer informative knowledge from the source domain to the target domain to improve the performance of the target domain. Due to the different domains to which the projects belong, there are inherent data biases in user preferences in multiple domains, making it challenging to achieve unified modeling of user preferences in different domains. The proposed cross-domain true strong negative samples mainly model the preferences of the mainstream target domain by unsupervised clustering of similar source domain preferences. It performs well in a broad sense, while over-optimizing cross-domain true strong negative samples will actually aggravate bias and introduce additional negative information for users whose preferences in the source and target domains are consistent. Figure 1 As shown in the middle part, during the cross-domain migration process, users who are clustered into the same cluster in the source domain user interaction feature space show obvious distribution differences in the target domain user interaction feature space. This is attributed to different mapping methods for different users. In the real world, there is actually a large amount of source domain information, which makes some users more likely to be dominated by the mainstream preference migration mode during the migration process.
[0228] The embodiment of the present application defines outliers as users who show similar preferences in the source domain, but show significantly different preferences in the target domain from the mainstream migration preferences. The embodiment of the present application proposes a dynamic filter for users to include outliers in the optimization range of cross-domain true strong negative samples. Given a user cluster index k, the user cluster of the embodiment of the present application The embedding feature matrix of the last behavior in the prior target domain behavior sequence of all users in and the target domain center feature The score list between Define the following formula (6):
[0229]
[0230] Then the present embodiment lists the scores Sort and sort according to the predefined weight w o Select the lowest score in the score list Users are regarded as outliers. The cross-domain recommendation models corresponding to these outliers are trained based on the universal true strong negative samples and cross-domain true strong negative samples, while for other users, only the cross-domain recommendation model corresponding to the universal true strong negative samples is used.
[0231] In addition to the inherent multi-domain preference bias, there is also the problem of negative information migration in the cross-domain preference modeling process, that is, over-reliance on the cross-domain project candidate set may introduce bias in the selection of cross-domain real strong negative samples (see hypothesis 2). In order to eliminate the bias in cross-domain preference modeling, the embodiment of the present application designs a dynamic filter for the project to filter out the parts of the cross-domain project candidate set that are too similar to the positive samples. The filter for the project is designed based on unsupervised project similarity, and the cross-domain setting does not change the intrinsic relationship between its projects.
[0232] The universal filtering index for projects mentioned in step 503 is used to filter the cross-domain project candidate set. By comparing the similarity index between the project and the positive sample with the filtering index s for the project d to evaluate whether to eliminate item v from the set of cross-domain item candidates.
[0233] Embed features by nearest behavior in source domain and the centroid feature of the target domain (k represents the index of the source domain user cluster to which u belongs) Modeling is performed. Finally, the source domain features of the migration are calculated And the filtered cross-domain project candidate set We then use the similarity metric between the item embedding features in , and then select a fixed number of items among the top-ranked items as strong negative samples across domains.
[0234] In step 506, the number of real strong negative samples in the training sample set required for training the cross-domain recommendation model is obtained.
[0235] As shown in Assumption 3, including all strong negative samples in the initial stage of training may lead to computational waste, suboptimal performance, and excessive gradients, which may further hinder the model from converging to the global minimum. To this end, the embodiment of the present application uses a curriculum learning (CL) method to improve the generalization ability and convergence rate of the cross-domain recommendation model. Curriculum learning is a general training strategy that mimics the learning sequence in human courses and slowly increases the difficulty of training samples as the model is optimized.
[0236] The present application embodiment designs two curriculum learning (CL) methods, including an optimization-based curriculum learning (CL) method and a filtering-based curriculum learning (CL) method. The former refers to dynamically adjusting the proportion of true strong negative samples in NS, which enables the model to start from a smooth target and is easier to find the global minimum. At this time, the hyperparameter μ controls the starting period in CL, ψ is the number of period intervals in CL, η represents the number of additional true strong negative samples, and the number of true strong negative samples in the reference negative sample n r Formula (7):
[0237]
[0238] Among them, e is the current period, n n Represents the number of NS negative samples. The above parameters are the same in each dataset, namely μ = 5, ψ = 2, η = 1.
[0239] In contrast, the latter CL task is used to dynamically adjust the range of the candidate set of through items and the cross-domain candidate set of items to be filtered to mitigate the situation of incorporating difficult NS (potential false strong negative samples) into training. The pre-set hyperparameters χ = 5 initial filter size and τ = 1.15 represent the epoch decay ratio, respectively. The proposed filtering index sd for the item is defined as formula (8):
[0240]
[0241] In step 507, a cross-domain recommendation model is trained based on the training sample set.
[0242] The present application embodiment is based on the final user interaction feature u T and the characteristics of the target project To calculate the user u and the project The prediction reliability between And the loss function It is expressed as the following formula (9):
[0243]
[0244] Among them, R T is the training set of the target domain, and Represent the positive samples and the corresponding negative samples respectively, Represents the predicted probability for (u,d).
[0245] The embodiment of the present application can obtain a greater improvement in recommendation performance when making cross-domain recommendations from a denser domain to a sparser domain (Game->Toy recommends toys based on game samples, Movie->Book recommends books based on movie samples), proving the practical significance of true strong negative samples in cross-domain knowledge transfer. It also proves that the universal true strong negative samples and cross-domain true strong negative samples proposed in the embodiment of the present application can obtain a significant improvement in consistency based on the existing negative sampling method of the advanced model (State-Of-The-Art model, SOTA) in the field. The embodiment of the present application can be applied in the following scenarios: cross-domain recommendations between platforms with sparse consumer behavior and platforms with rich consumer behavior.
[0246] The following is combined with experimental results to explain the effect of the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application. By comparing with the existing SOTA algorithm, the effectiveness and universality of the method of the embodiment of the present application are comprehensively analyzed. In the performance comparison, three classic evaluation indicators were selected to evaluate the effectiveness of the sample processing method of the cross-domain recommendation model provided by the embodiment of the present application, including NDCG@k (N@k), HitRate@k (HR@k) and the area under the ROC curve and the coordinate axis (Area Under Curve, AUC), where k is selected in [5, 10, 20, 50]. The embodiment of the present application randomly selects 99 negative samples for each positive sample in the test set, and shows the best results in bold in Table 1, and the best effect of the baseline algorithm is shown in underline.
[0247] Fig. 6A It is a table of experimental results provided in the embodiments of the present application; Fig. 6A In , the experimental results of recommendation from the game field to the toy field are shown.
[0248] Figure 6B This is a table of experimental results provided in the embodiments of the present application, showing the experimental results recommended from the toy field to the game field.
[0249] Figure 6C It is a table of experimental results provided in the embodiments of the present application; it shows the experimental results recommended from the film field to the book field.
[0250] Fig.6DThis is a table of experimental results provided in the embodiments of the present application, showing the experimental results recommended from the book field to the movie field.
[0251] The following conclusions were observed in the examples of the present application: (1) The examples of the present application significantly outperformed all baseline algorithms on four data sets, with a significance level of p<0.05 and an average error range of less than 0.003. The sample processing method of the cross-domain recommendation model provided by the examples of the present application has a greater improvement on smaller k and indicators that are more sensitive to ranking order (NDCG). This is because the examples of the present application focus on distinguishing strong negative samples that are more advantageous in the first few positions of the sorted list. This superiority is consistent in the four cross-domain settings based on the two strong negative sampling methods, indicating that the examples of the present application can bring ideal improvements to various strong negative sampling methods. In addition, this also proves the necessity of capturing specific cross-domain real strong negative samples to improve cross-domain recommendations. It is worth noting that the examples of the present application focus on a more challenging and more common sampling environment in real recommendation systems (including 10 random negative samples and 10 strong negative samples, and more strong negative samples will reduce the impact of sampling). Compared with the classic strong negative sampling method, the examples of the present application, FIG. 6A to FIG. 6D The RealNHS (DNS*) in the paper brings about a consistency improvement (1%-5%), which is sufficient to demonstrate its universality and effectiveness.
[0252] (2) Based on the challenging setting of selecting 20 negative samples in the embodiment of the present application, no strong negative sampling baseline algorithm can consistently outperform other baseline algorithms on all datasets (sometimes even perform worse than using only random NS). Most existing strong negative sampling methods (such as DNS * , MixGCF) only relies on selecting the most difficult items from certain subsets of candidate items to mitigate the impact of false HNS, resulting in over-reliance on the quality of randomly selected subsets of candidate items. Therefore, they perform worse on datasets with larger item corpora or sparser object behaviors (such as game to toy recommendations Game->Toy and movie to book recommendations Movie->Book). The improvements of the embodiments of the present application over existing strong negative sampling methods confirm the importance of the following two points: (1) The filter for items proposed in the universal true strong negative sample can provide unbiased information gradients for the recommendation model; (2) Explicit cross-domain true strong negative samples can simulate the changes in user preferences in multiple fields and incorporate them into the training process through the curriculum learning framework.
[0253] (3) Comparing the improvements between different datasets, the embodiments of the present application perform better in the Game->Toy recommendation and Movie->Book recommendation settings, which reflects that the embodiments of the present application can transfer informative knowledge from the dense source domain to the relatively sparse target domain (similar to the traditional cross-domain recommendation method). Moreover, on all datasets, the embodiments of the present application are better than MixGCF and DNS. * The improvement is also obvious, indicating that the embodiment of the present application is capable of bringing further consistency improvement on different baseline strong negative sampling algorithms. Benefiting from the novel cross-domain real strong negative samples in cross-domain recommendation and the dynamic filters for users and items, the embodiment of the present application is significantly better than other negative sampling methods on all data sets.
[0254] The following is a description of an exemplary structure of a sample processing device 455 of a cross-domain recommendation model provided in an embodiment of the present application implemented as a software module. In some embodiments, Figure 2 As shown, the software modules in the sample processing device 455 of the cross-domain recommendation model stored in the memory 450 may include: a sample acquisition module 4551, configured to acquire multiple recommended items in the target domain, wherein the recommended items are used to recommend to the sample object; the sample acquisition module 4551, configured to fuse the first interaction feature and the second interaction feature of the sample object to obtain a fused interaction feature of the sample object, wherein the first interaction feature is the interaction feature of the sample object in the source domain, and the second interaction feature is the interaction feature of the sample object in the target domain; a sample filtering module 4552, configured to determine a similarity index between the fused interaction feature and each recommended item, and to filter out multiple strong negative samples from the multiple recommended items based on the similarity index, and to filter out the multiple recommended items obtained by filtering. The project combination is a set of candidate recommended projects; the sample acquisition module 4551 is configured to obtain the third interaction feature and the fourth interaction feature of the sample object, wherein the third interaction feature is the interaction feature of the sample object's time-sensitive interaction behavior in the source domain, and the fourth interaction feature is the clustering center of the second interaction feature of multiple sample objects in the target domain; the sample acquisition module 4551 is configured to fuse the third interaction feature and the fourth interaction feature of the sample object to obtain the migration interaction feature of the sample object; the sample filtering module 4552 is configured to screen out multiple real strong negative samples from multiple strong negative samples based on the similarity index between the migration interaction feature and each recommended item in the candidate recommended project set, wherein the multiple real strong negative samples are used to train the cross-domain recommendation model.
[0255] In some embodiments, the sample acquisition module 4551 is configured to obtain source domain items corresponding to each interactive behavior performed by the sample object in the source domain, perform feature extraction on each source domain item, and obtain source domain item features before fusing the first interactive feature and the second interactive feature of the sample object to obtain the fused interactive feature of the sample object; combine each source domain item feature into a first interactive feature in the form of a sequence according to the order in which each interactive behavior in the source domain is performed; obtain target domain items corresponding to each interactive behavior performed by the sample object in the target domain, perform feature extraction on each target domain item, and obtain target domain item features; combine each target domain item feature into a second interactive feature in the form of a sequence according to the order in which each interactive behavior in the target domain is performed.
[0256] In some embodiments, the fused interaction features include: a priori interaction features of the sample object in the target domain, and a comprehensive interaction feature of the sample object for the source domain and the target domain; the sample acquisition module 4551 is configured to perform feature prediction based on each source domain item feature in the first interaction feature in the sequence form to obtain a first prediction feature, wherein the first prediction feature is used to characterize the prior interaction behavior of the sample object in the source domain; perform feature prediction based on each target domain item feature in the second interaction feature in the sequence form to obtain a second prediction feature, wherein the second prediction feature is used to characterize the prior interaction behavior of the sample object in the target domain; call the corrected linear function to activate the first prediction feature and the second prediction feature to obtain the prior interaction feature of the sample object in the target domain; call the corrected linear function to activate the following parameters to obtain the comprehensive interaction feature of the sample object for the source domain and the target domain: the last source domain item feature in the first interaction feature in the sequence form, and the last target domain item feature in the second interaction feature in the sequence form.
[0257] In some embodiments, the sample filtering module 4552 is configured to obtain a first similarity index between the prior interaction features of the sample object in the target domain and the recommended item features corresponding to each recommended item; and obtain a second similarity index between the comprehensive interaction features of the sample object for the source domain and the target domain and the recommended item features corresponding to each recommended item.
[0258] In some embodiments, the sample filtering module 4552 is configured to sort each recommended item in descending order according to a first similarity index, and combine at least some of the recommended items at the head in the descending sorting result into a first candidate set; obtain the positive sample features of the positive sample corresponding to the sample object, and obtain the third similarity index between the positive sample features and the recommended item features of each recommended item in the first candidate set; delete the recommended items whose third similarity index is greater than the first similarity threshold from the first candidate set to obtain a second candidate set; sort each recommended item in the second candidate set in descending order according to the second similarity index, and combine at least some of the recommended items at the head in the descending sorting result into a candidate recommended item set.
[0259] In some embodiments, the sample acquisition module 4551 is configured to use the last source domain item feature in the first interaction feature in sequence form as the third interaction feature, wherein the last source domain item feature is used to characterize the interaction behavior last performed by the sample object in the source domain; obtain the first ratio between the following parameters corresponding to multiple sample objects respectively: the second prediction feature of the sample object in the target domain, the number of objects in the object cluster to which the sample object belongs; add each first ratio to obtain the fourth interaction feature.
[0260] In some embodiments, the migration interaction feature includes: a priori source domain migration interaction feature of the sample object and a source domain migration interaction feature of the sample object; the sample acquisition module 4551 is configured to call a corrected linear function to activate the first prediction feature and the fourth interaction feature of the sample object to obtain the priori source domain migration interaction feature of the sample object; call a corrected linear function to activate the third interaction feature and the fourth interaction feature to obtain the source domain migration interaction feature of the sample object.
[0261] In some embodiments, the sample filtering module 4552 is configured to obtain a fourth similarity index between the prior source domain migration interaction features of the sample object and the recommended item features corresponding to each recommended item; sort each strong negative sample in the candidate recommended item set in descending order according to the fourth similarity index, and combine at least part of the strong negative samples at the head of the descending sorting result into a third candidate set; obtain the positive sample features of the positive sample corresponding to the sample object, and obtain the third similarity index between the positive sample features and the recommended item features of each recommended item in the third candidate set; delete the recommended items whose third similarity index is greater than the second similarity threshold from the third candidate set to obtain a fourth candidate set; obtain the sixth similarity index between the source domain migration interaction features of the sample object and the recommended item features corresponding to each recommended item; sort each recommended item in the fourth candidate set in descending order according to the sixth similarity index, and use at least part of the recommended items at the head of the descending sorting result as true strong negative samples.
[0262] In some embodiments, the sample filtering module 4552 is configured to, after obtaining multiple recommended items in the target domain, obtain recommended item features of the multiple recommended items, the item clusters to which they belong, and the cluster center item features corresponding to each item cluster; determine the clustering index corresponding to each item cluster based on the recommended item features and cluster center item features of each recommended item included in each item cluster; take the sum of the ratios between the following parameters of each item cluster as the average clustering index corresponding to the multiple recommended items: the clustering index of the item cluster, the number of clusters of the item cluster; determine the decayed average clustering index based on the first difference between the current moment and the starting moment of sample processing and the average clustering index; and take the smaller value of the average clustering index and the decayed average clustering index as the first similarity threshold.
[0263] In some embodiments, the sample filtering module 4552 is configured to perform the following processing for each project cluster: obtain the first product between the transpose of each recommended project feature in the project cluster and the cluster center project feature; obtain the second ratio between each first product and the number of recommended projects in the project cluster; and use the sum of each second ratio as the clustering indicator of the project cluster.
[0264] In some embodiments, the sample filtering module 4552 is configured to obtain a preconfigured period decay ratio, an initial filtering index, and the number of cycles for sample processing; obtain a third ratio between the average clustering index and the initial filtering index; use the ratio between the first difference and the number of cycles as an exponent and the period decay ratio as a base to form a time decay parameter; and use the product of the third ratio and the time decay parameter as the decayed average clustering index.
[0265] In some embodiments, the model training module 4553 is configured to obtain a training sample set after screening out multiple real strong negative samples from multiple strong negative samples based on the similarity index between the migration interaction feature and each recommended item in the candidate recommended item set, wherein the training sample set includes: sample interaction features of the sample object, multiple sample recommended items as positive samples, and multiple sample recommended items as negative samples, the negative samples include a preconfigured number of real strong negative samples, the sample label value of the negative sample is 0, and the sample label value of the positive sample is 1; based on the training sample set, the initialized cross-domain recommendation model is called to predict the recommendation results to obtain the recommendation results corresponding to each sample recommended item; according to the difference between the recommendation results corresponding to each sample recommended item and the sample label value, the loss function of the cross-domain recommendation model is determined; based on the loss function, the parameters of the initialized cross-domain recommendation model are updated to obtain the trained cross-domain recommendation model.
[0266] In some embodiments, the model training module 4553 is configured to perform the following processing for each sample recommendation item: multiply the transposed matrix of the interaction feature matrix of the sample object and the matrix of the recommended item features of each sample recommendation item to obtain the predicted probability of the sample recommendation item; obtain the second product of the logarithm of the predicted probability and the sample label value of the sample recommendation item; obtain the second difference between 1 and the sample label value, and obtain the logarithm of the third difference between 1 and the predicted probability; multiply the logarithm of the second difference and the logarithm of the third difference to obtain a third product; take the sum of the second product and the third product as the sub-loss of the sample recommendation item; add each sub-loss to obtain the loss function of the cross-domain recommendation model.
[0267] The embodiment of the present application provides a computer program product, which includes a computer program or a computer executable instruction, and the computer program or the computer executable instruction is stored in a computer-readable storage medium. The processor of the electronic device reads the computer executable instruction from the computer-readable storage medium, and the processor executes the computer executable instruction, so that the electronic device executes the sample processing method of the cross-domain recommendation model described in the embodiment of the present application.
[0268] The embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions or computer programs are stored. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application, for example, Figure 3A A sample processing method for a cross-domain recommendation model is shown.
[0269] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0270] In some embodiments, computer executable instructions may be in the form of a program, software, software module, script or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine or other unit suitable for use in a computing environment.
[0271] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file storing other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files storing one or more modules, subroutines, or code portions).
[0272] As an example, the executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed at multiple sites and interconnected by a communication network.
[0273] In summary, through the embodiments of the present application, multiple recommended items are preliminarily screened according to the fusion interaction features of sample objects between different domains, and a set of candidate recommended items composed of strong negative samples is obtained. The candidate recommended item set is screened according to the interaction features of sample objects migrating between different domains to obtain real strong negative samples for training cross-domain recommendation models. Through multiple rounds of screening, the accuracy of the real strong negative samples obtained by screening is improved. The real strong negative samples obtained by screening are used to train the cross-domain recommendation model, which can improve the accuracy of the model's information recommendation in the target domain.
[0274] The above is only an embodiment of the present application and is not intended to limit the protection scope of the present application. Any modifications, equivalent substitutions and improvements made within the spirit and scope of the present application are included in the protection scope of the present application.
Claims
1. A sample processing method for a cross-domain recommendation model, characterized in that: The method comprises: Acquire a plurality of recommended items of the target domain, wherein the recommended items are used to recommend to the sample object; fusing a first interaction feature and a second interaction feature of the sample object to obtain a fused interaction feature of the sample object, wherein the first interaction feature is an interaction feature of the sample object in a source domain, and the second interaction feature is an interaction feature of the sample object in a target domain; Determine a similarity index between the fused interaction feature and each of the recommended items, screen out a plurality of strong negative samples from the plurality of recommended items based on the similarity index, and combine the screened plurality of recommended items into a candidate recommended item set; Acquire a third interaction feature and a fourth interaction feature of the sample object, wherein the third interaction feature is an interaction feature of a time-sensitive interaction behavior of the sample object in a source domain, and the fourth interaction feature is a cluster center of second interaction features of a plurality of the sample objects in a target domain; fusing the third interaction feature and the fourth interaction feature of the sample object to obtain a migration interaction feature of the sample object; Based on a similarity index between the migration interaction feature and each of the recommended items in the candidate recommended item set, a plurality of true strong negative samples are screened out from the plurality of strong negative samples, wherein the plurality of true strong negative samples are used to train the cross-domain recommendation model.
2. The method according to claim 1, characterized in that Before fusing the first interaction feature and the second interaction feature of the sample object to obtain the fused interaction feature of the sample object, the method further includes: Obtaining source domain items corresponding to each interaction behavior performed by the sample object in the source domain, performing feature extraction on each source domain item, and obtaining source domain item features; According to the order in which each of the interactive behaviors in the source domain is executed, combining each of the source domain project features into a first interactive feature in a sequence form; Obtaining target domain items corresponding to each interactive behavior performed by the sample object in the target domain, performing feature extraction on each target domain item, and obtaining target domain item features; According to the order in which each of the interactive behaviors in the target domain is executed, each of the target domain item features is combined into a second interactive feature in a sequence form.
3. The method according to claim 2, characterized in that The fused interaction features include: a priori interaction features of the sample object in the target domain, and comprehensive interaction features of the sample object for the source domain and the target domain; The fusing the first interaction feature and the second interaction feature of the sample object to obtain the fused interaction feature of the sample object includes: Performing feature prediction on each source domain item feature in the first interaction feature in a sequence form to obtain a first prediction feature, wherein the first prediction feature is used to characterize a priori interaction behavior of the sample object in the source domain; Performing feature prediction on each target domain item feature in the second interaction feature in a sequence form to obtain a second prediction feature, wherein the second prediction feature is used to characterize a priori interaction behavior of the sample object in the target domain; Calling a corrected linear function to activate the first prediction feature and the second prediction feature to obtain a priori interaction features of the sample object in the target domain; The modified linear function is called to activate the following parameters to obtain the comprehensive interaction features of the sample object for the source domain and the target domain: the last source domain item feature in the first interaction feature in the sequence form, and the last target domain item feature in the second interaction feature in the sequence form.
4. The method according to claim 3, characterized in that The determining of the similarity index between the fused interaction feature and each of the recommended items includes: Obtaining a first similarity index between a priori interaction features of the sample object in the target domain and recommended item features corresponding to each of the recommended items; A second similarity index between the comprehensive interaction feature of the sample object for the source domain and the target domain and the recommendation item feature corresponding to each of the recommendation items is obtained.
5. The method according to claim 4, characterized in that The step of screening out a plurality of strong negative samples from the plurality of recommended items based on the similarity index, and combining the screened plurality of recommended items into a candidate recommended item set, comprises: Sort each of the recommended items in descending order according to the first similarity index, and combine at least part of the recommended items at the head of the descending sorting result into a first candidate set; Acquire a positive sample feature of a positive sample corresponding to the sample object, and acquire a third similarity index between the positive sample feature and a recommended item feature of each of the recommended items in the first candidate set; Deleting the recommended items whose third similarity index is greater than the first similarity threshold from the first candidate set to obtain a second candidate set; Each of the recommended items in the second candidate set is sorted in descending order according to the second similarity index, and at least part of the recommended items at the head of the descending sorting result are combined into a candidate recommended item set.
6. The method according to any one of claims 2 to 5, characterized in that: The obtaining the third interaction feature and the fourth interaction feature of the sample object includes: The last source domain item feature in the first interaction feature in the sequence form is used as the third interaction feature, wherein the last source domain item feature is used to characterize the last interaction behavior performed by the sample object in the source domain; Obtaining a first ratio between the following parameters respectively corresponding to the plurality of sample objects: a second prediction feature of the sample object in the target domain and the number of objects in the object cluster to which the sample object belongs; Each of the first ratios is added together to obtain the fourth interaction feature.
7. The method according to claim 6, characterized in that The migration interaction features include: a priori source domain migration interaction features of the sample object and source domain migration interaction features of the sample object; The fusing the third interaction feature and the fourth interaction feature of the sample object to obtain the migration interaction feature of the sample object includes: Calling a corrected linear function to activate the first prediction feature and the fourth interaction feature of the sample object to obtain a priori source domain migration interaction feature of the sample object; The corrected linear function is called to activate the third interaction feature and the fourth interaction feature to obtain the source domain migration interaction feature of the sample object.
8. The method according to claim 7, characterized in that The step of selecting a plurality of true strong negative samples from the plurality of strong negative samples based on a similarity index between the migration interaction feature and each of the recommended items in the candidate recommended item set comprises: Obtaining a fourth similarity index between the prior source domain migration interaction feature of the sample object and the recommended item feature corresponding to each of the recommended items; Sort each of the strong negative samples in the candidate recommendation item set in descending order according to the fourth similarity index, and combine at least part of the strong negative samples at the head of the descending sorting result into a third candidate set; Acquire a positive sample feature of a positive sample corresponding to the sample object, and acquire a third similarity index between the positive sample feature and a recommended item feature of each of the recommended items in the third candidate set; Deleting the recommended items whose third similarity index is greater than the second similarity threshold from the third candidate set to obtain a fourth candidate set; Obtaining a sixth similarity index between the source domain migration interaction feature of the sample object and the recommended item feature corresponding to each of the recommended items; Each of the recommended items in the fourth candidate set is sorted in descending order according to the sixth similarity index, and at least part of the recommended items at the head of the descending sorting result are used as true strong negative samples.
9. The method according to claim 5, characterized in that After obtaining a plurality of recommended items of the target domain, the method further includes: Acquire the recommended item features of the plurality of recommended items, the item clusters to which they belong, and acquire the cluster center item features corresponding to each of the item clusters; Determine a clustering index corresponding to each of the project clusters based on the recommended project features and cluster center project features of each of the recommended projects included in each of the project clusters; The sum of the ratios of the following parameters of each of the item clusters is used as the average clustering index corresponding to the plurality of recommended items: the clustering index of the item cluster and the number of clusters of the item cluster; Determine a decayed average clustering index based on a first difference between the current moment and the start moment of sample processing and the average clustering index; The smaller value between the average clustering index and the attenuated average clustering index is used as the first similarity threshold.
10. The method according to claim 9, characterized in that The determining of the clustering index corresponding to each of the project clusters based on the recommended project features and cluster center project features of each of the recommended projects included in each of the project clusters includes: The following processing is performed for each of the item clusters: Obtaining a first product between the transposition of each of the recommended item features in the item cluster and the cluster center item feature; respectively obtaining a second ratio between each of the first products and the number of recommended items in the item cluster; The sum of each of the second ratios is used as a clustering indicator of the item cluster.
11. The method according to claim 9 or 10, characterized in that: The step of determining the attenuated average clustering index based on the first difference between the current moment and the start moment of sample processing and the average clustering index comprises: Get the preconfigured period decay ratio, initial filtering index, and number of cycles for sample processing; Obtaining a third ratio between the average clustering index and the initial filtering index; Using the ratio between the first difference and the number of cycles as an exponent and the period decay ratio as a base to form a time decay parameter; The product of the third ratio and the time decay parameter is used as the decayed average clustering indicator.
12. The method according to any one of claims 1 to 11, characterized in that: After screening out a plurality of true strong negative samples from the plurality of strong negative samples based on the similarity index between the migration interaction feature and each of the recommended items in the candidate recommended item set, the method further comprises: Acquire a training sample set, wherein the training sample set includes: sample interaction features of sample objects, multiple sample recommendation items as positive samples, and multiple sample recommendation items as negative samples, wherein the negative samples include a preconfigured number of real strong negative samples, the sample label value of the negative samples is 0, and the sample label value of the positive samples is 1; Based on the training sample set, the initialized cross-domain recommendation model is called to predict the recommendation results, and the recommendation results corresponding to each of the sample recommendation items are obtained; Determining the loss function of the cross-domain recommendation model according to the difference between the recommendation result corresponding to each of the sample recommendation items and the sample label value; The parameters of the initialized cross-domain recommendation model are updated based on the loss function to obtain a trained cross-domain recommendation model.
13. The method according to any one of claims 1 to 12, characterized in that: Determining the loss function of the cross-domain recommendation model according to the difference between the recommendation result corresponding to each of the sample recommendation items and the sample label value includes: The following processing is performed for each of the sample recommendation items: Multiplying the transposed matrix of the interactive feature matrix of the sample object and the matrix of the recommended item features of each of the sample recommended items to obtain the predicted probability of the sample recommended items; Obtaining a second product of the logarithm of the predicted probability and the sample label value of the sample recommendation item; Obtain a second difference between 1 and the sample label value, and obtain a logarithm of a third difference between 1 and the predicted probability; multiplying the logarithm of the second difference and the logarithm of the third difference to obtain a third product; The sum of the second product and the third product is used as a sub-loss of the sample recommendation item; Each of the sub-losses is added together to obtain the loss function of the cross-domain recommendation model.
14. A sample processing device for a recommendation model, characterized in that: The device comprises: A sample acquisition module, configured to acquire a plurality of recommended items of a target domain, wherein the recommended items are used to recommend to a sample object; a sample acquisition module configured to fuse a first interaction feature and a second interaction feature of a sample object to obtain a fused interaction feature of the sample object, wherein the first interaction feature is an interaction feature of the sample object in a source domain, and the second interaction feature is an interaction feature of the sample object in a target domain; a sample filtering module, configured to determine a similarity index between the fused interaction feature and each of the recommended items, filter out a plurality of strong negative samples from the plurality of recommended items based on the similarity index, and combine the plurality of recommended items obtained by the filter into a candidate recommended item set; The sample acquisition module is configured to acquire a third interaction feature and a fourth interaction feature of the sample object, wherein the third interaction feature is an interaction feature of a time-sensitive interaction behavior of the sample object in the source domain, and the fourth interaction feature is a cluster center of the second interaction features of a plurality of the sample objects in the target domain; The sample acquisition module is configured to fuse the third interaction feature and the fourth interaction feature of the sample object to obtain a migration interaction feature of the sample object; The sample filtering module is configured to filter out a plurality of real strong negative samples from the plurality of strong negative samples based on a similarity index between the migration interaction feature and each of the recommended items in the candidate recommended item set, wherein the plurality of real strong negative samples are used to train the cross-domain recommendation model.
15. An electronic device, characterized in that: The electronic device comprises: A memory for storing computer executable instructions; A processor, configured to implement the sample processing method of the recommendation model according to any one of claims 1 to 13 when executing the computer executable instructions or computer programs stored in the memory.
16. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that: When the computer executable instructions or computer program are executed by a processor, the sample processing method of the recommendation model according to any one of claims 1 to 13 is implemented.
17. A computer program product comprising computer executable instructions or a computer program, characterized in that When the computer executable instructions or computer program are executed by a processor, the sample processing method of the recommendation model according to any one of claims 1 to 13 is implemented.
Citation Information
Patent Citations
Cross user-based cross-domain recommendation method
CN106951547A
A cross-domain recommendation method and apparatus based on user behavior sequence characteristics
CN109544306A
Recommendation method and device based on artificial intelligence, electronic equipment and storage medium
CN111291266A
Cross-domain recommendation model sample processing
US20260003937A1
