Sample processing method and device of cross-domain recommendation model, equipment and storage medium
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT TECHNOLOGY (SHENZHEN) CO LTD
- Filing Date
- 2023-06-12
- Publication Date
- 2026-08-07
AI Technical Summary
根据样本对象在不同域之间的融合交互特征对多个推荐项目进行初筛,得到强负样本组合成的候选推荐项目集合,根据样本对象在不同域之间迁移的交互特征对候选推荐项目集合进行筛选,得到用于训练跨域推荐模型的真实强负样本。通过多轮筛选,提升了筛选得到的真实强负样本的准确性,筛选得到的真实强负样本用于训练跨域推荐模型,能够提升模型在目标域的信息推荐的准确性。
Smart Images

Figure CN119128508B_ABST
Abstract
Description
Technical Field
[0001] This application relates to artificial intelligence technology, and more particularly to a sample processing method, apparatus, device, and storage medium for a cross-domain recommendation model. Background Technology
[0002] Artificial intelligence (AI) is the theory, methods, 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 that knowledge to obtain optimal results.
[0003] Item recommendation is an important application of artificial intelligence. Many related technologies utilize recommendation models to recommend items to users, but the accuracy of these models depends heavily on their training. Cross-domain recommendation leverages rich object behavior information from the source domain as an aid to the target domain, enabling better recommendations across the target domain and even multiple domains. However, in some related technologies, the samples used to train cross-domain recommendation models often focus solely on the cross-domain relevance of features from randomly selected negative samples from the target domain. This results in cross-domain recommendation models with low accuracy in recommending information within the target domain, thus affecting the overall accuracy of information recommendations.
[0004] There is currently no effective solution to the problem of low accuracy in cross-domain information recommendation models. Summary of the Invention
[0005] This application provides a sample processing method, apparatus, electronic device, computer-readable storage medium, and computer program product for a cross-domain recommendation model, which can improve the accuracy of cross-domain recommendation models in making recommendations in the target domain.
[0006] The technical solution of this application embodiment is implemented as follows: This application provides a sample processing method for a cross-domain recommendation model, the method comprising: Obtain multiple recommended items from the target domain, wherein the recommended items are used to make recommendations to sample objects; The first interaction feature and the second interaction feature of the sample object are fused to obtain the 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. Determine the similarity index between the fusion interaction feature and each of the recommended items, and based on the similarity index, select multiple strong negative samples from the multiple recommended items, and combine the selected multiple recommended items into a candidate recommended item set; 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 with time-sensitive interaction behavior in the source domain, and the fourth interaction feature is the cluster center of the second interaction features of multiple sample objects in the target domain; The third interaction feature and the fourth interaction feature of the sample object are fused to obtain the migration interaction feature of the sample object; Based on the similarity index between the transfer interaction features and each of the recommended items in the candidate recommended item set, multiple real strong negative samples are selected from the multiple strong negative samples, wherein the multiple real strong negative samples are used to train the cross-domain recommendation model.
[0007] This application provides a sample processing apparatus for a cross-domain recommendation model, including: The sample acquisition module is configured to acquire multiple recommended items from a target domain, wherein the recommended items are used to make recommendations to the sample object; The sample acquisition module is configured to fuse the first interaction feature and the second interaction feature of the sample object to obtain the 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. The sample filtering module is configured to determine the similarity index between the fused interaction feature and each of the recommended items, filter out multiple strong negative samples from the multiple recommended items based on the similarity index, and combine the multiple recommended items obtained by filtering into a candidate recommended item set. The sample acquisition module is configured to acquire 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 with time-sensitive interaction behavior in the source domain, and the fourth interaction feature is the cluster center of the second interaction features of multiple 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 the migration interaction feature of the sample object; The sample filtering module is configured to select multiple real strong negative samples from the multiple strong negative samples based on the similarity index between the transfer interaction features and each of the recommended items in the candidate recommended item set, wherein the multiple real strong negative samples are used to train the cross-domain recommendation model.
[0008] This application provides an electronic device, the electronic device comprising: Memory is used to store executable instructions for a computer; The processor, when executing computer-executable instructions stored in the memory, implements the sample processing method of the cross-domain recommendation model provided in the embodiments of this application.
[0009] This application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the sample processing method of the cross-domain recommendation model provided in this application.
[0010] This application provides a computer program product, including a computer program or computer executable instructions, which, when executed by a processor, implements the sample processing method of the cross-domain recommendation model provided in this application.
[0011] The embodiments of this application have the following beneficial effects: Multiple recommendation items are initially screened based on the fusion and interaction characteristics of sample objects across different domains, resulting in a candidate recommendation item set composed of strong negative samples. This candidate set is then further refined based on the interaction characteristics of sample objects migrating between different domains, yielding true strong negative samples for training the cross-domain recommendation model. Through multiple rounds of filtering, the accuracy of the selected true strong negative samples is improved. These samples, used to train the cross-domain recommendation model, enhance the model's accuracy in recommending information within the target domain. Attached Figure Description
[0012] Figure 1 This is a schematic diagram illustrating the application mode of the sample processing method for the cross-domain recommendation model provided in the embodiments of this application; Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application; Figures 3A to 3F This is a flowchart illustrating the sample processing method of the cross-domain recommendation model provided in this application embodiment; Figures 4A to 4C This is a schematic diagram illustrating the relationship between the features and samples provided in the embodiments of this application; Figure 5 This is an optional flowchart illustrating the sample processing method of the cross-domain recommendation model provided in this application embodiment; Figures 6A to 6D This is a table of experimental results provided in the embodiments of this application. Detailed Implementation
[0013] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0014] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is 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.
[0015] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0016] It should be noted that the data collection and processing in this application (e.g., data on the interaction behavior of sample subjects) should strictly comply with the requirements of relevant national laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0017] In this application, the implementation of the data scraping (e.g., recommended items) technical solutions involved, when applied to specific products or technologies according to the above embodiments of this application, the relevant data collection, use and processing processes should comply with the requirements of national laws and regulations, conform to the principles of legality, legitimacy and necessity, not involve obtaining data types prohibited or restricted by laws and regulations, and will not hinder the normal operation of the target website.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.
[0019] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0020] 1) Items: The targets recommended by the recommendation system (such as an advertising system). Examples include items (including physical items such as food and clothing, and virtual items such as games and game props) and information (such as advertisements, news, and music).
[0021] 2) Recommendation system: A recommendation system is a tool that automatically connects users with information. It can help users discover information that interests them in an information overload environment, and can also push information to users who are interested in it.
[0022] 3) Cross-Domain Recommendation (CDR): This recommendation method utilizes recommendation data from the source domain to assist in recommendation processing within the target domain. Assuming business A is the source domain and business B is the target domain, the rich object behavior information from the source domain is used as an aid to the target domain, enabling better recommendations across the target domain or even multiple domains. For example, a community website recommends books to users based on their movie reviews, assuming that users have similar preferences for movies and books.
[0023] 4) Negative Samples (NS): A negative sample is a relative concept. It is a positive sample relative to the target category corresponding to the true value. It is a negative sample relative to all other target categories that do not correspond to the true value.
[0024] 5) Hard Negative Samples (NHS): Negative samples that are difficult to distinguish or classify compared to positive samples. That is, negative samples whose similarity to positive samples is higher than the similarity threshold, which can lead to larger prediction errors.
[0025] 6) Real Hard Negative Samples (RHNS): These are negative samples that are correctly classified, meaning they are predicted to be negative and are actually negative.
[0026] 7) False Hard Negative Samples (FHNS): Also known as false strong negative samples, these are positive samples that are incorrectly labeled as negative samples, i.e., samples that are actually positive but are predicted as negative samples.
[0027] 8) Transfer Learning: This is a term in machine learning that refers to the influence of one type of learning on another, or the impact of acquired experience on the performance of other activities. Transfer learning is widespread in the learning of various knowledge, skills, and social norms.
[0028] 9) Curriculum learning: This is a general training strategy that mimics the learning sequence in human curriculum, gradually increasing the difficulty of training samples as the model is optimized.
[0029] 10) Collaborative Filtering (CF): This method uses the preferences of a group of like-minded people with shared experiences to recommend information that users may be interested in. Individuals respond to the information to a certain extent through a collaborative mechanism (such as rating) and record it to achieve the purpose of filtering, thereby assisting other fields in filtering information.
[0030] 11) Field, specifically refers to a particular scope or area, and can also refer to the scope of academic thought or social activities. In the embodiments of this application, the field is abbreviated as domain, including any type of field capable of information recommendation.
[0031] In related technologies, the samples used to train cross-domain recommendation models only focus on the cross-domain relevance of features of negative samples randomly drawn from the target domain. The cross-domain recommendation models trained in this way do not have high accuracy in recommending information in the target domain, which affects the accuracy of information recommendation.
[0032] This application provides a sample processing method, a sample processing device, an electronic device, a computer-readable storage medium, and a computer program product for a cross-domain recommendation model, which can improve the accuracy of cross-domain recommendation models in making recommendations in the target domain.
[0033] The following describes exemplary applications of the electronic devices provided in the embodiments of this application. These electronic devices can be implemented as laptops, tablets, desktop computers, set-top boxes, mobile devices (e.g., mobile phones, portable music players, personal digital assistants, dedicated messaging devices, portable gaming devices), in-vehicle terminals, virtual reality (VR) devices, augmented reality (AR) devices, and various other types of user terminals, or as servers. The following will describe exemplary applications when the device is implemented as a terminal device or a server.
[0034] refer to Figure 1 , Figure 1 This is a schematic diagram illustrating the application mode of the sample processing method for the cross-domain recommendation model provided in this application embodiment; for example, Figure 1 The system involves server 200, network 300, terminal device 400, and database 500. Terminal device 400 is connected to server 200 through network 300, which can be a wide area network (WAN), a local area network (LAN), or a combination of both.
[0035] In some embodiments, server 200 can be a training server for training a cross-domain recommendation model, and database 500 stores recommendation items from at least two different domains. Domain types include: shopping information from different platforms, multimedia information from 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 is: videos are recommended in the source domain, and music is recommended in the target domain.
[0036] For example, server 200 calls the sample processing method of the cross-domain recommendation model provided in the embodiments of this application to filter 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 server calls the trained cross-domain recommendation model to recommend items in the target domain to the user's terminal device 400. For example, if the source domain is the movie domain and the target domain is the book domain, the server recommends books that the user may like based on the user's preferences in the movie domain.
[0037] This application embodiment can be implemented using database technology. A database, simply put, can be viewed as an electronic filing cabinet storing electronic files, where users can perform operations such as adding, querying, updating, and deleting data. A "database" is a collection of data stored together in a certain way, capable of being shared by multiple users, having minimal redundancy, and being independent of application programs.
[0038] A Database Management System (DBMS) is a computer software system designed to manage databases, generally possessing basic functions such as storage, retrieval, security, and backup. DBMSs can be classified according to the database model they support, such as relational or XML (Extensible Markup Language); or according to the type of computer they support, such as server clusters or mobile devices; or according to the query language used, such as Structured Query Language (SQL) or XQuery; or according to performance priorities, such as maximum scale or maximum operating speed; or other classification methods. Regardless of the classification method used, some DBMSs can cross categories, for example, simultaneously supporting multiple query languages.
[0039] This application embodiment can also be implemented using cloud technology. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology based on cloud computing business models. It can form a resource pool, available on demand, offering flexibility and convenience. Cloud computing technology will become a crucial support. Backend services of technical network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, and driven by demands for search services, social networks, mobile commerce, and open collaboration, every item may eventually possess its own hash-coded identification mark, requiring transmission to a backend system for logical processing. Data at different levels will be processed separately, and various industry data will require robust system support, which can only be achieved through cloud computing.
[0040] In some embodiments, server 200 may be implemented as multiple servers, such as: a sample processing server for acquiring training samples, a model training server for training a cross-domain recommendation model, and an item recommendation server for calling the trained cross-domain recommendation model.
[0041] In some embodiments, the server can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. Electronic devices can be smartphones, tablets, laptops, desktop computers, smart speakers, smartwatches, etc., but are not limited to these. Terminal devices and servers can be directly or indirectly connected via wired or wireless communication, which is not limited in this embodiment of the invention.
[0042] See Figure 2 , Figure 2 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Figure 2 The electronic device shown is Figure 1 The server 200 includes at least one processor 410, memory 450, and at least one network interface 420. The various components of server 200 are coupled together via a bus system 440. It is understood that the bus system 440 is used to implement communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 2 The general labeled all buses as Bus System 440.
[0043] 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. Among them, the general-purpose processor can be a microprocessor or any conventional processor, etc.
[0044] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.
[0045] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.
[0046] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0047] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks; The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc. In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2 A sample processing device 455 for a cross-domain recommendation model stored in memory 450 is shown. This device can be software in the form of programs and plugins, including the following software modules: a sample acquisition module 4551 and a sample filtering module 4552. These modules are logically linked and can therefore be arbitrarily combined or further split according to their implemented functions. Figure 2 For ease of explanation, all the above modules are shown at once, but this should not be interpreted as excluding the implementation of the model training module 4553 in the sample processing device 455 of the cross-domain recommendation model. The functions of each module will be explained below.
[0048] The sample processing method of the cross-domain recommendation model provided in this application will be described by combining the exemplary application and implementation of the terminal provided in the embodiments of this application.
[0049] The following describes the sample processing method for the cross-domain recommendation model provided in this application embodiment. As mentioned above, the electronic device implementing the sample processing method for the cross-domain recommendation model in this application embodiment can be a terminal, a server, or a combination of both. Therefore, the executing entity of each step will not be described again below.
[0050] It should be noted that the image processing examples below are illustrated using a face as an example. Those skilled in the art can apply the sample processing method of the cross-domain recommendation model provided in this application to the processing of image sets including other types of objects based on their understanding of the following text.
[0051] See Figure 3A , Figure 3A This is a flowchart illustrating the sample processing method of the cross-domain recommendation model provided in this application embodiment, which will be combined with... Figure 3A The steps shown are explained.
[0052] In step 301, multiple recommended items for the target domain are obtained.
[0053] Here, recommended items are used to make recommendations to sample objects.
[0054] A domain specifically refers to a particular scope or area, and can also refer to the scope of academic thought or social activities. In this application embodiment, the domain is abbreviated as domain, including any type of domain capable of information recommendation. Recommended items include items (including physical items such as food and clothing, and virtual items such as games and game props, as well as advertisements) and information (such as advertisements, news, and music). The sample object can be a user.
[0055] In some embodiments, reference Figure 3B , Figure 3B This is a flowchart illustrating the sample processing method for the cross-domain recommendation model provided in this application embodiment. Before step 302, the following steps are performed: Figure 3B Steps 3011 to 3014 are explained in detail below.
[0056] In step 3011, the source domain items corresponding to each interactive behavior performed by the sample object in the source domain are obtained, and feature extraction is performed on each source domain item to obtain source domain item features.
[0057] For example, interactive behaviors include clicking, browsing, sharing, commenting, and purchasing items. Features of each source domain item interacted with by the user can be extracted using convolutional neural networks or sequence encoders to obtain source domain item features. Characterize the features of the i-th source domain item, where S refers to the source domain.
[0058] In step 3012, each source domain item feature is combined into a first interaction feature in sequence according to the order in which each interaction behavior in the source domain is executed.
[0059] For example, the execution time of each interaction is obtained, and the features of each source domain item are combined into a sequence according to the chronological order to obtain the first interaction feature in sequence form. p represents the number of interactive behaviors.
[0060] In step 3013, the target domain items corresponding to each interactive behavior performed by the sample object in the target domain are obtained, and feature extraction is performed on each target domain item to obtain the target domain item features.
[0061] For example, similar to the source domain, the feature extraction process for the target domain will not be elaborated here. Characterize the features of the j-th target domain item, where T refers to the target domain.
[0062] In step 3014, each target domain item feature is combined into a second interactive feature in sequence according to the order in which each interactive behavior in the target domain is executed.
[0063] For example, the execution time of each interactive action is obtained, and the features of each target domain item are combined into a sequence according to the chronological order to obtain the second interactive feature in sequence form. q is the number of interactive behaviors in the target domain.
[0064] In this embodiment, by obtaining the item features corresponding to the object's interactive behavior as the object's interactive features, and by representing the interactive features through item features, the accuracy of obtaining recommended items based on interactive features can be improved. Furthermore, compared to converting object information into object features, this method saves the computational resources required to obtain the similarity between interactive features and item features.
[0065] Continue to refer to Figure 3A In step 302, the first interaction feature and the second interaction feature of the sample object are fused to obtain the fused interaction feature of the sample object.
[0066] For example, 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.
[0067] In some embodiments, the fused interaction features include: prior interaction features of the sample object in the target domain, and comprehensive interaction features of the sample object with respect to the source and target domains; the comprehensive interaction features are used to characterize the user's interaction behavior in the target and source domains. Prior interaction features refer to the interaction features of behaviors that the user may perform.
[0068] refer to Figure 3C , Figure 3C This is a flowchart illustrating the sample processing method for the cross-domain recommendation model provided in this application embodiment. Step 302 can be achieved through... Figure 3C Steps 3021 to 3024 are implemented, and the details are explained below.
[0069] In step 3021, feature prediction is performed based on the features of each source domain item in the first interactive features in sequence form to obtain the first predicted features.
[0070] Here, the first predicted feature is used to characterize the prior interaction behavior of the sample object in the source domain.
[0071] Example, with target domain sequence For example, the source domain sequence can be extracted in the same way, and the embodiments of this application will not be described in detail. Constructing the input matrix ,in It is the size of the embedded feature. This represents learnable item index embedding features. This represents the location embedding feature.
[0072] Call the sequence encoder (SASRec sequence recommendation algorithm) to process the input matrix Linear projection as a query command ,key Sum And these three factors are substituted into the attention calculation method, which is defined by the following formula (1):
[0073] in, = , = , = , , , Representing different linear mapping layers, this embodiment of the application also obtains the implicit behavior matrix of the target domain through a point-wise feed-forward network. The point-based feedforward network consists of two fully connected layers, with a ReLU activation function between them. Implicit behavior matrix. The acquisition process is represented by the following formula (2):
[0074] in, , Represents the weight matrix. , The bias vector. The implicit behavior matrix of the user in the source domain. Similarly, it refers to the user's behavioral interaction sequence in the source domain. The implicit behavior matrix of the user in the source domain can be obtained through the same principle as formula (2). .
[0075] Based on the principles of formulas (1) and (2) above, the prior behavior matrix in the source domain is obtained. Source domain-based behavioral interaction sequences The features corresponding to the last interaction behavior in the process, and the sequence of interaction behaviors. The relationship between other features and the last feature in the prediction is the first predictive feature that indicates the user might perform an interaction after the last interaction.
[0076] In step 3022, feature prediction is performed based on the feature of each target domain item in the second interactive feature in sequence form to obtain the second predicted feature.
[0077] Here, the second predictive feature is used to characterize the prior interaction behavior of the sample object in the target domain.
[0078] Based on the principles of formulas (1) and (2) above, the prior behavior matrix in the target domain is obtained. Behavioral interaction sequences based on the target domain The features corresponding to the last interaction behavior in the process, and the sequence of interaction behaviors. The relationship between other features and the last feature is used to predict the second predictive feature of the user's likely interaction behavior after the last interaction behavior.
[0079] In step 3023, a modified linear function is called to activate the first and second predicted features to obtain the prior interaction features of the sample object in the target domain.
[0080] Example, modified linear function This can be achieved using a two-layer fully connected network activated by LeakyReLU, which incorporates prior interaction features of the user in the target domain. Obtained through the following formula (3):
[0081] in, Indicates user The prior behavior embedding feature (first prediction feature) of the last behavior in the behavior sequence of the source domain. It is the prior behavior embedding feature (second prediction feature) of the last behavior in the behavior sequence of the target domain. This represents a two-layer fully connected network activated by LeakyReLU, also known as the modified linear function mentioned above.
[0082] In step 3024, the modified linear function is called to activate the following parameters to obtain the comprehensive interaction features of the sample object for the source and target domains: the last source domain item feature in the first interaction feature in sequence form, and the last target domain item feature in the second interaction feature in sequence form.
[0083] For example, the last source domain item feature in the first interaction feature sequence is the feature representing the interaction behavior most recent to the current time in the source domain, and the last target domain item feature in the second interaction feature sequence is the feature representing the interaction behavior most recent to the current time in the target domain. Similar to the principle of step 3021, the features of the interaction behavior are represented as a behavior matrix. and Based on the latest interaction features in the behavior sequences of the source and target domains and Invoking the modified linear function to generate comprehensive interactive features .
[0084] Continue to refer to Figure 3A In step 303, the similarity index between the fused interaction features and each recommended item is determined.
[0085] 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 recommendation item features corresponding to each recommendation item; obtaining a second similarity index between the comprehensive interaction features of the sample object in the source domain and the target domain and the recommendation item features corresponding to each recommendation item.
[0086] For example, the prior interaction features of the sample object in the target domain are multiplied by the features of each recommended item to obtain the first similarity index for each recommended item. These first similarity indices are then combined into a sequence. .in, It 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 is calculated by multiplying the comprehensive interaction features of the sample objects by the features of each recommended item, resulting in a second similarity index for each recommended item.
[0087] In some embodiments, the similarity metric can also be the cosine similarity between features in vector form.
[0088] In step 304, multiple strong negative samples are selected from multiple recommended items based on the similarity index, and the selected multiple recommended items are combined into a candidate recommended item set.
[0089] For example, the filtering methods include, but are not limited to, sorting similarity metrics and selecting at least a portion of the samples in descending order as strong negative samples.
[0090] In some embodiments, reference Figure 3D , Figure 3D This is a flowchart illustrating the sample processing method for the cross-domain recommendation model provided in this application embodiment. Step 304 can be achieved through... Figure 3D Steps 3041 to 3044 are implemented, and the details are explained below.
[0091] In step 3041, each recommended item is sorted in descending order according to the first similarity index, and at least a portion of the recommended items at the head of the descending sort result are combined into a first candidate set.
[0092] For example, a preset number of recommended items at the head of the descending sort results are uniformly sampled, and the sampled recommended items are combined into a first candidate set.
[0093] In step 3042, the positive sample features of the positive sample corresponding to the sample object are obtained, and the third similarity index between the positive sample features and the recommended item features of each recommended item in the first candidate set is obtained.
[0094] For example, the positive sample features of positive samples are pre-configured, and the third similarity index of each recommended item can be obtained by taking the product between the positive sample features and the recommended item features of the recommended item, and using the product as the third similarity index.
[0095] In step 3043, recommended items with a third similarity index greater than the first similarity threshold are removed from the first candidate set to obtain the second candidate set.
[0096] For example, the first similarity threshold can be pre-configured or dynamically changed based on the difference between the current time of sample processing and the start time.
[0097] In some embodiments, reference Figure 3F , Figure 3F This is a flowchart illustrating the sample processing method for the cross-domain recommendation model provided in this application embodiment. After step 301, the following steps are executed: Figure 3F Steps 3081 to 3085 are used to obtain the similarity threshold.
[0098] In step 3081, the recommended project features of multiple recommended projects, the project clusters to which they belong, and the cluster center project features corresponding to each project cluster are obtained.
[0099] For example, the features of recommended items in multiple recommended items Project clustering is generated using the K-means algorithm. and the corresponding cluster centers ( (This is the number of clusters in the predefined project clusters), where, Is the index as Project Cluster The characteristics of the cluster center project.
[0100] In step 3082, based on the recommended project characteristics of each recommended project included in each project cluster and the cluster center project characteristics, the clustering index corresponding to each project cluster is determined.
[0101] For example, for each person who wants to buy a car, the clustering index corresponding to the project cluster is determined by weighted summation of the products between the features of each recommended project in the project cluster and the features of the cluster center project.
[0102] Step 3082 can be achieved by performing the following processing for each item cluster: obtaining the transpose of each recommended item feature in the item cluster. Characteristics of Cluster Center Projects The first product between Obtain each first product separately. The second ratio between the number of recommended projects in the project cluster and the number of recommended projects in the project cluster; the sum of each second ratio is used as the clustering index of the project cluster. Step 3082 can be represented by the following formula (4):
[0103] in, It is the clustering index of project cluster i.
[0104] In step 3083, the sum of the ratios between the following parameters for each project cluster is used as the average clustering index for multiple recommended projects: clustering index of project cluster, number of clusters of project cluster.
[0105] For example, the ratio between the clustering index of an item cluster and the number of clusters of an item cluster is represented as follows: Then the average clustering index .
[0106] In step 3084, the decaying average clustering index is determined based on the first difference between the current time and the start time of sample processing and the average clustering index.
[0107] For example, step 3084 can be achieved by obtaining the pre-configured period decay ratio. Initial filtering metrics Number of sample processing cycles Obtain the average clustering index Compared with the initial filtering metrics The third ratio between Assume the current time is The starting time is The first difference With the number of cycles The ratio between them is used as an index Using the period decay ratio as the base To form time decay parameters The product of the third ratio and the time decay parameter is used as the average clustering index of decay. .
[0108] In step 3085, the smaller value between the average clustering index and the decaying average clustering index is used as the first similarity threshold.
[0109] For example, the average clustering index and the decaying average clustering index are compared, and the smaller value is used as the first similarity threshold.
[0110] In some embodiments, the start time is set to a future time from the current time, in which case the first similarity threshold can be infinitely large. Steps 3081 to 3085 are also applicable to obtaining the second similarity threshold.
[0111] Continue to refer to 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 some of the recommended items at the head of the descending sort result are combined into a candidate recommended item set.
[0112] For example, the second similarity metric is the product of the overall interaction features and the features of each recommended item. For instance, the second similarity metric for item i in the target domain can be obtained by combining the overall interaction features... Project characteristics of item i in the target domain Multiplying these results in the second similarity index for item i in the target domain.
[0113] In step 305, the third and fourth interaction features of the sample object are obtained.
[0114] For example, the third interaction feature is the interaction feature of the sample object in the source domain that has time-sensitive interaction behavior, and the fourth interaction feature is the cluster center of the second interaction features of multiple sample objects in the target domain. In some embodiments, step 305 can be implemented as follows: the last source domain item feature in the sequence of first interaction features is used 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; the third interaction feature can be characterized as Where u refers to the user and S is the source domain; obtain the first ratio between the following parameters corresponding to multiple sample objects respectively: the second predicted 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.
[0115] The number of objects in an object cluster can be obtained using the len() function. An object cluster is also known as a user cluster, and is represented as a user cluster. The second predicted feature of the sample object in the target domain is also the prior behavior matrix of the user in the target domain. The first ratio can be characterized as Then, the fourth interaction feature is obtained by summing each of the first ratios. The formula is as follows (5):
[0116] The `len()` function is used to quickly obtain the number of elements in a sequence (such as a list, tuple, or str) and can be used to check the length of strings, lists, tuples, dictionaries, or sets. The fourth interaction feature is used to characterize the centroid features of each user cluster. Indicates user The index of the user cluster to which it belongs.
[0117] In some embodiments, the migration interaction features include: prior source domain migration interaction features of the sample object and source domain migration interaction features of the sample object; the source domain migration interaction features are used to characterize the changes in the interaction behavior of the object during the migration from the source domain to the target domain, and the prior source domain migration interaction features are used to characterize the changes in the interaction behavior of the object that has not yet been executed during the migration from the source domain to the target domain.
[0118] In step 306, the third and fourth interaction features of the sample object are fused to obtain the migration interaction features of the sample object; Step 306 can be achieved as follows: Activate the first predicted feature and the fourth interaction feature of the sample object using a modified linear function to obtain the prior source domain transfer interaction features of the sample object. Activate the third and fourth interaction features using a modified linear function to obtain the source domain transfer interaction features of the sample object.
[0119] For example, based on the first predicted feature Fourth interaction feature The prior source domain transfer interaction features are obtained by calling the modified linear function. Based on the third interaction feature and the fourth interaction feature The source domain migration interaction features are obtained by calling the modified linear function. .
[0120] In step 307, based on the similarity index between the transfer interaction features and each recommended item in the candidate recommended item set, multiple real strong negative samples are selected from multiple strong negative samples.
[0121] For example, multiple real strong negative samples are used to train a cross-domain recommendation model. Selection methods include, but are not limited to, ranking by similarity metrics and selecting at least a portion of those in descending order as real strong negative samples.
[0122] In some embodiments, reference Figure 3E , Figure 3E This is a flowchart illustrating the sample processing method for the cross-domain recommendation model provided in this application embodiment. Step 307 can be achieved through... Figure 3E Steps 3071 to 3076 are implemented, and the details are explained below.
[0123] In step 3071, the prior source domain migration interaction features of the sample objects and the fourth similarity index between the features of each recommended item are obtained.
[0124] For example, the following processing is performed for each recommended item: the prior source domain transfer interaction features and the recommended item features are multiplied together to obtain the fourth similarity index of the recommended items. The fourth similarity index is a matrix product.
[0125] 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 some of the strong negative samples at the head of the descending sort result are combined into a third candidate set.
[0126] For example, a predetermined number of strong negative samples at the head of the descending sort result are uniformly sampled, and the sampled strong negative samples are combined into a third candidate set.
[0127] In step 3073, the positive sample features of the positive sample corresponding to the sample object are obtained, and the third similarity index between the positive sample features and the recommended item features of each recommended item in the third candidate set is obtained.
[0128] For example, the principle of step 3073 is the same as that of step 3043, and will not be repeated here.
[0129] In step 3074, recommended items with a third similarity index greater than the second similarity threshold are removed from the third candidate set to obtain the fourth candidate set.
[0130] For example, the method for obtaining the second similarity threshold can refer to step 3044 above, and will not be repeated here. In the field of sample augmentation, the similarity between fake strong negative samples and positive samples is higher than that between real strong negative samples. The higher the similarity between a strong negative sample and a positive sample, the higher the probability that it belongs to a fake strong negative sample. By comparing the similarity index with the similarity threshold, samples with a similarity index greater than the similarity threshold are deleted, thereby reducing the number of fake strong negative samples in the remaining samples and improving the accuracy of obtaining real strong negative samples.
[0131] In step 3075, the sixth similarity index is obtained between the source domain migration interaction features of the sample objects and the features of each recommended item.
[0132] For example, the following processing is performed for each recommended item: the product between the source domain migration interaction features of the sample object and the features of the recommended item is obtained, and the product is used as the sixth similarity index.
[0133] 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 some of the recommended items at the head of the descending sort result are taken as real strong negative samples.
[0134] For example, a preset number of recommended items at the head of the descending sort results are uniformly sampled, and the sampled recommended items are used as true strong negative samples.
[0135] In this embodiment, through multiple rounds of screening, the number of false strong negative samples included in the final real strong negative samples is reduced. As a result, a cross-domain recommendation model can be trained based on real strong negative samples, thereby improving the accuracy of the model in making recommendations in the target domain.
[0136] In some embodiments, after step 307, the cross-domain recommendation model is trained as follows: A training sample set is obtained, comprising: sample interaction features of sample objects, multiple sample recommendation items as positive samples, and multiple sample recommendation items as negative samples. The negative samples include a pre-configured number of real strong negative samples, with negative samples having a sample label value of 0 and positive samples having a sample label value of 1. Based on the training sample set, the initialized cross-domain recommendation model is invoked to predict recommendation results, obtaining the recommendation results corresponding to each sample recommendation item. The loss function of the cross-domain recommendation model is determined based on the difference between the recommendation results corresponding to each sample recommendation item and the sample label value. The parameters of the initialized cross-domain recommendation model are updated based on the loss function to obtain the trained cross-domain recommendation model.
[0137] For example, the loss function can be obtained by performing the following processing for each sample item recommendation: transpose the interaction feature matrix of the sample object. A matrix of recommended item features for each sample item Multiply by each other to obtain the predicted probability of the recommended items in the sample. , It is the interaction feature of the target domain; obtain the logarithm of the predicted probability. Sample label values of the recommended items The second product, represented as ; 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. Multiplying the logarithms of the second and third differences yields the third product, which is represented as... The sum of the second and third products is used as the sub-loss of the sample recommended items, and the sub-loss is characterized as follows: The loss function of the cross-domain recommendation model is obtained by summing the sub-losses. The loss function L is represented by the following formula (9):
[0138] in, It is the training set for the target domain. and These represent positive samples and their corresponding negative samples, respectively. This represents the predicted probability for (u,d).
[0139] In this embodiment, multiple recommendation items are initially screened based on the fusion and interaction features of sample objects across different domains to obtain a candidate recommendation item set composed of strong negative samples. The candidate recommendation item set is then further filtered based on the interaction features of sample objects migrating between different domains to obtain true strong negative samples for training the cross-domain recommendation model. Through multiple rounds of filtering, the accuracy of the obtained true strong negative samples is improved. Using these filtered true strong negative samples to train the cross-domain recommendation model enhances the accuracy of information recommendation in the target domain.
[0140] The following will illustrate an exemplary application of the sample processing method of the cross-domain recommendation model of this application in a real-world application scenario.
[0141] Existing technologies can be broadly categorized into three types of research: cross-domain recommendation, cross-domain sequential recommendation, and negative sampling methods in the recommendation field. Cross-domain recommendation (CDR) is a representative method for alleviating data sparsity in the recommendation field. It helps improve the model's performance in the target domain by overlapping user auxiliary behaviors from other domains. Classic cross-domain recommendation algorithms generally employ 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, which places greater emphasis on the sequence of user multi-domain temporal behaviors compared to traditional cross-domain recommendation.
[0142] Existing research mainly focuses on cross-domain recommendation and negative sampling methods for the recommendation domain. Most existing cross-domain recommendation methods only consider the cross-domain relevance of randomly sampled negative samples at the feature level, ignoring their cross-domain differences at the sample level. Over-optimizing these randomly sampled negative samples at the feature level can, to some extent, ignore user source domain preferences, potentially leading to suboptimal performance. Negative sampling methods for recommendation are generally categorized into static and strong negative sampling strategies based on whether their proposed sampling probabilities are fixed. Static negative sampling strategies typically perform negative sampling according to a fixed distribution probability, making it impossible to dynamically capture changes in user and item preferences during model training. Strong negative sampling strategies are mostly designed for collaborative filtering tasks and may not be directly transferable to cross-domain recommendation tasks. Furthermore, these methods avoid spurious strong negative samples by selecting parameters, which is unstable and uninterpretable across different datasets, further challenging the effective exploration and utilization of strong negative samples.
[0143] This application proposes an effective, simple, and universally applicable method for sampling Real Strong Negative Samples (RealHNS) for cross-domain recommendation (CDR) tasks. It proposes a general real negative sample and a cross-domain real strong negative sample sampler to filter out false strong negative samples (FHNS) from all strong negative samples (HNS) and select the real strong negative samples (RHNS). This can be achieved by sequentially performing coarse-grained and fine-grained RHNS selectors when filtering the two types of samples, and by using a dynamic filter for items (recommended content) to filter out false strong negative samples from the candidate set. For specific cross-domain settings, this application further designs a new cross-domain real strong negative sample filtering method to mitigate the potential negative information transfer during cross-domain recommendation information migration, and uses a user-specific dynamic filter to explore false strong negative samples for different users under specific cross-domain settings, thereby improving the performance of existing cross-domain recommendation models.
[0144] The sample processing method of the cross-domain recommendation model provided in this application embodiment is significantly different from related technologies: (1) Coarse-grained and fine-grained strong negative sample selectors are designed in the general real strong negative sample selector to effectively find real strong negative samples, and a false strong negative sample filter for the item (recommended content) is used to dynamically filter out strong negative samples that are too similar to positive samples.
[0145] (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 fake strong negative sample filter is designed for users, which, together with coarse-grained and fine-grained strong negative sample selectors, improves the screening and optimization of cross-domain strong negative samples from the user's perspective.
[0146] (3) The course learning framework balances the relative proportions of random negative samples, real strong negative samples and fake strong negative samples in the training samples during the model training process.
[0147] (4) The sample processing method of the cross-domain recommendation model provided in this application is independent of the model, easy to deploy, and can be applied to different negative sampling methods and can bring stable improvement.
[0148] To facilitate understanding of the sample processing method of the cross-domain recommendation model provided in the embodiments of this application, the relationship between objects and samples under cross-domain recommendation is explained.
[0149] refer to Figure 4A , Figure 4A This is a schematic diagram illustrating the relationship between features and samples provided in the embodiments of this application; it also explains the general false strong negative samples and cross-domain false strong negative samples under the cross-domain recommendation settings, where stars and circles represent user and item features, respectively. Figure 4A Characterization shows that general spurious strong negative samples are close to positive samples.
[0150] refer to Figure 4B , Figure 4B This is a schematic diagram illustrating the relationship between features and samples provided in the embodiments of this application; users who deviate from mainstream cross-domain migration (e.g., users have no similarity in their preferences for different domains, such as: it is difficult to accurately recommend the topics of books that users like through movies) are considered outliers, and they will be erroneously influenced by non-outliers, as shown by the black arrows. The star shape represented by outliers is located outside the area where non-outliers are located.
[0151] refer to Figure 4C , Figure 4C This is a schematic diagram illustrating the relationship between the features and samples provided in the embodiments of this application; Figure 4C It can be seen that cross-domain spurious strong negative samples are related to non-outliers in cross-domain recommendation.
[0152] For example, based on the above Figures 4A to 4C In the field of cross-domain recommendation, this application analyzes the relationship between features and synchronization, proposing three hypotheses: Hypothesis 1: Items (recommended content) that are similar to positive samples are more likely to become spurious strong negative samples in cross-domain recommendation compared to other samples. Hypothesis 2: Samples that have strong similarity to the user's source domain features indicate the user's migration preferences and are more likely to become spurious strong negative samples from non-outliers. Hypothesis 3: Introducing all strong negative samples at the beginning of the training process may lead to computational waste and suboptimal performance.
[0153] The sample processing method proposed in this application employs a general true strong negative sample selector and a cross-domain true strong negative sample selector to improve cross-domain recommendation during the sampling process. Specifically, given the behavioral sequence features of the source domain and the target domain, the general true strong negative sample selector samples general true strong negative samples to obtain a general candidate item set, and a false strong negative sample filter for each item eliminates possible false strong negative samples in the general candidate item set.
[0154] To further mitigate the inherent negative transfer in cross-domain recommendation (negative transfer is a hindering effect of one type of learning on another, manifested in the mutual influence between learning new and old knowledge and mastering methods sequentially), a cross-domain true strong negative sample selector is set up. This selector dynamically distinguishes outliers in the entire user set from false strong negative samples in the cross-domain candidate item set through filters targeting users and items.
[0155] The sampling methods for the two domains (source domain and target domain) mentioned above are symmetric and model-independent, which makes it easy to transfer the sample processing method of the cross-domain recommendation model provided in this application to collaborative filtering (CF) and sequential recommendation (SR) tasks.
[0156] For example, the sample processing method of the cross-domain recommendation model provided in this application will be explained and described below with reference to the accompanying drawings. (Reference) Figure 5 , Figure 5 This is an optional flowchart illustrating a sample processing method for a cross-domain recommendation model provided in this application embodiment. It uses a server as the execution entity, combined with... Figure 5 The steps in the document will be explained.
[0157] In step 501, a sequence encoder is invoked to extract features of the user's behavior in the source and target domains to obtain behavioral sequence features.
[0158] In the source domain and target domain Define source domain behavior sequence and target domain behavior sequence ,in , These represent the number of actions performed by the user in the source domain and the target domain, respectively. and These represent behavior embeddings. Given a sequence of behaviors... and The real strong negative sample framework attempts to recommend the user's next interaction item in the target domain. The source domain behavior sequence is the first interaction feature mentioned above, and the target domain behavior sequence is the second interaction feature mentioned above.
[0159] This application embodiment uses the sequence recommendation algorithm SASRec as the sequence encoder. The target domain sequence... For example, the source domain sequence can be extracted in the same way, and the embodiments of this application will not be described in detail. Constructing the input matrix ,in It is the size of the embedded feature. This represents learnable item index embedding features. This represents the location embedding feature.
[0160] Call the sequence encoder (sequence recommendation algorithm SASRec) to process the input matrix Linear projection as a query command ,key Sum And these three factors are substituted into the attention calculation method, which is defined by the following formula (1):
[0161] in, = , = , = , , , Representing different linear mapping layers, this embodiment of the application also obtains the implicit behavior matrix of the target domain through a point-wise feed-forward network. The point-based feedforward network consists of two fully connected layers, with a ReLU activation function between them. Implicit behavior matrix. The acquisition process is represented by the following formula (2):
[0162] in, , Represents the weight matrix. , The bias vector. The implicit behavior matrix of the user in the source domain. Similarly, it refers to the user's behavioral interaction sequence in the source domain. The implicit behavior matrix of the user in the source domain can be obtained through the same principle as formula (2). .
[0163] The primary task in addressing the false negative problem is to distinguish between false strong negative samples and true strong negative samples from the entire item set based on the user's historical interaction information. This application proposes a general true strong negative sample selector to select general true strong negative samples in cross-domain recommendation. Specifically, this application designs a process of obtaining a candidate item set related to the user's general preferences through coarse-grained true strong negative sample selection, and removing items that are too similar to positive samples from the candidate item set through fine-grained true strong negative sample selection. The parameter used as the filtering index in the fine-grained screening process is dynamic (related to Assumption 1 above), which is specifically explained in steps 502 and 503 below.
[0164] In step 502, strong negative samples related to the user's general preferences are filtered from the entire item set based on multiple behavioral sequence features to obtain a candidate item set.
[0165] In related techniques, strong negative sampling typically involves uniformly sampling a fixed set of candidate items and then dynamically selecting the item with the highest score calculated by the recommendation model in the current state from a randomly selected set of candidate items as the strong negative sample. However, this type of method relies excessively on an appropriate number of candidate items; too few candidate items lead to randomness and unstable quality of the strong negative sample, while too many candidate items significantly increase the rigidity of the selected strong negative sample, resulting in optimization bias in the model. Furthermore, these methods exhibit significant parameter variations across different datasets and fail to achieve a consistent improvement over static negative sampling methods in all cases.
[0166] This application embodiment samples project candidates that are relevant to users’ general preferences in cross-domain recommendations by performing a general coarse-grained selection on the entire project set.
[0167] For example, the prior behavior matrices of the source and target domains are computed at the beginning of each epoch (preset period) by a sequence encoder. and Based on the assumption that "the last action in an object's sequence of actions contains his / her overall preferences," user data is generated. Prior interaction features, and the prior interaction features of the end user in the target domain. Obtained through the following formula (3):
[0168] in, Indicates user The prior behavior embedding feature (first prediction feature) of the last behavior in the behavior sequence of the source domain. It is the prior behavior embedding feature (second prediction feature) of the last behavior in the behavior sequence of the target domain. This represents a two-layer fully connected network activated by LeakyReLU, also known as the modified linear function mentioned above.
[0169] For users Prior final interaction features and learnable project embedding features The first similarity index is calculated and sorted from largest to smallest. The calculation method is to obtain the product between the item features in the learnable item embedding features and the user's prior interaction features in the target domain. The result, represented as a sequence, is as follows. Each element in the calculation result is the first similarity index corresponding to each item. A fixed number of items are uniformly sampled from the top range of items with larger first similarity indices to construct a general candidate item set. .
[0170] This application embodiment can sample a general candidate item set based on prior knowledge of user general preferences, alleviating the problem of excessive randomness in the selection of candidate item sets in existing methods. It is worth noting that this application embodiment only performs the above operation at the beginning of each period, thus not introducing excessive computational cost. For online services, a KD-Tree (a tree-like data structure that stores instance points in k-dimensional space for fast retrieval) is sufficient. The time complexity (the number of times a statement is executed in an algorithm is called the statement frequency or time frequency. Time complexity is used to describe the running time of an algorithm).
[0171] In step 503, samples in the candidate item set whose similarity to the positive sample reaches a threshold are removed to obtain a general candidate item set.
[0172] Unlike classic strong negative sampling, which emphasizes that "the higher the score between a user and an item, the more likely it is to be a fake strong negative sample," where the score can be a similarity metric in this application, this application also proposes an additional hypothesis: in cross-domain recommendation, items that are similar to positive samples are more likely to be fake strong negative samples. This hypothesis is quite intuitive; if a user likes an item, such as character A, he / she is likely to also like other similar items, such as characters B and C that belong to the same series as character A.
[0173] Based on the above assumptions, embodiments of this application adaptively filter the candidate item set by selecting fine-grained, true strong negative samples based on unsupervised clustering. Specifically, embodiments of this application focus on item embedding features. The project clusters were generated using the K-means algorithm. and the corresponding cluster centers ( (This refers to the number of clusters in a predefined project cluster), and the average project clustering index is calculated. ,in Indicates that the index is clusters Embedded features of all items Their corresponding cluster centers Similarity metrics between items, clustering metrics for each item cluster It can be defined as the following formula (4):
[0174] Clustering metrics based on each project cluster Calculate the average cluster index Based on average clustering index The proposed filtering metrics for the project can be dynamically set. (The first similarity threshold mentioned above).
[0175] Filtering can be achieved by multiplying the feature matrix of each item by the feature matrix of the positive samples, thus obtaining the result for each item. The similarity metric between the sample and the positive sample (the third similarity metric mentioned above) is used to determine whether the similarity metric is less than the filtering metric. (The first similarity threshold mentioned above) determines whether to include the project. From the general candidate project set Excluded from the list, projects that are less than the filtering criteria are retained in the general candidate project set. In response to items being less than the filtering metric, select from the general candidate item set. Excluded from the list.
[0176] Example, filtering metrics The calculation method is explained in step 506 below.
[0177] This application embodiment applies to the filtered general candidate item set. Each item in the list is ranked according to its corresponding third similarity index, and items with higher rankings in the third similarity index are sampled uniformly.
[0178] Give users Behavior matrices of the source and target domains and Based on the latest interaction features in the behavior sequences of the source and target domains and Generate the final user interaction features This refers to the comprehensive interactive features mentioned above.
[0179] This application's embodiments calculate the final user interaction features. and the filtered general candidate item set The second similarity metric between the embedded features of the projects is used, and then projects are selected from the top-ranked list of projects as general true strong negative samples.
[0180] Referring to the specific concepts in Hypothesis 1, the embodiments of this application assume that items that are closer to positive samples are more likely to be spurious 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 solution tailored to the false negative problem in general strong negative samples.
[0181] This application proposes a cross-domain true strong negative sample selector. It employs a cross-domain coarse-grained true strong negative sample selector to sample the 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. This selector eliminates potential false strong negative samples in cross-domain migration and cross-domain candidate item sets through dynamic filters for users and items, respectively, and further samples cross-domain true strong negative samples in cross-domain recommendation. The following steps 504 and 505 are described in detail.
[0182] In step 504, samples related to user source domain preferences are sampled from the general candidate item set to obtain a cross-domain candidate item set.
[0183] Most of the strong negative sampling methods in related technologies are designed for collaborative filtering tasks and are difficult to directly transfer 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. Consequently, these methods can only avoid false negatives in a single domain, but cannot solve the problem of positive transfer across domains.
[0184] This application's embodiments assume that users who behave consistently 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 associated cross-domain candidate item set.
[0185] Example: Given the prior behavior matrices of the source and target domains. and The embodiments of this application use the user's prior behavior matrix in the source domain. Perform K-means clustering to generate source domain user clusters Subsequently, based on the source domain user cluster and the user's prior behavior matrix in the target domain ( The centroid features of the target domain are calculated using the number of clusters of user clusters in the source domain. Among them, the centroid features of each user cluster This is the fourth interaction feature mentioned above, the centroid feature of each user cluster. The measurement method is as follows (5):
[0186] in, Indicates user Embedded features of prior behaviors in a sequence of behaviors in the target domain. The len() function is used to quickly get the number of elements in a sequence (such as list, tuple, str) and can be used to check the length of strings, lists, tuples, dictionaries, or sets.
[0187] Embedded features of prior behaviors in the behavior sequence of the source domain Center of gravity characteristics In the final space, prior source domain features of the migration are generated. ,in User representation The index of the user cluster to which it belongs.
[0188] Similar to the principle of step 502, it is based on prior transfer source domain features. (Prior source domain transfer interaction features mentioned above) and learnable item embedding features Calculate the cross-domain similarity index (the fourth similarity index mentioned above) and sort the cross-domain similarity indices from largest to smallest. The calculation method involves obtaining project features from the learnable project embedding features and prior transfer source domain features. Product between A fixed number of projects are evenly drawn from the top-ranked range to form a cross-domain project candidate set. .
[0189] Cross-domain project candidate set It consists of items related to the user's source domain preferences, so the embodiments of this application can accurately simulate the user's migration preferences between two domains through fine-grained analysis and processing.
[0190] In step 505, false strong negative samples in the cross-domain migration and cross-domain candidate item set are removed, and real strong negative samples in the cross-domain candidate item set are sampled.
[0191] Cross-domain recommendation aims to improve the performance of the target domain by transferring informative knowledge from the source domain to the target domain. Due to the different domains to which projects belong, user preferences across multiple domains exhibit inherent data biases, making it challenging to achieve unified modeling of user preferences across different domains. The proposed cross-domain true strong negative sample model primarily models the preferences of the mainstream target domain through unsupervised clustering of similar source domain preferences. While it performs well in a general sense, over-optimizing the cross-domain true strong negative sample model can actually exacerbate biases and introduce additional negative information to users whose preferences are consistent across the source and target domains. Figure 1 As shown in the middle section, during cross-domain migration, users clustered into the same cluster in the source domain user interaction feature space exhibit significant distribution differences in the target domain user interaction feature space. This is attributed to different mapping methods for different users. In reality, a large amount of source domain information exists, making some users more susceptible to being dominated by mainstream preference migration patterns during the migration process.
[0192] This application defines outliers as users who exhibit similar preferences in the source domain but show significantly different migration preferences in the target domain compared to the mainstream. This application proposes a dynamic filter for users to include outliers within the optimization scope of cross-domain real strong negative samples. Given a user cluster index... User cluster in this application embodiment Embedded feature matrix of the last action in the prior target domain action sequence of all users. and target domain center features The score list between The following formula (6) is defined:
[0193] Then, the embodiments of this application address the score list. Sort according to predefined weights. Select the lowest score from the score list. A few users are designated as outliers. Cross-domain recommendation models for these outliers are trained based on general real strong negative samples and cross-domain real strong negative samples, while for other users, only the cross-domain recommendation model corresponding to the general real strong negative samples is used.
[0194] Besides the inherent multi-domain preference bias, cross-domain preference modeling also suffers from negative information transfer, meaning that over-reliance on the cross-domain item candidate set may introduce bias in the selection of truly strong negative samples across domains (see Hypothesis 2). To eliminate bias in cross-domain preference modeling, this application's embodiments design a dynamic item-based filter to filter out parts of the cross-domain item candidate set that are too similar to positive samples. The item-based filter is designed based on unsupervised item similarity, and the cross-domain setting does not change the intrinsic relationships between items.
[0195] The general filtering metrics for projects mentioned in step 503 are used to filter the cross-domain project candidate set. This is done by comparing the similarity metrics between projects and positive samples with the project-specific filtering metrics. To evaluate whether to remove a project from the cross-domain project candidate set. .
[0196] Embed features using the nearest behavior in the source domain and the centroid features of the target domain ( express (Index to the source domain user cluster) for source domain characteristics of migration Modeling is performed. Finally, the source domain features of the migration are calculated. and the filtered cross-domain project candidate set The similarity index between the embedded features of the projects is used, and then a fixed number of projects are selected from the top-ranked projects as strong negative samples across domains.
[0197] In step 506, the number of real strong negative samples in the training sample set required to train the cross-domain recommendation model is obtained.
[0198] As shown in Hypothesis 3, including all strong negative samples in the initial stage of training may lead to computational waste, suboptimal performance, and excessively large gradients, which may further hinder the model from converging to the global minimum. Therefore, embodiments of this application utilize the curriculum learning (CL) method to improve the generalization ability and convergence rate of cross-domain recommendation models. Curriculum learning is a general training strategy that mimics the learning sequence in human courses, gradually increasing the difficulty of training samples as the model is optimized.
[0199] This application's embodiments design two curriculum learning (CL) methods: an optimization-based CL method and a filtering-based CL method. The former refers to dynamically adjusting the proportion of true strong negative samples in the NS (Neural Functions), enabling the model to start from a smooth target and more easily discover the global minimum. In this case, the hyperparameters... Controlling the start time in CL It is the number of time intervals in CL. This indicates the number of additional real strong negative samples, referenced from the number of real strong negative samples in the negative samples. Formula (7):
[0200] in, For the current period, This represents the number of negative samples in the NS dataset. The above parameters are the same across all datasets. =5, =2, =1.
[0201] In contrast, the latter's CL task is used to dynamically adjust the scope of the filtering through the item candidate set and the cross-domain item candidate set to mitigate the inclusion of harder NS (potentially spurious strong negative samples) during training. Pre-defined hyperparameters... Initial filter size and These represent the period decay ratios, and the proposed filtering indicators for the project are respectively... It is then defined as formula (8):
[0202] In step 507, a cross-domain recommendation model is trained based on the training sample set.
[0203] This application's embodiments are based on the final user interaction features. and the characteristics of the target project To calculate users With the project The reliability of predictions between And the loss function The following formula (9) is expressed:
[0204] in, It is the training set for the target domain. and These represent positive samples and their corresponding negative samples, respectively. This represents the predicted probability for (u,d).
[0205] This application's embodiments demonstrate a significant performance improvement in cross-domain recommendations between denser and sparser domains (Game->Toy recommends toys based on game samples, Movie->Book recommends books based on movie samples), proving the practical significance of real strong negative samples in cross-domain knowledge transfer. Furthermore, it demonstrates that the general real strong negative samples and cross-domain real strong negative samples proposed in this application achieve consistent and significant performance improvements over existing state-of-the-art (SOTA) negative sampling methods. This application's embodiments can be applied to cross-domain recommendations between platforms with sparse and rich consumer behavior.
[0206] The following explanation, based on experimental results, illustrates the effectiveness of the sample processing method for the cross-domain recommendation model provided in this application. A comprehensive analysis of the effectiveness and universality of the method in this application is conducted through comparison with existing state-of-the-art (SOTA) algorithms. In the performance comparison, three classic evaluation metrics were selected to evaluate the effectiveness of the sample processing method for the cross-domain recommendation model provided in this application, including NDCG@k (N@k), HitRate@k (HR@k), and the area under the ROC curve (AUC), where k is selected from [5, 10, 20, 50]. In this application embodiment, 99 negative samples are randomly selected from each positive sample in the test set, and... Figures 6A to 6D The best results are shown in bold in the table, and the best performance of the baseline algorithm is shown in underline.
[0207] Figure 6A This is a table of experimental results provided in the embodiments of this application; Figure 6A The results of the experiment showcasing recommendations from the gaming sector to the toy sector are presented.
[0208] Figure 6B This is a table of experimental results provided in the embodiments of this application. It shows the experimental results recommended from the toy industry to the game industry.
[0209] Figure 6C This is an experimental results table provided in the embodiments of this application; it shows the experimental results recommended from the fields of film to book.
[0210] Figure 6D This is a table of experimental results provided in this application's embodiments. It displays recommended experimental results from the fields of books to movies.
[0211] The embodiments of this application observed the following conclusions: (1) The embodiments of this application significantly outperform all baseline algorithms on four datasets, 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 embodiments of this application has a greater improvement on smaller k and more sensitive ranking order metrics (NDCG), because the embodiments of this application focus on distinguishing strong negative samples that are more advantageous in the first few positions of the ranking list. This superiority is consistent in four cross-domain settings based on two strong negative sampling methods, indicating that the embodiments of this 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 recommendation. It is worth noting that the embodiments of this application focus on a more challenging and more common sampling environment in real recommendation systems (containing 10 random negative samples and 10 strong negative samples, more strong negative samples will reduce the impact of sampling). Compared with the classic strong negative sampling method, the embodiments of this application, Figures 6A to 6D RealNHS (DNS) The resulting consistency improvement (1%-5%) is sufficient to demonstrate its universality and effectiveness.
[0212] (2) Based on the challenging setting of selecting 20 negative samples in the embodiments of this application, no strong negative sampling baseline algorithm can consistently outperform other baseline algorithms on all datasets (sometimes even performing worse than using only random NS). Most existing strong negative sampling methods (such as DNS) MixGCF relies solely on selecting the most difficult item from a subset of candidate items to mitigate the impact of spurious HNS, leading to an over-reliance on the quality of randomly selected candidate item subsets. Consequently, they perform worse on datasets with large item corpora or sparse object behaviors (such as Game->Toy recommendations and Movie->Book recommendations). The improvements of the embodiments in this application compared to existing strong negative sampling methods demonstrate the importance of the following two points: (1) the item-specific filters proposed in general real strong negative samples can provide unbiased information gradients for recommendation models; (2) explicit cross-domain real strong negative samples can simulate user preference changes across multiple domains and incorporate them into the training process through a curriculum learning framework.
[0213] (3) Comparing the improvements across different datasets, the embodiments of this application perform better in the Game->Toy recommendation and Movie->Book recommendation settings. This reflects that the embodiments of this application can transfer informative knowledge from a dense source domain to a relatively sparse target domain (similar to traditional cross-domain recommendation methods). Moreover, on all datasets, the embodiments of this application outperform MixGCF and DNS. The improvement is also significant, demonstrating that the embodiments of this application are capable of delivering further consistency improvements across different baseline strong negative sampling algorithms. Benefiting from novel cross-domain true strong negative samples in cross-domain recommendation and dynamic filters for users and items, the embodiments of this application significantly outperform other negative sampling methods on all datasets.
[0214] The following description continues to illustrate the exemplary structure of the sample processing device 455 for the cross-domain recommendation model provided in this application embodiment as a software module. In some embodiments, such as... 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 recommendation items in the target domain, wherein the recommendation items are used to recommend to sample objects; the sample acquisition module 4551, configured to fuse the first interaction feature and the second interaction feature of the sample object to obtain the 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; and a sample filtering module 4552, configured to determine the similarity index between the fused interaction feature and each recommendation item, and based on the similarity index, filter out multiple strong negative samples from the multiple recommendation items, and filter out the multiple recommended items. The project portfolio is a set of candidate recommended projects; the sample acquisition module 4551 is configured to acquire 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 with time-sensitive interaction behavior in the source domain, and the fourth interaction feature is the cluster center of the second interaction features 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 transfer interaction feature of the sample object; the sample filtering module 4552 is configured to select multiple real strong negative samples from multiple strong negative samples based on the similarity index between the transfer interaction feature and each recommended project in the candidate recommended project set, wherein the multiple real strong negative samples are used to train the cross-domain recommendation model.
[0215] In some embodiments, the sample acquisition module 4551 is configured to, before fusing the first and second interaction features of the sample object to obtain the fused interaction features of the sample object, acquire source domain items corresponding to each interaction behavior performed by the sample object in the source domain, extract features from each source domain item to obtain source domain item features; combine each source domain item feature into a first interaction feature in sequence according to the order in which each interaction behavior in the source domain is executed; acquire target domain items corresponding to each interaction behavior performed by the sample object in the target domain, extract features from each target domain item to obtain target domain item features; and combine each target domain item feature into a second interaction feature in sequence according to the order in which each interaction behavior in the target domain is executed.
[0216] In some embodiments, the fused interaction features include: prior interaction features of the sample object in the target domain, and comprehensive interaction features of the sample object with respect to the source and target domains; the sample acquisition module 4551 is configured to perform feature prediction based on each source domain item feature in the first interaction features in sequence form to obtain a first predicted feature, wherein the first predicted 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 features in sequence form to obtain a second predicted feature, wherein the second predicted feature is used to characterize the prior interaction behavior of the sample object in the target domain; activate the first predicted feature and the second predicted feature by calling a modified linear function to obtain the prior interaction features of the sample object in the target domain; activate the following parameters by calling a modified linear function to obtain the comprehensive interaction features of the sample object with respect to the source and target domains: the last source domain item feature in the first interaction features in sequence form, and the last target domain item feature in the second interaction features in sequence form.
[0217] 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 recommendation item features corresponding to each recommendation item; and to obtain a second similarity index between the comprehensive interaction features of the sample object in the source domain and the target domain and the recommendation item features corresponding to each recommendation item.
[0218] In some embodiments, the sample filtering module 4552 is configured to: sort each recommended item in descending order according to a first similarity index; combine at least a portion of the recommended items at the top of the descending order into a first candidate set; obtain positive sample features of the positive samples corresponding to the sample objects; obtain a third similarity index between the positive sample features and the recommended item features of each recommended item in the first candidate set; delete 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 a portion of the recommended items at the top of the descending order into a candidate recommended item set.
[0219] In some embodiments, the sample acquisition module 4551 is configured to take 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; to obtain a first ratio between the following parameters corresponding to multiple sample objects respectively: the second predicted feature of the sample object in the target domain, the number of objects in the object cluster to which the sample object belongs; and to add up each first ratio to obtain a fourth interaction feature.
[0220] In some embodiments, the migration interaction features include: prior source domain migration interaction features of the sample object and source domain migration interaction features of the sample object; the sample acquisition module 4551 is configured to call a modified 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 features of the sample object; and to call a modified linear function to activate the third interaction feature and the fourth interaction feature to obtain the source domain migration interaction features of the sample object.
[0221] In some embodiments, the sample filtering module 4552 is configured to: obtain the prior source domain migration interaction features of the sample object and the fourth similarity index between the features of 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 a portion of the strong negative samples at the head of the descending order 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 features of each recommended item in the third candidate set; delete 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 features of each recommended item; sort each recommended item in the fourth candidate set in descending order according to the sixth similarity index, and take at least a portion of the recommended items at the head of the descending order as true strong negative samples.
[0222] In some embodiments, the sample filtering module 4552 is configured to, after obtaining multiple recommended items in the target domain, obtain the 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; use 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 and the number of clusters of the item cluster; determine the decaying average clustering index based on the first difference between the current time and the start time of sample processing and the average clustering index; and use the smaller value between the average clustering index and the decaying average clustering index as the first similarity threshold.
[0223] In some embodiments, the sample filtering module 4552 is configured to perform the following processing for each item cluster: obtaining a first product between the transpose of the feature of each recommended item in the item cluster and the feature of the cluster center item; obtaining a second ratio between each first product and the number of recommended items in the item cluster; and using the sum of each second ratio as the clustering index of the item cluster.
[0224] In some embodiments, the sample filtering module 4552 is configured to obtain a pre-configured period decay ratio, an initial filtering index, and the number of sample processing cycles; 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 the exponent and the period decay ratio as the base to form a time decay parameter; and use the product between the third ratio and the time decay parameter as the average clustering index of decay.
[0225] In some embodiments, the model training module 4553 is configured to, after selecting multiple real strong negative samples from multiple strong negative samples based on the similarity index between the transfer interaction features and each recommendation item in the candidate recommendation item set, obtain 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, the negative samples include a pre-configured 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; based on 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.
[0226] In some embodiments, the model training module 4553 is configured to perform the following processing for each sample recommendation item: multiply the transpose of the interaction feature matrix of the sample object and the matrix of the recommendation 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 logarithms of the second difference and the third difference to obtain the third product; use the sum of the second product and the third product as the sub-loss of the sample recommendation item; and add each sub-loss to obtain the loss function of the cross-domain recommendation model.
[0227] This application provides a computer program product comprising a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the sample processing method for the cross-domain recommendation model described above in this application.
[0228] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the sample processing method of the cross-domain recommendation model provided in this application. For example, ... Figure 3A The sample processing method of the cross-domain recommendation model is shown.
[0229] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0230] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, 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 stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0231] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, 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 co-located files (e.g., a file that stores one or more modules, subroutines, or code sections).
[0232] As an example, executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0233] In summary, this application's embodiments use the fusion and interaction features of sample objects across different domains to initially screen multiple recommendation items, obtaining a candidate recommendation item set composed of strong negative samples. Then, based on the interaction features of sample objects migrating between different domains, the candidate recommendation item set is further filtered to obtain true strong negative samples for training the cross-domain recommendation model. Through multiple rounds of filtering, the accuracy of the obtained true strong negative samples is improved. Using these filtered true strong negative samples to train the cross-domain recommendation model can enhance the model's accuracy in recommending information in the target domain.
[0234] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A sample processing method for a cross-domain recommendation model, characterized in that, The method includes: Obtain multiple recommended items from the target domain, wherein the recommended items are used to make recommendations to sample objects; The first interaction feature and the second interaction feature of the sample object are fused to obtain the 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. Determine the similarity index between the fused interaction feature and each of the recommended items, and based on the similarity index, select multiple strong negative samples from the multiple recommended items, and combine the selected multiple recommended items into a candidate recommended item set; 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 with time-sensitive interaction behavior in the source domain, and the fourth interaction feature is the cluster center of the second interaction features of multiple sample objects in the target domain; The third interaction feature and the fourth interaction feature of the sample object are fused to obtain the migration interaction feature of the sample object; Based on the similarity index between the transfer interaction features and each of the recommended items in the candidate recommended item set, multiple real strong negative samples are selected from the multiple strong negative samples, wherein the multiple real 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 and second interaction features of the sample object to obtain the fused interaction features of the sample object, the method further includes: Obtain the source domain items corresponding to each interactive behavior performed by the sample object in the source domain, and extract features from each source domain item to obtain source domain item features; According to the order in which each of the aforementioned interactive behaviors in the source domain is executed, each of the source domain item features is combined into a first interactive feature in sequence form; Obtain the target domain items corresponding to each interactive behavior performed by the sample object in the target domain, and extract features from each target domain item to obtain target domain item features; Each target domain item feature is combined into a second interactive feature in sequence, according to the order in which each interactive behavior in the target domain is executed.
3. The method according to claim 2, characterized in that, The fusion interaction features include: the prior interaction features of the sample object in the target domain, and the comprehensive interaction features of the sample object with respect to the source domain and the target domain; The process of fusing the first and second interaction features of the sample object to obtain the fused interaction features of the sample object includes: Based on the first interaction features in sequence form, feature prediction is performed on each source domain item feature to obtain a first predicted feature, wherein the first predicted feature is used to characterize the prior interaction behavior of the sample object in the source domain. Feature prediction is performed on each target domain item feature in the second interaction feature in sequence form to obtain a second predicted feature, wherein the second predicted feature is used to characterize the prior interaction behavior of the sample object in the target domain. The first and second predicted features are activated by calling a modified linear function to obtain the prior interaction features of the sample object in the target domain. The modified linear function is invoked to activate the following parameters to obtain the comprehensive interaction features of the sample object for the source and target domains: the last source domain item feature in the first interaction feature in sequence form, and the last target domain item feature in the second interaction feature in sequence form.
4. The method according to claim 3, characterized in that, Determining the similarity index between the fused interaction features and each of the recommended items includes: Obtain the prior interaction features of the sample object in the target domain and the first similarity index between the features of each recommended item and the features of the recommended items respectively; Obtain the comprehensive interaction features of the sample object with respect to the source domain and the target domain, and the second similarity index between the features of each recommended item and the features of the recommended items respectively.
5. The method according to claim 4, characterized in that, The step of selecting multiple strong negative samples from the multiple recommended items based on the similarity index, and combining the selected multiple recommended items into a candidate recommended item set, includes: Each of the recommended items is sorted in descending order according to the first similarity index, and at least a portion of the recommended items at the top of the descending order are combined into a first candidate set. Obtain the positive sample features of the positive samples 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; Recommended items whose third similarity index is greater than the first similarity threshold are removed from the first candidate set to obtain the 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 a portion of the recommended items at the top of the descending sort result are combined into a candidate recommended item set.
6. The method according to any one of claims 3 to 5, characterized in that, The acquisition of the third and fourth interaction features of the sample object includes: The last source domain item feature in the first interaction feature in 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. Obtain a first ratio between the following parameters corresponding to the multiple sample objects: the second predicted feature of the sample object in the target domain, and the number of objects in the object cluster to which the sample object belongs; The fourth interactive feature is obtained by summing each of the first ratios.
7. The method according to claim 6, characterized in that, The migration interaction features include: the prior source domain migration interaction features of the sample object and the source domain migration interaction features of the sample object; The process of fusing the third and fourth interaction features of the sample object to obtain the migration interaction features of the sample object includes: The first predicted feature and the fourth interaction feature of the sample object are activated by calling the modified linear function to obtain the prior source domain transfer interaction feature of the sample object; The modified linear function is invoked to activate the third and fourth interaction features to obtain the source domain migration interaction features of the sample object.
8. The method according to claim 7, characterized in that, The step of selecting multiple real strong negative samples from the multiple strong negative samples based on the similarity index between the transfer interaction features and each of the recommended items in the candidate recommended item set includes: Obtain the prior source domain migration interaction features of the sample object and the fourth similarity index between the features of each recommended item; The strong negative samples in the candidate recommendation item set are sorted in descending order according to the fourth similarity index, and at least a portion of the strong negative samples at the head of the descending order are combined into a third candidate set. Obtain the positive sample features of the positive samples 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; Recommended items whose third similarity index is greater than the second similarity threshold are removed from the third candidate set to obtain a fourth candidate set; Obtain the source domain migration interaction features of the sample objects and the sixth similarity index between the features of each recommended item; Each of the recommended items in the fourth candidate set is sorted in descending order according to the sixth similarity index, and at least a portion of the recommended items at the head of the descending sort result are taken as true strong negative samples.
9. The method according to claim 5, characterized in that, After obtaining multiple recommended items for the target domain, the method further includes: Obtain the recommended project features and the project clusters to which the multiple recommended projects belong, and obtain the cluster center project features corresponding to each project cluster; Based on the recommended project characteristics and cluster center project characteristics of each recommended project included in each project cluster, a clustering index corresponding to each project cluster is determined; The sum of the ratios between the following parameters for each project cluster is taken as the average clustering index for the multiple recommended projects: the clustering index of the project cluster, and the number of clusters of the project cluster; Based on the first difference between the current time and the start time of sample processing, and the average clustering index, the decaying average clustering index is determined; The smaller value between the average clustering index and the decaying average clustering index is used as the first similarity threshold.
10. The method according to claim 9, characterized in that, The step of determining clustering indicators for each project cluster based on the recommended project characteristics and cluster center project characteristics of each recommended project included in each project cluster includes: Perform the following processing for each of the aforementioned project clusters: Obtain the first product between the transpose of each recommended item feature in the item cluster and the cluster center item feature; Obtain the 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 the clustering index for the project cluster.
11. The method according to claim 9 or 10, characterized in that, The determination of the decaying average clustering index based on the first difference between the current time and the start time of sample processing, and the average clustering index, includes: Obtain the pre-configured period decay ratio, initial filtering index, and number of sample processing cycles; Obtain the third ratio between the average clustering index and the initial filtering index; The ratio between the first difference and the number of periods is used as the exponent, and 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 the decay.
12. The method according to claim 1, characterized in that, After selecting multiple true strong negative samples from the multiple strong negative samples based on the similarity index between the transfer interaction features and each of the recommended items in the candidate recommended item set, the method further includes: Obtain 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. The negative samples include a pre-configured 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 invoked to predict the recommendation results, thereby obtaining the recommendation results corresponding to each of the sample recommendation items. The loss function of the cross-domain recommendation model is determined based on the difference between the recommendation result and the sample label value for each recommended item in the sample. The parameters of the initialized cross-domain recommendation model are updated based on the loss function to obtain the trained cross-domain recommendation model.
13. The method according to claim 12, characterized in that, The step of determining the loss function of the cross-domain recommendation model based on the difference between the recommendation result and the sample label value corresponding to each of the sample recommendation items includes: For each of the sample recommendation items, the following processing is performed: Multiply the transpose of the interaction feature matrix of the sample object by the matrix of the recommended item features of each sample recommended item to obtain the predicted probability of the sample recommended item; Obtain the second product of the logarithm of the predicted probability and the sample label value of the sample recommended 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 second difference and the logarithm of the third difference to obtain the third product; The sum of the second product and the third product is used as the sub-loss of the sample recommended items; The loss function of the cross-domain recommendation model is obtained by summing each of the sub-losses.
14. A sample processing device for a cross-domain recommendation model, characterized in that, The device includes: The sample acquisition module is configured to acquire multiple recommended items from a target domain, wherein the recommended items are used to make recommendations to the sample object; The sample acquisition module is configured to fuse the first interaction feature and the second interaction feature of the sample object to obtain the 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. The sample filtering module is configured to determine the similarity index between the fused interaction feature and each of the recommended items, filter out multiple strong negative samples from the multiple recommended items based on the similarity index, and combine the multiple recommended items obtained by filtering into a candidate recommended item set. The sample acquisition module is configured to acquire 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 with time-sensitive interaction behavior in the source domain, and the fourth interaction feature is the cluster center of the second interaction features of multiple 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 the migration interaction feature of the sample object; The sample filtering module is configured to select multiple real strong negative samples from the multiple strong negative samples based on the similarity index between the transfer interaction features and each of the recommended items in the candidate recommended item set, wherein the multiple real strong negative samples are used to train the cross-domain recommendation model.
15. The apparatus according to claim 14, characterized in that, The sample acquisition module is configured to acquire source domain items corresponding to each interactive behavior performed by the sample object in the source domain, and to extract features from each source domain item to obtain source domain item features. According to the order in which each of the aforementioned interactive behaviors in the source domain is executed, each of the source domain item features is combined into a first interactive feature in sequence form; Obtain the target domain items corresponding to each interactive behavior performed by the sample object in the target domain, and extract features from each target domain item to obtain target domain item features; Each target domain item feature is combined into a second interactive feature in sequence, according to the order in which each interactive behavior in the target domain is executed.
16. The apparatus according to claim 15, characterized in that, The fusion interaction features include: the prior interaction features of the sample object in the target domain, and the comprehensive interaction features of the sample object with respect to the source domain and the target domain; The sample acquisition module is configured to perform feature prediction based on each source domain item feature in the first interaction feature in sequence form to obtain a first predicted feature, wherein the first predicted 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 sequence form to obtain a second predicted feature, wherein the second predicted feature is used to characterize the prior interaction behavior of the sample object in the target domain; activate the first predicted feature and the second predicted feature by calling a modified linear function to obtain the prior interaction feature of the sample object in the target domain; activate the following parameters by calling the modified linear function 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 sequence form and the last target domain item feature in the second interaction feature in sequence form.
17. The apparatus according to claim 16, characterized in that, The sample filtering module is configured to obtain a first similarity index between the prior interaction features of the sample object in the target domain and the recommendation item features corresponding to each of the recommended items; and to obtain a second similarity index between the comprehensive interaction features of the sample object in the source domain and the target domain and the recommendation item features corresponding to each of the recommended items.
18. The apparatus according to claim 17, characterized in that, The sample filtering module is configured to sort each of the recommended items in descending order according to the first similarity index, and combine at least a portion of the recommended items at the head of the descending sort result into a first candidate set. Obtain the positive sample features of the positive samples 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 the 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 a portion of the recommended items at the top of the descending sort result are combined into a candidate recommended item set.
19. The apparatus according to any one of claims 16 to 18, characterized in that, The sample acquisition module is configured to take 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 last interaction behavior performed by the sample object in the source domain; obtain a first ratio 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; and add each of the first ratios to obtain the fourth interaction feature.
20. The apparatus according to claim 19, characterized in that, The migration interaction features include: the prior source domain migration interaction features of the sample object and the source domain migration interaction features of the sample object; The sample acquisition module is configured to call a modified linear function to activate the first predicted feature and the fourth interaction feature of the sample object to obtain the prior source domain migration interaction feature of the sample object; and to call the modified 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.
21. The apparatus according to claim 20, characterized in that, The sample filtering module is configured to: obtain the prior source domain migration interaction features of the sample object and a fourth similarity index between the features of 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 a portion of the strong negative samples at the head of the descending order into a third candidate set; obtain the positive sample features of the positive samples corresponding to the sample object, and obtain a third similarity index between the positive sample features and the features of each recommended item in the third candidate set; delete recommended items whose third similarity index is greater than a second similarity threshold from the third candidate set to obtain a fourth candidate set; and obtain a sixth similarity index between the source domain migration interaction features of the sample object and the features of each recommended item. Each of the recommended items in the fourth candidate set is sorted in descending order according to the sixth similarity index, and at least a portion of the recommended items at the head of the descending sort result are taken as true strong negative samples.
22. The apparatus according to claim 18, characterized in that, The sample filtering module is configured to obtain the recommended project features and the project clusters to which the multiple recommended projects belong, and to obtain the cluster center project features corresponding to each project cluster. Based on the recommended project features and cluster center project features of each recommended project included in each project cluster, a clustering index corresponding to each project cluster is determined; the sum of the ratios between the following parameters of each project cluster is used as the average clustering index corresponding to the multiple recommended projects: the clustering index of the project cluster and the number of clusters of the project cluster; based on the first difference between the current time and the start time of sample processing and the average clustering index, a decaying average clustering index is determined; the smaller value between the average clustering index and the decaying average clustering index is used as the first similarity threshold.
23. The apparatus according to claim 22, characterized in that, The sample filtering module is configured to perform the following processing for each item cluster: obtain a first product between the transpose of the recommended item feature in the item cluster and the cluster center item feature; obtain a second ratio between each of the first products and the number of recommended items in the item cluster; and use the sum of each of the second ratios as the clustering index of the item cluster.
24. The apparatus according to claim 22 or 23, characterized in that, The sample filtering module is configured to obtain a pre-configured period decay ratio, an initial filtering index, and the number of sample processing cycles; and to obtain a third ratio between the average clustering index and the initial filtering index. The ratio between the first difference and the number of periods is used as the exponent, and 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 the decay.
25. The apparatus according to claim 14, characterized in that, The device also includes a model training module; The model training module is configured to 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. The negative samples include a pre-configured 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 module calls an initialized cross-domain recommendation model to predict recommendation results, obtaining the recommendation result corresponding to each sample recommendation item. Based on the difference between the recommendation result corresponding to each sample recommendation item and the sample label value, the module determines the loss function of the cross-domain recommendation model. Based on the loss function, the module updates the parameters of the initialized cross-domain recommendation model to obtain the trained cross-domain recommendation model.
26. The apparatus according to claim 25, characterized in that, The model training module is configured to perform the following processing for each sample recommendation item: multiply the transpose of the interaction feature matrix of the sample object by the matrix of the recommendation 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 second difference and the logarithm of the third difference to obtain the third product; use the sum of the second product and the third product as the sub-loss of the sample recommendation item; and add each sub-loss to obtain the loss function of the cross-domain recommendation model.
27. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions for a computer; A processor, when executing computer-executable instructions or computer programs stored in the memory, implements the sample processing method of the recommendation model according to any one of claims 1 to 13.
28. 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, they implement the sample processing method of the recommendation model according to any one of claims 1 to 13.
29. 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, they implement the sample processing method of the recommendation model according to any one of claims 1 to 13.
Citation Information
Patent Citations
Cross-domain recommendation model sample processing
US20260003937A1