Sample processing method for cross-domain recommendation model, sample processing apparatus for cross-domain recommendation model, and electronic device, computer storage medium and computer program product

By screening strong negative samples through fusion and migration interaction characteristics, the problem of low information recommendation accuracy in the target field of the existing cross-domain recommendation model is solved, and the recommendation accuracy is significantly improved.

WO2024255428A1PCT designated stage expired Publication Date: 2024-12-19TENCENT TECHNOLOGY (SHENZHEN) CO LTD

Patent Information

Application Number
PCT/CN2024/087977
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-06-12
Filing Date
2024-04-16
Publication Date
2024-12-19

AI Technical Summary

Technical Problem

The existing cross-domain recommendation model has low accuracy in the target field. It is mainly because the cross-domain correlation at the feature level of negative samples randomly selected in the target field during the training process, and the cross-domain difference at the sample level is ignored, resulting in Recommendation accuracy is limited.

Method used

By obtaining multiple recommendation items in the target field, integrating the interactive characteristics of the source field and the target field, screening out strong negative samples, and further screening real strong negative samples by migrating the interactive characteristics to improve the training data quality of the cross-domain recommendation model.

Benefits of technology

The real strong negative samples obtained through multiple rounds of screening are used to train the model, which significantly improves the information recommendation accuracy of the cross-domain recommendation model in the target field and improves the recommendation effect of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024087977_19122024_PF_FP_ABST
    Figure CN2024087977_19122024_PF_FP_ABST
Patent Text Reader

Abstract

Provided in the present application are a sample processing method and apparatus for a cross-domain recommendation model, and a device and a storage medium. The method comprises: acquiring a plurality of recommended projects in a target domain; fusing a first interaction feature of a sample object in a source domain with a second interaction feature of the sample object in the target domain, so as to obtain a fused interaction feature of the sample object; determining a similarity index between the fused interaction feature and each recommended project; on the basis of the similarity index, screening the plurality of recommended projects to obtain a plurality of strong negative samples, and combining the plurality of strong negative samples into a candidate recommended project set; fusing a third interaction feature of an interaction behavior having the timeliness of the sample object in the source domain with a fourth interaction feature which represents a clustering center of the second interaction feature, so as to obtain a migration interaction feature of the sample object; and on the basis of a similarity index between the migration interaction feature and each recommended project in the candidate recommended project set, screening the plurality of strong negative samples to obtain a real strong negative sample.
Need to check novelty before this filing date? Find Prior Art

Description

Sample processing method of cross-domain recommendation model, sample processing device of cross-domain recommendation model, electronic device, computer storage medium and computer program product

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on the Chinese patent application with application number 2023106944044 and application date of June 12, 2023, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby introduced into this application as a reference. Technical Field

[0003] The present application relates to artificial intelligence technology, and in particular to a sample processing method for a cross-domain recommendation model, a sample processing device for a cross-domain recommendation model, an electronic device, a computer storage medium, and a computer program product. Background Art

[0004] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to achieve the best results.

[0005] Item recommendation is a key application of artificial intelligence. Related technologies often utilize recommendation models to recommend items to objects, but the accuracy of these models depends on how well they are trained. Cross-domain recommendation leverages the rich object behavior information in the source domain as an aid to the target domain, enabling better recommendations in the target domain and even across multiple domains. Related technologies typically use cross-domain recommendation methods to train cross-domain recommendation models, focusing solely on the cross-domain correlation of features in randomly sampled negative samples from the target domain. Consequently, the trained cross-domain recommendation models are not very accurate in recommending information in the target domain, impacting the accuracy of information recommendations.

[0006] There is no effective solution to the problem that the cross-domain recommendation model has low accuracy in recommending cross-domain information in related technologies.

[0007] Summary of the Invention

[0008] The embodiments of the present application provide a sample processing method, device, electronic device, computer-readable storage medium, and computer program product for a cross-domain recommendation model, which can improve the accuracy of recommendations made by the cross-domain recommendation model in the target domain.

[0009] The technical solution of the embodiment of the present application is implemented as follows:

[0010] An embodiment of the present application provides a sample processing method for a cross-domain recommendation model, the method being executed by an electronic device, the method comprising:

[0011] Get multiple recommended projects in the target field;

[0012] fusing a first interaction feature of the sample object in the source domain and a second interaction feature in the target domain to obtain a fused interaction feature of the sample object;

[0013] Determining a similarity index between the fused interaction feature and each of the recommended items;

[0014] Filtering a plurality of strong negative samples from the plurality of recommended items based on the similarity index, and combining the plurality of strong negative samples into a candidate recommended item set;

[0015] fusing a third interaction feature of the sample object's time-sensitive interaction behavior in the source domain and a fourth interaction feature representing a cluster center of the second interaction feature to obtain a migration interaction feature of the sample object;

[0016] Based on a similarity index between the migration interaction feature and each of the recommended items in the candidate recommended item set, a plurality of true strong negative samples are screened out from the plurality of strong negative samples, wherein the plurality of true strong negative samples are used to train the cross-domain recommendation model.

[0017] This embodiment of the present application provides a sample processing device for a cross-domain recommendation model, including:

[0018] a sample acquisition module configured to acquire a plurality of recommended items in a target field;

[0019] a sample acquisition module configured to fuse a first interaction feature of a sample object in a source domain and a second interaction feature in a target domain to obtain a fused interaction feature of the sample object;

[0020] a sample filtering module configured to determine a similarity index between the fused interaction feature and each of the recommended items; filter out a plurality of strong negative samples from the plurality of recommended items based on the similarity index, and combine the plurality of strong negative samples into a set of candidate recommended items;

[0021] The sample acquisition module is configured to fuse a third interaction feature of the sample object's time-sensitive interaction behavior in the source domain and a fourth interaction feature representing the cluster center of the second interaction feature to obtain a migration interaction feature of the sample object;

[0022] The sample filtering module is configured to filter out multiple true strong negative samples from the multiple strong negative samples based on a similarity index between the migration interaction feature and each of the recommended items in the candidate recommendation item set, wherein the multiple true strong negative samples are used to train the cross-domain recommendation model.

[0023] An embodiment of the present application provides an electronic device, comprising:

[0024] a memory for storing computer-executable instructions;

[0025] The processor is configured to implement the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application when executing the computer-executable instructions stored in the memory.

[0026] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions for implementing a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application when executed by a processor.

[0027] An embodiment of the present application provides a computer program product, including a computer program or computer-executable instructions. When the computer program or computer-executable instructions are executed by a processor, the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application is implemented.

[0028] The embodiments of the present application have the following beneficial effects:

[0029] Based on the fused interaction features of sample objects across different domains, multiple recommended items are initially screened to obtain a set of candidate recommended items composed of strong negative samples. This set of candidate recommended items is then screened based on the interaction features of sample objects migrating across different domains to obtain true strong negative samples for training the cross-domain recommendation model. Through multiple rounds of screening, the accuracy of the true strong negative samples obtained is improved. These true strong negative samples are then used to train the cross-domain recommendation model, improving the accuracy of the model's information recommendations in the target domain. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] FIG1 is a schematic diagram of an application mode of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application;

[0031] FIG2 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0032] FIG3A is a schematic diagram of a first flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application;

[0033] FIG3B is a second flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application;

[0034] FIG3C is a schematic diagram of a third flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application;

[0035] FIG3D is a schematic diagram of a fourth flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application;

[0036] FIG3E is a fifth flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application;

[0037] FIG3F is a sixth flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application;

[0038] FIG4A is a schematic diagram of a first relationship between features and samples provided in an embodiment of the present application;

[0039] FIG4B is a schematic diagram of a second relationship between features and samples provided in an embodiment of the present application;

[0040] FIG4C is a schematic diagram of a third relationship between features and samples provided in an embodiment of the present application;

[0041] FIG5 is a seventh flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application;

[0042] FIG6A is a table of first experimental results provided in an embodiment of the present application;

[0043] FIG6B is a table of the second experimental results provided in an embodiment of the present application;

[0044] FIG6C is a table of the third experimental results provided in an embodiment of the present application;

[0045] FIG6D is a table showing the fourth experimental results provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the purpose, 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 limiting this application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0047] In the following description, reference is made to “some embodiments”, which describes a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0048] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0049] It should be pointed out that the collection and processing of relevant data in this application (for example, data on the interactive behavior of sample subjects) should be strictly in accordance with the requirements of relevant national laws and regulations when applied in practice, and the informed consent or separate consent of the personal information subject should be obtained. Subsequent data use and processing should be carried out within the scope of authorization of laws and regulations and the personal information subject.

[0050] In this application, the technical solution for data capture (for example, recommended projects) is implemented. When the above embodiments of this application are applied to specific products or technologies, the relevant data collection, use and processing processes should comply with the requirements of national laws and regulations, and conform to the principles of legality, legitimacy and necessity. It does not involve obtaining data types prohibited or restricted by laws and regulations, and will not hinder the normal operation of the target website.

[0051] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which this application pertains. The terms used herein are for the purpose of describing the embodiments of this application only and are not intended to limit this application.

[0052] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained. The nouns and terms involved in the embodiments of the present application are subject to the following interpretations.

[0053] 1) Item: The target of a recommendation system (e.g., an advertising system). Examples include items (including physical items like food and clothing, as well as advertisements for virtual items like games and game props), and information (e.g., advertisements, news, music, etc.).

[0054] 2) Recommendation system: The recommendation system is a tool that automatically connects users and information. It can help users find information that interests them in an information-overloaded environment and push information to users who are interested in it.

[0055] 3) Cross-Domain Recommendation (CDR): This approach uses recommendation data from a source domain to assist in 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 to assist in the target domain, enabling better recommendations in the target domain and even across multiple domains. For example, a community website might recommend books to users based on their movie reviews, assuming that the same users have similar preferences for movies and books.

[0056] 4) Negative Samples (NS): Negative samples are a relative concept. For the target category corresponding to the true value, the sample is considered a positive sample. For all other target categories that do not correspond to the true value, the sample is considered a negative sample. Taking the field of media information recommendation as an example, the type of media information can be text, image, or video. The sample is multiple media information to be recommended. Negative samples are media information that users will not interact with. Positive samples are media information that users are interested in and may interact with. The types of interaction include: clicks, browsing, comments, etc.

[0057] 5) Hard Negative Samples (NHS): Compared with positive samples, negative samples are difficult to distinguish or classify, that is, negative samples whose similarity with positive samples is higher than the similarity threshold, which will lead to large prediction errors. Taking the advertising field as an example, the samples are multiple advertisements to be recommended, and the positive samples are advertisements for products that users will buy. The characteristics of advertisements used as positive samples include: relevance to user interests, and users will click on the advertisements and buy the corresponding products. Strong negative samples can be advertisements for products that users will click on but will not buy. For example, when a user has already purchased the item corresponding to advertisement A, the user may still be interested in advertisement A, but after clicking on advertisement A, the user will not buy the product corresponding to advertisement A. At this time, the characteristics of advertisement A are very close to those corresponding to the positive samples, making them difficult to distinguish or classify, and are therefore strong negative samples.

[0058] 6) Real Hard Negative Samples (RHNS): These are correctly classified negative samples, meaning they are both predicted to be negative and actually negative. Continuing with the example of strong negative samples above, if Ad A, a strong negative sample, can be correctly identified by the recommendation model and predicted to be a negative sample, then Ad A is a true hard negative sample.

[0059] 7) False Hard Negative Samples (FHNS): Also known as false hard negative samples, these are positive samples that are mistakenly labeled as negative. This means they are actually positive samples but are predicted as negative. Continuing with the example of strong negative samples above, if there is ad B in the ad sample, and ad B is actually a positive sample, but the recommendation model mistakenly predicts ad B as a negative sample, then ad B is a false hard negative sample.

[0060] 8) Transfer Learning: A term in machine learning that refers to the influence of one learning process on another, or the impact of acquired experience on the completion of other activities. Transfer learning is widely present in the learning of various knowledge, skills, and social norms.

[0061] 9) Curriculum Learning: It is a general training strategy that mimics the learning sequence in human courses and gradually increases the difficulty of training samples as the model is optimized.

[0062] 10) Collaborative Filtering (CF): Utilizes the preferences of groups with similar interests and shared experiences to recommend information of interest to users. Individuals provide feedback (such as ratings) through a collaborative mechanism and record the corresponding feedback content. Information filtering is performed based on the recorded feedback content, thereby assisting in information screening in other areas.

[0063] 11) Field: specifically refers to a specific scope or area, and can also refer to the scope of academic thought or social activities. In the embodiments of this application, field is referred to as domain for short, including any type of field that can perform information recommendation.

[0064] 12) Cluster center: A special sample in cluster analysis that represents a certain class. Other samples are determined to belong to the class by calculating the distance from the cluster center.

[0065] In related technologies, the samples used to train cross-domain recommendation models, the cross-domain recommendation method only focuses on the cross-domain correlation of the feature level of negative samples randomly sampled from the target domain. The trained cross-domain recommendation model has low accuracy in recommending information in the target domain, which affects the accuracy of information recommendation.

[0066] The embodiments of the present application provide a sample processing method for a cross-domain recommendation model, a sample processing device for a cross-domain recommendation model, an electronic device, a computer-readable storage medium, and a computer program product, which can improve the accuracy of recommendations made by the cross-domain recommendation model in the target domain.

[0067] The following describes exemplary applications of the electronic devices provided in the embodiments of the present application. The electronic devices provided in the embodiments of the present application can be implemented as various types of terminals, such as laptop computers, tablet computers, desktop computers, set-top boxes, vehicle-mounted terminals, virtual reality (VR) devices, augmented reality (AR) devices, and can also be implemented as servers. The following describes exemplary applications when the device is implemented as a terminal device or a server.

[0068] Referring to Figure 1 , which is a schematic diagram of an application mode of a sample processing method for a cross-domain recommendation model provided in an embodiment of the present application, Figure 1 involves, for example, a server 200, a network 300, a terminal device 400, and a database 500. The terminal device 400 is connected to the server 200 via the network 300, which can be a wide area network (WAN), a local area network (LAN), or a combination of the two.

[0069] In some embodiments, server 200 may be a training server for training a cross-domain recommendation model. Database 500 stores recommended items in at least two different domains, including shopping information on different platforms and multimedia information on different platforms. For example, in the source domain, shopping information may be recommended on platform A, while in the target domain, shopping information may be recommended on platform B. Another example may be recommended in the source domain, for example, videos, while music may be recommended in the target domain.

[0070] For example, the server 200 calls the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application, screens out real strong negative samples from multiple sample recommendation items, and trains the cross-domain recommendation model based on the real strong negative samples. Based on the user's information in the source domain, the trained cross-domain recommendation model is called to recommend recommended items in the target domain to the user's terminal device 400. For example: the source domain is the movie field, and the target domain is the book field. Based on the user's preferences in the movie field, books that the user may like are recommended.

[0071] The embodiments of the present application can be implemented using database technology. A database, in short, can be considered an electronic filing cabinet that stores electronic files, allowing users to add, query, update, and delete data in these files. A "database" is a collection of data that is stored together in a specific manner, can be shared by multiple users, has minimal redundancy, and is independent of applications.

[0072] A database management system (DBMS) is a computer software system designed for managing databases, typically providing basic functions such as storage, retrieval, security, and backup. DBMSs can be categorized by the database model they support, such as relational or XML (Extensible Markup Language); by the type of computer they support, such as server clusters or mobile phones; by the query language they use, such as SQL or XQuery; by performance priorities, such as maximum scale or maximum speed; or by other classification methods. Regardless of the classification method used, some DBMSs are cross-category, for example, supporting multiple query languages ​​simultaneously.

[0073] The embodiments of the present application can also be implemented through cloud technology. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool that can be used on demand and is flexible and convenient. Cloud computing technology will become an important support. The background services of the technical network system require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, as well as the promotion of search services, social networks, mobile commerce and open collaboration, each item may have its own hash code identification mark in the future, and all of them need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.

[0074] The embodiments of the present application can be implemented through artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making.

[0075] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, pre-trained models, operating / interaction systems, and mechatronics. Pre-trained models, also known as large models or basic models, can be fine-tuned and widely applied to downstream tasks across various AI disciplines. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0076] In some embodiments, the server 200 can be implemented as multiple servers, for example: a sample processing server is used to obtain training samples, a model training server is used to train a cross-domain recommendation model, and an item recommendation server is used to call the trained cross-domain recommendation model.

[0077] In some embodiments, the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The electronic device can be a smartphone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to these. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present invention.

[0078] Referring to Figure 2, Figure 2 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device shown in Figure 2 is the server of Figure 1. The server 200 includes: at least one processor 410, a memory 450, and at least one network interface 420. The various components in the server 200 are coupled together via a bus system 440. It can be understood that the bus system 440 is used to achieve connection and communication between these components. In addition to the data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are labeled as bus system 440 in Figure 2.

[0079] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., where the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0080] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard drives, optical drives, etc. The memory 450 may optionally include one or more storage devices that are physically remote from the processor 410.

[0081] The memory 450 includes volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory may be a read-only memory (ROM), and the volatile memory may be a random access memory (RAM). The memory 450 described in the embodiments of the present application is intended to include any suitable type of memory.

[0082] In some embodiments, the memory 450 can store data to support various operations, examples of which include programs, modules, and data structures, or a subset or superset thereof, as exemplified below.

[0083] Operating system 451, including system programs for processing various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, and driver layer, which are used to implement various basic services and process hardware-based tasks;

[0084] A 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 include Bluetooth, Wi-Fi, and Universal Serial Bus (USB).

[0085] In some embodiments, the device provided by the embodiments of the present application can be implemented in software. FIG2 shows a sample processing device 455 of a cross-domain recommendation model stored in a memory 450, which can be software in the form of programs and plug-ins, including the following software modules: a sample acquisition module 4551, a sample filtering module 4552. These modules are logical and can therefore be arbitrarily combined or further split according to the functions implemented. In FIG2 , all the above modules are shown at once for the sake of convenience, but this should not be regarded as excluding the implementation of the sample processing device 455 of the cross-domain recommendation model that can only include the model training module 4553. The functions of each module will be explained below.

[0086] The sample processing method of the cross-domain recommendation model provided in the embodiment of the present application will be described in combination with the exemplary application and implementation of the terminal provided in the embodiment of the present application.

[0087] Below, we describe a sample processing method for a cross-domain recommendation model provided by an embodiment of the present application. As mentioned above, the electronic device that implements the sample processing method for a cross-domain recommendation model provided by an embodiment of the present application can be a terminal, a server, or a combination of the two. Therefore, the execution entity of each step will not be repeated below.

[0088] It should be noted that in the following image processing examples, the object is a face. Based on their understanding of the following, those skilled in the art can apply the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application to the processing of image collections including other types of objects.

[0089] 3A , which is a schematic diagram of a first flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application, will be described in conjunction with the steps shown in FIG. 3A .

[0090] In step 301, a plurality of recommended items in a target field are obtained.

[0091] Here, the recommendation item is used to make recommendations to the sample object.

[0092] A field specifically refers to a specific scope or area, and can also refer to the scope of academic thought or social activities. In the embodiments of this application, a field is referred to as a domain, which includes any type of field that can be used for information recommendation. Recommended items include: physical items such as food and clothing; advertisements for virtual items such as games and game props; recommended items can also be information, such as advertisements, news, music, etc. The sample object can be a user.

[0093] In some embodiments, referring to FIG3B , FIG3B is a second flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application. Before step 302 , steps 3011 to 3014 in FIG3B are executed, as described in detail below.

[0094] In step 3011, the source domain project corresponding to each interactive behavior performed by the sample object in the source domain is obtained, and features are extracted for each source domain project to obtain source domain project features.

[0095] For example, interactive behaviors include clicking, browsing, forwarding, commenting on items, and purchasing products corresponding to items. Convolutional neural networks or sequence encoders can be used to extract features of each source domain item that users interact with to obtain source domain item features. Characterize the characteristics of the i-th source domain project, where S refers to the source domain (source).

[0096] In step 3012, each source domain item feature is combined into a first interaction feature in a sequence form according to the order in which each interaction behavior in the source domain is executed.

[0097] For example, when a user logs in to the corresponding application through an account and performs an interactive behavior in the application, the application will automatically record the execution time of each interactive behavior. The terminal device will upload the execution time of each interactive behavior to the server. The server obtains the execution time of each interactive behavior and combines the source domain project features corresponding to each interactive behavior into a sequence according to the time sequence of each interactive behavior to obtain the first interactive feature in the form of a sequence. p is the number of interactions in the source domain.

[0098] In step 3013, the target domain project corresponding to each interactive behavior performed by the sample object in the target domain is obtained, and features are extracted for each target domain project to obtain target domain project features.

[0099] For example, the feature extraction process of the target domain is not described here in the same way as the source domain. Characterize the j-th target domain project features, where T refers to the target domain (target).

[0100] In step 3014, each target domain item feature is combined into a second interaction feature in a sequence form according to the order in which each interaction behavior in the target domain is executed.

[0101] For example, the execution time of each interaction behavior is obtained, and the project features of each target domain are combined into a sequence according to the chronological order to obtain the second interaction feature in the form of a sequence q is the number of interactive behaviors in the target domain. The number of interactive behaviors in the target domain and the number of interactive behaviors in the source domain can be the same or different.

[0102] In this embodiment of the present application, by obtaining the item features corresponding to the object's interactive behavior as the object's interaction features and representing the interaction features with the item features, the accuracy of obtaining recommended items based on the interaction features can be improved. Furthermore, compared to converting object information into object features, this method saves the computing resources required to obtain the similarity between the interaction features and the item features.

[0103] Continuing to refer to FIG. 3A , in step 302 , the first interaction feature and the second interaction feature of the sample object are fused to obtain a fused interaction feature of the sample object.

[0104] For example, the first interaction feature is an interaction feature of the sample object in the source domain, and the second interaction feature is an interaction feature of the sample object in the target domain.

[0105] 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 for both the source and target domains. The comprehensive interaction features are used to characterize the user's interactive behaviors in both the target and source domains. Prior interaction behaviors are interactions that a user might perform, and prior interaction features are interaction features of these interactions that a user might perform.

[0106] Refer to Figure 3C, which is a third flow chart of the sample processing method of the cross-domain recommendation model provided by an embodiment of the present application. Step 302 can be implemented through steps 3021 to 3024 of Figure 3C, which are described in detail below.

[0107] In step 3021, feature prediction is performed based on each source domain item feature in the first interactive feature in sequence form to obtain a first predicted feature.

[0108] Here, the first prediction feature is used to characterize the prior interaction behavior of the sample object in the source domain.

[0109] For example, the target domain sequence S T For example, the source domain sequence can be extracted in the same way, and the embodiments of this application will not be repeated one by one. The input matrix is ​​constructed where d is the embedding feature size, represents the learnable item index embedding feature, Represents position embedding features.

[0110] Call the sequence encoder (SASRec sequence recommendation algorithm) to input the matrix D T Linear projection is the query instruction Q T , key K T Sum V T , and the query instruction Q T , key K T Sum V T Substituting into the attention calculation method, the attention calculation method is defined as follows:

[0111] Among them, Q T =D T W Q , K T =D T W K , V T =D T W V , W Q , W K , W VRepresent different linear mapping layers respectively. In this embodiment, the implicit behavior matrix H of the target domain is obtained by a point wise feed forward network. T , where the point-wise feedforward network consists of two fully connected layers with a rectified linear unit (ReLU) activation function between the two layers, hereinafter referred to as the ReLU activation function. The implicit behavior matrix H T The acquisition process is represented by the following formula (2):

[0112] Among them, w1, w2 represent weight matrices, b1, b2 are bias vectors. The user's implicit behavior matrix H in the source domain S The same is true for the user's behavioral interaction sequence S in the source domain S The implicit behavior matrix H of the user in the source domain can be obtained by the same principle as formula (2) S .

[0113] According to the principles of formula (1) and formula (2) above, the prior behavior matrix in the source domain is obtained Behavioral interaction sequence S based on the source domain S The characteristics corresponding to the last interactive behavior in and the behavioral interaction sequence S S The relationship between other features in and the last feature is used to predict the first predicted feature of the interactive behavior that the user may perform after the last interactive behavior.

[0114] In step 3022, feature prediction is performed based on each target domain item feature in the second interactive feature in the sequence form to obtain a second predicted feature.

[0115] Here, the second prediction feature is used to characterize the prior interaction behavior of the sample objects in the target domain.

[0116] According to the principles of formula (1) and formula (2) above, the prior behavior matrix in the target domain is obtained Behavioral interaction sequence S based on the target domain T The characteristics corresponding to the last interactive behavior in and the behavioral interaction sequence S T The relationship between other features in and the last feature is used to predict the second prediction feature of the interactive behavior that the user may perform after the last interactive behavior.

[0117] In step 3023, a modified linear function is called to activate the first prediction feature and the second prediction feature to obtain a priori interaction features of the sample object in the target domain.

[0118] Example, rectified linear function MLP f (.) can be implemented through a two-layer fully connected network with a leaky rectified linear unit (ReLU) activation function, hereinafter referred to as LeakyReLU activation. LeakyReLU activation is a variant of the rectified linear unit (ReLU) activation function that is used to solve the "dead neuron" problem that ReLU may encounter during neural network training. , the user's prior interaction characteristics in the target domain Obtained by the following formula (3):

[0119] in, represents the prior behavior embedding feature (first prediction feature) of the last interactive behavior of user u in the behavior sequence of the source domain, is the prior behavior embedding feature (second prediction feature) of the last interactive behavior in the behavior sequence of the target domain, MLP f (.) represents a two-layer fully connected network activated by LeakyReLU, which is the rectified linear function mentioned above.

[0120] In step 3024, the corrected linear function is called to activate the following parameters to obtain the comprehensive interaction features of the sample object for the source domain and the target domain: the last source domain item feature in the first interaction feature in the sequence form, and the last target domain item feature in the second interaction feature in the sequence form.

[0121] For example, the last source domain item feature in the first interaction feature in the sequence form is the feature that represents the interaction behavior closest to the current moment in the source domain, and the last target domain item feature in the second interaction feature in the sequence form is the feature that represents the interaction behavior closest to the current moment in the target domain. Similar to the principle of step 3021, the characteristics of the interaction behavior are represented as the behavior matrix H S and H T , based on the latest interactive features in the behavior sequences in the source and target domains and Call the corrected linear function to generate comprehensive interaction features

[0122] In an embodiment of the present application, by predicting the interactive behaviors that the user may perform in the target domain and the source domain, and fusing the features of the interactive behaviors that may be performed and the features of the interactive behaviors that have been performed, the amount of information contained in the features used as the basis for recommendation is increased, and the fused interactive features are used as the basis for determining the similarity between the recommended items, the training samples of the cross-domain recommendation model can be optimized, thereby improving the accuracy of cross-domain recommendations.

[0123] Continuing to refer to FIG. 3A , in step 303 , a similarity index between the fused interaction feature and each recommended item is determined.

[0124] 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 for the source domain and the target domain and the recommendation item features corresponding to each recommendation item.

[0125] For example, the prior interaction features of the sample object in the target domain and the recommended item features corresponding to each recommended item are multiplied respectively to obtain the first similarity index corresponding to each recommended item, and each first similarity index is combined into a sequence in, is the prior interaction feature of the sample object in the target domain Item characteristics of the first item in the target The first similarity index between the two items is obtained by multiplying the comprehensive interaction feature of the sample object and the recommended item feature corresponding to each recommended item to obtain the second similarity index corresponding to each recommended item.

[0126] In some embodiments, the similarity indicator may also be the cosine similarity between features in vector form.

[0127] In step 304 , a plurality of strong negative samples are screened out from the plurality of recommended items based on the similarity index, and the plurality of recommended items obtained by screening out are combined into a candidate recommended item set.

[0128] For example, the screening method includes, but is not limited to, sorting the similarity indicators and selecting at least some of the samples in descending order as strong negative samples. Strong negative samples are negative samples that are difficult to distinguish or classify compared to positive samples. To facilitate understanding, the following example illustrates a cross-domain recommendation scenario in which a strong negative sample is a negative sample that is difficult to distinguish or classify because the similarity between the relevant features of the recommended item and the object (e.g., interactive effects, object features) exceeds a threshold.

[0129] In some embodiments, referring to FIG3D , FIG3D is a fourth flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application. Step 304 can be implemented through steps 3041 to 3044 of FIG3D , which will be described in detail below.

[0130] In step 3041, each recommended item is sorted in descending order according to the first similarity index, and at least part of the recommended items at the head of the descending sorting result are combined into a first candidate set.

[0131] For example, a preset number of recommended items at the head of the descending sorting result are uniformly sampled, and the sampled recommended items are combined into a first candidate set.

[0132] In step 3042 , the positive sample feature of the positive sample corresponding to the sample object is obtained, and a third similarity index between the positive sample feature and the recommended item feature of each recommended item in the first candidate set is obtained.

[0133] For example, the positive sample in the embodiment of the present application is a pre-configured recommended item belonging to the positive sample type, the positive sample features of the positive sample are pre-configured, and the third similarity index of each recommended item can be obtained in the following way: obtain the product between the positive sample features and the recommended item features of the recommended item, and use the product as the third similarity index.

[0134] In step 3043 , the recommended items whose third similarity index is greater than the first similarity threshold are deleted from the first candidate set to obtain a second candidate set.

[0135] For example, the first similarity threshold may be pre-configured, or may be dynamically changed according to the difference between the current time and the start time of sample processing.

[0136] In some embodiments, referring to FIG3F , FIG3F is a sixth flow chart of the sample processing method of the cross-domain recommendation model provided in an embodiment of the present application. After step 301 , steps 3081 to 3085 in FIG3F are executed to obtain a first similarity threshold.

[0137] In step 3081 , recommended item features of multiple recommended items, the item clusters to which they belong, and cluster center item features corresponding to each item cluster are obtained.

[0138] For example, the recommended item feature V of multiple recommended items T Generate project clusters using the K-means clustering algorithm and the corresponding cluster centers (k i is the number of clusters of predefined item clusters), where is a cluster of items with index k Characteristics of cluster center projects.

[0139] In step 3082 , based on the recommended item features and cluster center item features of each recommended item included in each item cluster, a clustering index corresponding to each item cluster is determined.

[0140] For example, for each item cluster, the clustering index corresponding to the item cluster is determined by performing weighted summation on the product between the feature of each recommended item in the item cluster and the feature of the cluster center item.

[0141] Step 3082 can be implemented by performing the following processing for each item cluster: obtaining the transposed feature of each recommended item in the item cluster Cluster center project characteristics The first product between Get each first product separately and the second ratio between the number of recommended items in the item cluster; the sum of each second ratio is used as the clustering index of the item cluster. Step 3082 can be represented by the following formula (4):

[0142] in, is the clustering index of item cluster i.

[0143] In step 3083 , the sum of the ratios of the following parameters of each item cluster is taken as the average clustering index corresponding to the multiple recommended items: the clustering index of the item cluster and the number of clusters of the item cluster.

[0144] For example, the ratio between the clustering index of the project cluster and the number of clusters of the project cluster is represented as The average clustering index

[0145] In step 3084, based on the first difference between the current moment and the start moment of sample processing and the average clustering index, a decayed average clustering index is determined.

[0146] For example, step 3084 can be implemented by: obtaining a pre-configured period attenuation ratio τ, an initial filtering index χ, and a number of sample processing cycles ψ; obtaining an average clustering index s c The third ratio between the initial filtering index χ Assume that the current time is e and the starting time is μ, and the ratio between the first difference (e-μ) and the number of cycles ψ is used as the exponent The period decay ratio is used as the base τ to form the time decay parameter The product of the third ratio and the time decay parameter is used as the average clustering index of decay

[0147] In step 3085, the smaller value between the average clustering index and the decayed average clustering index is used as the first similarity threshold.

[0148] For example, the average clustering index and the decayed average clustering index are compared, and the smaller value is used as the first similarity threshold.

[0149] In some embodiments, the starting time is set to a time in the future of the current time. In this case, the first similarity threshold can be infinite. Steps 3081 to 3085 are also applicable to obtaining the second similarity threshold.

[0150] In the embodiment of the present application, the similarity threshold is dynamically obtained so that the similarity threshold can be matched according to relevant features in the application scenario, thereby improving the accuracy of obtaining the similarity threshold and further improving the accuracy of screening recommended items based on the similarity threshold.

[0151] Continuing with FIG3D , in step 3044 , each recommended item in the second candidate set is sorted in descending order according to the second similarity index, and at least part of the recommended items at the head of the descending sorting result are combined into a candidate recommended item set.

[0152] For example, the second similarity index is the product of the comprehensive interaction feature and the recommended item feature corresponding to each recommended item. For example, the second similarity index of item i in the target field can be obtained by the following method: Item characteristics related to item i in the target domain Multiply them together to obtain the second similarity index of project i in the target domain.

[0153] In step 305, the third interaction feature and the fourth interaction feature of the sample object are obtained.

[0154] For example, the third interaction feature is the interaction feature of the time-sensitive interaction behavior of the sample objects in the source domain, and the fourth interaction feature is the cluster center of the second interaction feature of multiple sample objects in the target domain. The cluster center refers to the average characteristic value of each cluster in cluster analysis. Different clustering algorithms select different cluster centers. For example, in the K-means clustering algorithm, the cluster center is determined by calculating the distance from each data point to the cluster center. In other clustering algorithms, such as hierarchical clustering or density-based clustering, the way to determine the cluster center is different from the K-means clustering algorithm.

[0155] In some embodiments, step 305 can be implemented by: taking the last source domain item feature in the first interaction feature in the sequence form as the third interaction feature, wherein the last source domain item feature is used to represent the last interaction behavior performed by the sample object in the source domain; the third interaction feature can be represented as Wherein, u refers to the user and S is the source domain; obtain the first ratios between the following parameters corresponding to multiple sample objects respectively: the second prediction feature of the sample object in the target domain and the number of objects in the object cluster to which the sample object belongs; add each first ratio to obtain the fourth interaction feature.

[0156] The number of objects in an object cluster can be obtained through the len() function. The len() function is a function used to return the length or number of elements of an object. The object cluster is also called the user cluster, which is represented as a user cluster. The second prediction feature of the sample object in the target domain is also the user's prior behavior matrix in the target domain The first ratio can be characterized as Then, each first ratio is added to obtain the fourth interaction feature The formula is the following formula (5):

[0157] The len() function is used to quickly retrieve the number of elements in a sequence (such as a list, tuple, or str) and can be used to check the length of a string, list, tuple, dictionary, or set. The fourth interactive feature is used to characterize the centroid of each user cluster. k represents the index of the user cluster to which user u belongs.

[0158] In some embodiments, the migration interaction features include: a priori source domain migration interaction features of the sample object, and the source domain migration interaction features of the sample object; the source domain migration interaction features are used to characterize the changes in the interactive behavior of the object during the process of migrating from the source domain to the target domain, and the a priori source domain migration interaction features are used to characterize the changes in the interactive behavior of the object that has not yet been executed during the process of migrating from the source domain to the target domain.

[0159] In step 306, the third interaction feature and the fourth interaction feature of the sample object are fused to obtain a migration interaction feature of the sample object;

[0160] Step 306 can be implemented by calling a rectified linear function to activate the first prediction feature and the fourth interaction feature of the sample object to obtain a priori source domain migration interaction feature of the sample object. Calling a rectified linear function to activate the third interaction feature and the fourth interaction feature to obtain a source domain migration interaction feature of the sample object.

[0161] For example, according to the first prediction feature Fourth interactive feature Call the corrected linear function to calculate and obtain the prior source domain migration interaction characteristics According to the third interactive feature and the fourth interactive feature Call the corrected linear function to calculate and obtain the source domain migration interaction characteristics

[0162] In step 307 , a plurality of true strong negative samples are screened out from the plurality of strong negative samples based on a similarity index between the transfer interaction feature and each recommended item in the candidate recommended item set.

[0163] For example, multiple true strong negative samples are used to train a cross-domain recommendation model. The screening method includes, but is not limited to, sorting similarity indicators and selecting at least some of the samples in descending order as true strong negative samples.

[0164] In some embodiments, referring to FIG3E , FIG3E is a fifth flow chart of a sample processing method of a cross-domain recommendation model provided in an embodiment of the present application. Step 307 can be implemented through steps 3071 to 3076 of FIG3E , which are described in detail below.

[0165] In step 3071, a fourth similarity index is obtained between the prior source domain migration interaction feature of the sample object and the recommendation item feature corresponding to each recommendation item.

[0166] For example, the following process is performed for each recommended item: the prior source domain transfer interaction feature and the recommended item feature are multiplied together to obtain a fourth similarity index of the recommended item. The fourth similarity index is the product of matrices.

[0167] In step 3072, each strong negative sample in the candidate recommendation item set is sorted in descending order according to the fourth similarity index, and at least part of the strong negative samples at the head of the descending sorting result are combined into a third candidate set.

[0168] For example, a preset number of strong negative samples at the head of the descending sorting result are uniformly sampled, and the sampled strong negative samples are combined into a third candidate set.

[0169] In step 3073 , the positive sample feature of the positive sample corresponding to the sample object is obtained, and a third similarity index between the positive sample feature and the recommended item feature of each recommended item in the third candidate set is obtained.

[0170] For example, the principle of step 3073 is the same as that of step 3043 and will not be repeated here.

[0171] In step 3074 , the recommended items whose third similarity index is greater than the second similarity threshold are deleted from the third candidate set to obtain a fourth candidate set.

[0172] 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 enhancement processing, the similarity between a false strong negative sample and a positive sample is higher than that between a true strong negative sample and a positive sample. The higher the similarity between a strong negative sample and a positive sample, the higher the possibility that the sample is a false 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 false strong negative samples in the remaining samples and improving the accuracy of obtaining true strong negative samples.

[0173] In step 3075 , a sixth similarity index is obtained between the source domain migration interaction feature of the sample object and the recommendation item feature corresponding to each recommendation item.

[0174] For example, the following processing is performed for each recommended item: the product between the source domain migration interaction feature of the sample object and the recommended item feature is obtained, and the product is used as the sixth similarity indicator.

[0175] In step 3076, each recommended item in the fourth candidate set is sorted in descending order according to the sixth similarity index, and at least part of the recommended items at the head of the descending sorting result are used as true strong negative samples.

[0176] For example, a preset number of recommended items at the head of the descending sorting result are uniformly sampled, and the sampled recommended items are used as true strong negative samples.

[0177] In the embodiment of the present application, through multiple rounds of screening, the false strong negative samples contained in the final real strong negative samples are reduced, and then, the cross-domain recommendation model can be trained based on the real strong negative samples to improve the accuracy of the model's recommendations in the target field.

[0178] In some embodiments, after step 307, the cross-domain recommendation model is trained in the following manner: a training sample set is obtained, wherein the training sample set includes: sample interaction features of the sample object, multiple sample recommendation items as positive samples, and multiple sample recommendation items as negative samples, the negative samples include a preconfigured number of real strong negative samples, the sample label value of the negative sample is 0, and the sample label value of the positive sample is 1; based on the training sample set, the initialized cross-domain recommendation model is called to predict the recommendation result, and the recommendation result corresponding to each sample recommendation item is obtained; according to the difference between the recommendation result 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.

[0179] For example, the loss function can be obtained by performing the following processing for each sample recommendation item: the transpose matrix (u T ) T , the matrix of recommended item features for each sample recommended item Multiply them together to get the predicted probability of the sample recommendation item u T is the interaction feature of the target domain; get the logarithm of the predicted probability Sample label value of the sample recommendation item The second product of Get the second difference between 1 and the sample label value and get the logarithm of the third difference between 1 and the predicted probability Multiplying the logarithms of the second difference and the third difference yields a third product, which is represented by The sum of the second and third products is used as the sub-loss of the sample recommendation item, and the sub-loss is represented as The loss function of the cross-domain recommendation model is obtained by adding up each sub-loss. The loss function L is represented by the following formula (9):

[0180] Among them, R T is the training set of the target domain, and Represent positive samples and corresponding negative samples respectively, Represents the predicted probability for (u, d).

[0181] The cross-domain recommendation model trained by the embodiment of the present application can be applied in the following scenarios: 1. Recommend products to users based on the video content that the user likes. For example, if a user often browses videos of a certain theme on a video platform, the sample processing method of the cross-domain recommendation model provided by the embodiment of the present application is used to determine a training sample set based on the interactive features collected on the video platform and the recommended items collected on the shopping platform, and the cross-domain recommendation model is trained based on the training sample set. The trained cross-domain recommendation model is called based on the video content browsed by the user on the video platform to recommend the corresponding products on the shopping platform to the user. 2. Recommend videos to users based on the music that the user likes; for example, the trained cross-domain recommendation model is called based on the songs that the user listens to in the audio application to recommend short videos on the video platform to the user. Assuming that the user listens to rock-style songs in the audio application, the soundtrack of the video recommended on the video platform can be of the corresponding rock style.

[0182] In an embodiment of the present application, multiple recommended items are initially screened based on the fused interaction features of sample objects across different domains to obtain a set of candidate recommended items composed of strong negative samples. This set of candidate recommended items is then screened based on the interaction features of sample objects migrating across different domains to obtain true strong negative samples for training a cross-domain recommendation model. Through multiple rounds of screening, the accuracy of the true strong negative samples obtained from the screening is improved. The true strong negative samples obtained from the screening are used to train a cross-domain recommendation model, which can improve the accuracy of the model's information recommendations in the target domain.

[0183] Below, an exemplary application of the sample processing method of the cross-domain recommendation model according to an embodiment of the present application in a practical application scenario will be described.

[0184] Related technologies can be roughly divided into three categories: cross-domain recommendation, cross-domain sequential recommendation, and negative sampling methods in the recommendation field. Among them, cross-domain recommendation (CDR) is one of the representative methods to alleviate the data sparsity problem in the recommendation field. It helps improve the performance of the model in the target domain by overlapping users' auxiliary behaviors from other domains. Classic cross-domain recommendation algorithms generally use multi-task learning, alignment constraints, and contrastive learning to simulate cross-domain knowledge transfer. Cross-domain sequential recommendation (CDSR) is a subfield of cross-domain recommendation. Compared with traditional cross-domain recommendation, it pays more attention to the multi-domain temporal behavior sequence of users.

[0185] Related technologies primarily include cross-domain recommendation and negative sampling methods for recommendation. Most existing cross-domain recommendation methods focus solely on the feature-level cross-domain correlation of randomly sampled negative samples from the target domain, while ignoring their cross-domain differences at the sample level. Over-optimizing these randomly sampled negative samples at the feature level can, to a certain extent, overlook the user's source domain preferences, potentially leading to suboptimal performance. Negative sampling methods for recommendation are generally categorized into static negative sampling strategies and strong negative sampling strategies, depending on whether they employ fixed sampling probabilities. Static negative sampling strategies typically sample negative samples according to a fixed distribution probability, making them unable to dynamically capture changes in user and item preferences during model training. Strong negative sampling strategies, on the other hand, are largely designed for collaborative filtering tasks and may not be directly transferable to cross-domain recommendation tasks. Furthermore, these methods avoid the problem of false strong negative samples through parameter selection, which is unstable and uninterpretable across different datasets, making the effective exploration and utilization of strong negative samples challenging.

[0186] The embodiment of the present application proposes an effective and simple universal real strong negative sample (RealHNS) sampling method for cross-domain recommendation (CDR) tasks, and proposes a universal real negative sample and a cross-domain real strong negative sample sampler under the cross-domain recommendation task, which filters out false strong negative samples (FHNS) from all strong negative samples (HNS) and selects real strong negative samples (RHNS). This can be achieved in the following way: when screening two types of samples, coarse-grained and fine-grained real strong negative sample selectors are performed in turn, and false strong negative samples in the candidate set are filtered out through a dynamic filter for items (recommended content). For special cross-domain settings, the embodiment of the present application further designs a new cross-domain real strong negative sample screening method to alleviate the negative information transfer that may exist during the migration of cross-domain recommendation information, and explores the false strong negative samples of different users in special cross-domain settings through a dynamic filter for users, thereby improving the performance of existing cross-domain recommendation models.

[0187] The sample processing method of the cross-domain recommendation model provided in the embodiment of the present application is significantly different from the related art: (1) coarse-grained and fine-grained strong negative sample selectors are designed in the general true strong negative sample selector to effectively find true strong negative samples, and a false strong negative sample filter for items (recommended content) is used to dynamically filter out strong negative samples that are too similar to positive samples.

[0188] (2) We creatively propose a novel cross-domain negative sample in the cross-domain true strong negative sample selector to combat the inherent negative information transfer problem in cross-domain recommendation. Specifically, we design a dynamic false strong negative sample filter for users. Together with the coarse-grained and fine-grained strong negative sample selectors, we improve the screening and optimization of cross-domain strong negative samples from the user perspective.

[0189] (3) Through the curriculum learning framework, the relative proportions of random negative samples, true strong negative samples, and false strong negative samples in the training samples are balanced during the model training process.

[0190] (4) The sample processing method of the cross-domain recommendation model provided in the embodiment of the present application is independent of the specific model type used in the actual application scenario, is easy to deploy, can be applied to different negative sampling methods, and can bring stable improvements.

[0191] To facilitate understanding of the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application, the relationship between objects and samples in cross-domain recommendation is explained.

[0192] Refer to Figure 4A, which shows a first schematic diagram of the relationship between features and samples provided by an embodiment of the present application; illustrating universal false strong negative samples and cross-domain false strong negative samples in a cross-domain recommendation setting, where stars and circles represent user and item features, respectively. Figure 4A demonstrates that universal false strong negative samples are close to positive samples.

[0193] Refer to Figure 4B, which is a schematic diagram of the second relationship between features and samples provided in an embodiment of the present application; users who deviate from the mainstream cross-domain migration (for example, users have no similarities in preferences for different fields, for example, it is difficult to accurately recommend themes of books that users like through movies) are regarded as outliers, and they will be affected by the errors of non-outliers. As shown by the black arrow, the star represented by the outlier is outside the area where the non-outlier is located.

[0194] Refer to Figure 4C, which is a schematic diagram of the third relationship between features and samples provided in an embodiment of the present application; Figure 4C shows that cross-domain false strong negative samples are related to non-outliers in cross-domain recommendations.

[0195] For example, based on the relationship between features and synchronization in the cross-domain recommendation field in Figures 4A to 4C above, the embodiment of the present application analyzes the cross-domain setting and proposes three types of hypotheses: Hypothesis 1: Items (recommended content) that are similar to positive samples are more likely to become false strong negative samples in cross-domain recommendations than other samples. Hypothesis 2: Samples that have strong similarities with the user's source domain features indicate the migration preference of these users and are more likely to become false strong negative samples of non-outliers. Hypothesis 3: Introducing all strong negative samples at the beginning of the training process may lead to computational waste and suboptimal performance.

[0196] The sample processing method proposed in the embodiments of this application uses a universal true strong negative sample selector and a cross-domain true strong negative sample selector during the sampling process to improve cross-domain recommendations. Specifically, given the behavioral sequence characteristics of the source and target domains, the universal true strong negative sample selector is used to sample universal true strong negative samples to obtain a universal candidate item set. A project-specific false strong negative sample filter is then used to eliminate possible false strong negative samples in the universal candidate item set.

[0197] In order to further alleviate the negative transfer inherent in cross-domain recommendation (negative transfer is the hindering effect of one type of learning on another type of learning, which is manifested in the mutual influence of learning new and old knowledge and mastering sequential methods), the embodiment of the present application provides a cross-domain true strong negative sample selector, which dynamically distinguishes outliers in the entire user set and false strong negative samples in the cross-domain candidate item set through user-specific and item-specific false strong negative sample filters.

[0198] The sampling methods of the above two domains (source domain and target domain) are symmetrical and independent of the model, so that the sample processing method of the cross-domain recommendation model provided in the embodiment of the present application can be easily migrated to collaborative filtering (CF) and sequential recommendation (SR) tasks.

[0199] For example, the following illustrates a sample processing method for a cross-domain recommendation model provided by an embodiment of the present application, with reference to the accompanying drawings. Referring to Figure 5 , Figure 5 is a seventh flow chart illustrating a sample processing method for a cross-domain recommendation model provided by an embodiment of the present application. The steps in Figure 5 are explained with reference to the server as the execution entity.

[0200] In step 501, a sequence encoder is called to extract features of the user's behavior in the source domain and the target domain to obtain behavior sequence features.

[0201] Define the source domain behavior sequence in the source domain S and target domain T respectively and target domain behavior sequences Where p and q represent the number of behaviors of the user in the source domain and the target domain respectively. and Represent behavior embedding respectively. Given a behavior sequence S S and S T , the true strong negative sample framework attempts to recommend the user's next interactive item in the target domain The source domain behavior sequence is also the first interaction feature mentioned above, and the target domain behavior sequence is also the second interaction feature mentioned above.

[0202] In this embodiment of the application, the sequence recommendation algorithm SASRec is used as a sequence encoder. T For example, the source domain sequence can be extracted in the same way, and the embodiments of this application will not be repeated one by one. The input matrix is ​​constructed where d is the embedding feature size, represents the learnable item index embedding feature, Represents position embedding features.

[0203] Call the sequence encoder, the sequence encoder calls the sequence recommendation algorithm (SASRec) to input the matrix D T Linear projection is the query instruction Q T , key K T Sum V T , and substitute the three into the attention calculation method, which is defined as follows:

[0204] Among them, Q T =D T W Q, K T =D T W K , V T =D T W V , W Q , W K , W V Represent different linear mapping layers respectively. In this embodiment, the implicit behavior matrix H of the target domain is obtained by a point wise feed forward network. T , where the point-wise feedforward network consists of two fully connected layers with a ReLU activation function between the two layers. The implicit behavior matrix H T The acquisition process is represented by the following formula (2):

[0205] Among them, w1, w2 represent weight matrices, b1, b2 are bias vectors. The user's implicit behavior matrix H in the source domain S The same is true for the user's behavioral interaction sequence S in the source domain S The implicit behavior matrix H of the user in the source domain can be obtained by the same principle as formula (2) S .

[0206] The primary task in solving the false negative problem is to distinguish false strong negative samples from true strong negative samples from the entire project set based on the user's historical interaction information. The embodiment of the present application proposes a universal true strong negative sample selector to select universal true strong negative samples in cross-domain recommendations. Specifically, the embodiment of the present application designs a method of obtaining a set of candidate projects related to the user's general preferences through coarse-grained true strong negative sample selection, and removing projects that are too similar to positive samples from the candidate project set through fine-grained true strong negative sample selection. The parameters used as filtering indicators in the fine-grained screening process are dynamic (related to Assumption 1 above), which will be described in detail in steps 502 and 503 below.

[0207] In step 502, strong negative samples related to the user's general preferences are screened from the entire item set based on multiple behavior sequence features to obtain a candidate item set.

[0208] In related technologies, strong negative sampling typically involves uniformly sampling a fixed set of candidate items, and then dynamically selecting the items with the highest scores calculated by the recommendation model in the current state from the randomly selected candidate items as strong negative samples. However, this type of method relies too much on the appropriate number of candidate items. That is, too few candidate items will lead to randomness and unstable quality of strong negative samples, while too many candidate items will greatly increase the hardness of the selected strong negative samples, resulting in model optimization deviations. At the same time, the above-mentioned methods also show significant parameter variations on different datasets, and cannot achieve consistent improvements compared to static negative sampling methods in all cases.

[0209] The embodiments of the present application perform a universal coarse-grained selection on the entire item set to sample item candidates that are related to the user's general preferences in cross-domain recommendations.

[0210] For example, the sequence encoder calculates the prior behavior matrix of the source domain and the target domain at the beginning of each epoch (preset period) and Based on the assumption that "the last behavior in the object's behavior sequence contains his / her overall preference", the prior interaction features of user u are generated, and finally the prior interaction features of the user in the target domain are generated. Obtained by the following formula (3):

[0211] in, represents the prior behavior embedding feature (first prediction feature) of the last interactive behavior of user u in the behavior sequence of the source domain, is the prior behavior embedding feature (second prediction feature) of the last interactive behavior in the behavior sequence of the target domain, MLP f (.) represents a two-layer fully connected network activated by LeakyReLU, which is the rectified linear function mentioned above.

[0212] Prior final interaction features for user u and learnable item embedding features To calculate the first similarity index, and sort the first similarity index from large to small, the calculation method is: obtain the product between the item features in the learnable item embedding features and the user's prior interaction features in the target domain. The calculation result represented as a sequence is Each element in the calculation result is the first similarity index corresponding to each project. A fixed number of projects are uniformly sampled from the top range with the largest first similarity index to construct a general candidate project set.

[0213] The embodiment of the present application can sample a set of general candidate items based on prior knowledge of user general preferences, alleviating the problem of excessive randomness in selecting candidate item sets in existing methods. It is worth noting that the embodiment of the present application only performs the above operation at the beginning of each period, so it does not introduce excessive computational cost. When serving online, it can be achieved through KD-Tree (a tree data structure that stores instance points in k-dimensional space for fast retrieval). Time complexity (the number of times a statement in an algorithm is executed is called statement frequency or time frequency. Time complexity is used to describe the running time of an algorithm).

[0214] In step 503, samples whose similarity with the positive sample reaches a threshold value are eliminated from the candidate item set to obtain a general candidate item set.

[0215] Unlike classic strong negative sampling work that emphasizes that "the higher the score between the user and the item, the more likely it is a false strong negative sample," where the score can be a similarity indicator in the embodiments of this application, the embodiments of this application also propose an additional assumption: in cross-domain recommendations, items that are similar to positive samples are more likely to be false strong negative samples. This assumption is very intuitive, that is, if a user likes an item, such as character A, he / she is likely to like other similar items, such as character B and character C from the same series as character A.

[0216] Based on the above assumptions, the embodiment of the present application adaptively filters the candidate item set by selecting fine-grained true strong negative samples based on unsupervised clustering. Specifically, the embodiment of the present application uses the item embedding feature V T The project clusters are generated by the K-means clustering algorithm and the corresponding cluster centers (k i is the number of clusters of predefined project clusters), and calculate the average project clustering index in Represents the cluster with index k Embedding features of all items in Their corresponding cluster centers Similarity index between them, clustering index of each project cluster It can be defined as the following formula (4):

[0217] Clustering index based on each project cluster Calculate the average clustering index Based on the average clustering index s c The proposed filtering indicators for the project can be set dynamically d (the first similarity threshold above).

[0218] Filtering can be achieved by multiplying the matrix of project features of each project with the matrix of features of the positive sample to obtain the similarity index between each project v and the positive sample (the third similarity index above), and judging whether the similarity index is less than the filtering index s d (the first similarity threshold above), determines whether to remove item v from the set of general candidate items Exclude, in response to being less than the filter index, keep the item in the general candidate item set In response to being less than the filter index, from the set of general candidate items Excluded.

[0219] For example, filter indicators d The calculation method of is described in step 506 below.

[0220] In this embodiment of the present application, the filtered general candidate item set The third similarity index corresponding to each project in is sorted respectively, and the projects with higher ranking of the third similarity index are evenly sampled.

[0221] Given the behavior matrix H of user u in the source domain and target domain S and H T , based on the latest interactive features in the behavior sequences in the source and target domains and Generate final user interaction features That is the comprehensive interaction feature mentioned above.

[0222] The embodiment of the present application calculates the final user interaction features and the filtered set of common candidate items We then use a second similarity metric between the item embedding features in , and then select items in the top-ranked item list as common true strong negative samples.

[0223] Referring to the specific concepts of Assumption 1, the present embodiment considers that items that are closer to positive samples are more likely to be false strong negative samples. Therefore, the proposed general true strong negative sample selector helps eliminate items that are similar to positive samples. This is a tailor-made solution to the false negative problem in general strong negative samples.

[0224] The embodiment of the present application proposes a cross-domain true strong negative sample selector, which uses a cross-domain coarse-grained true strong negative sample selector to sample a set of cross-domain candidate items related to the user's source domain preferences, 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, and further samples cross-domain true strong negative samples in cross-domain recommendations, which is specifically explained in steps 504 and 505 below.

[0225] In step 504 , samples related to the user's source domain preference are sampled from the general candidate item set to obtain a cross-domain candidate item set.

[0226] Related strong negative sampling methods were mostly designed for collaborative filtering tasks and are difficult to directly transfer to cross-domain recommendation scenarios. This is because cross-domain recommendation tasks incorporate additional information from the source domain to accurately model the user's complete preferences. As a result, these methods can only avoid false negatives in a single domain, but cannot solve the problem of cross-domain positive transfer.

[0227] The embodiments of the present application assume that users with consistent behaviors in the source domain may have similar preferences in the target domain, and propose a coarse-grained true strong negative sample selector to accurately model users' cross-domain preferences in the target domain and their related cross-domain candidate item sets.

[0228] For example, given the prior behavior matrix of the source domain and the target domain and The embodiment of the present application calculates the user's prior behavior matrix in the source domain. Perform K-means clustering algorithm to generate source domain user clusters Then, based on the source domain user cluster and the user's prior behavior matrix in the target domain (k u is the number of clusters of user clusters in the source domain) to calculate the centroid features of the target domain Among them, the centroid feature of each user cluster It is the fourth interactive feature mentioned above, the centroid feature of each user cluster The measurement method is as follows:

[0229] in, The len() function is used to quickly obtain the number of elements in a sequence (such as list, tuple, str) and can be used to check the length of a string, list, tuple, dictionary, or set.

[0230] Embedding features based on prior behaviors in behavior sequences in the source domain Center of gravity characteristics Generate prior features of the transferred source domain in the final space Where k represents the index of the user cluster to which user u belongs.

[0231] Similar to the principle of step 502, based on the prior migration source domain features (the prior source domain transfer interaction feature above) and the learnable item embedding feature V T Calculate the cross-domain similarity index (the fourth similarity index above) and sort the cross-domain similarity index from large to small. The calculation method is to obtain the project features in the learnable project embedding features and the prior migration source domain features. The product between A fixed number of projects are uniformly extracted from the top range with higher rankings to form a cross-domain project candidate set

[0232] Cross-domain project candidate collection It is composed of items related to the user's source domain preferences. Therefore, the embodiment of the present application can accurately simulate the user's migration preferences between two domains through fine-grained analysis and processing.

[0233] In step 505 , false strong negative samples in the cross-domain migration and cross-domain candidate item sets are eliminated, and true strong negative samples in the cross-domain candidate item set are sampled.

[0234] The goal of cross-domain recommendation is to transfer informative knowledge from the source domain to the target domain to improve performance in the target domain. Due to the diverse domains of the projects, user preferences across multiple domains inherently exhibit data bias, making it challenging to uniformly model user preferences across domains. The proposed cross-domain true strong negatives method primarily models the prevailing target domain preferences through unsupervised clustering of similar source domain preferences. While this method performs well in general, over-optimization for cross-domain true strong negatives can actually exacerbate bias and introduce additional negative information for users whose preferences are consistent between the source and target domains. As shown in the middle panel of Figure 1, during the cross-domain transfer process, users that were 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 the different mapping methods used for different users. In the real world, a wealth of source domain information exists, making some users more susceptible to being dominated by the prevailing preference transfer model during the transfer process.

[0235] The embodiment of the present application defines outliers as users who show similar preferences in the source domain, but show significantly different preferences in the target domain from the mainstream migration. The embodiment of the present application proposes a dynamic filter for users to include outliers in the optimization range of cross-domain true strong negative samples. Given a user cluster index k, the user cluster of the embodiment of the present application is The embedding feature matrix of the last behavior in the prior target domain behavior sequence of all users in and target domain central features Score list between Define the following formula (6):

[0236] Then the embodiment of the present application lists the scores Sort by predefined weight w o Select the lowest score in the score list Users are treated as outliers. The cross-domain recommendation models corresponding to these outliers are trained based on the universal true strong negative samples and cross-domain true strong negative samples, while for other users, only the cross-domain recommendation model corresponding to the universal true strong negative samples is used.

[0237] In addition to the inherent multi-domain preference bias, there is also the problem of negative information migration in the cross-domain preference modeling process, that is, over-reliance on the cross-domain project candidate set may introduce bias in the selection of cross-domain true strong negative samples (see hypothesis 2). In order to eliminate the bias in cross-domain preference modeling, the embodiment of the present application designs a dynamic filter for projects to filter out the parts of the cross-domain project candidate set that are too similar to the positive samples. The filter for projects is designed based on unsupervised project similarity, and the cross-domain setting does not change the intrinsic relationship between its projects.

[0238] The universal filtering index for projects mentioned in step 503 is used to filter the cross-domain project candidate set. By comparing the similarity index between the project and the positive sample with the filtering index s for the project d to evaluate whether to eliminate item v from the cross-domain item candidate set.

[0239] Embed features by the nearest behavior in the source domain and the center of gravity characteristics of the target area (k represents the index of the source domain user cluster to which u belongs) Modeling is performed. Finally, the source domain characteristics of the migration are calculated and the filtered cross-domain project candidate set We then use a similarity metric between the item embedding features in [1] and select a fixed number of items among the top-ranked items as strong negative samples across domains.

[0240] In step 506 , the number of true strong negative samples in the training sample set required for training the cross-domain recommendation model is obtained.

[0241] As shown in Hypothesis 3, including all strong negative samples in the initial stage of training may lead to computational waste, suboptimal performance and excessive gradients, which may further hinder the model from converging to the global minimum. To this end, the embodiment of the present application uses a curriculum learning (CL) method to improve the generalization ability and convergence rate of the cross-domain recommendation model. Curriculum learning is a general training strategy that imitates the learning sequence in human courses and slowly increases the difficulty of training samples as the model is optimized.

[0242] The embodiment of the present application designs two curriculum learning (CL) methods, including an optimization-based curriculum learning (CL) method and a filtering-based curriculum learning (CL) method. The former refers to dynamically adjusting the proportion of true strong negative samples in NS, which enables the model to start from a smooth target and is easier to find the global minimum. At this time, the hyperparameter μ controls the starting period in CL, ψ is the number of period intervals in CL, η represents the number of additional true strong negative samples, and the number of true strong negative samples in the reference negative sample n is r Formula (7):

[0243] Among them, e is the current period, n n Represents the number of NS negative samples. The above parameters are the same in each dataset, i.e., μ = 5, ψ = 2, η = 1.

[0244] In contrast, the CL task in the latter is used to dynamically adjust the range of the set of candidate items to be filtered and the set of cross-domain candidate items to mitigate the situation of incorporating difficult NS (potential false strong negative samples) into training. The pre-set hyperparameters χ = 5 initial filter size and τ = 1.15 represent the epoch decay ratio, respectively. The proposed filtering index sd for the item is defined as formula (8):

[0245] In step 507 , a cross-domain recommendation model is trained based on the training sample set.

[0246] The embodiment of the present application is based on the final user interaction feature u T and the characteristics of the target project To calculate the user u and the project The prediction reliability between And the loss function It is expressed as follows:

[0247] Among them, R T is the training set of the target domain, and Represent positive samples and corresponding negative samples respectively, Represents the predicted probability for (u, d).

[0248] The embodiment of the present application can achieve greater recommendation performance improvement when making cross-domain recommendations from a denser domain to a sparser domain (Game->Toy recommends toys based on game samples, Movie->Book recommends books based on movie samples), proving the practical significance of true strong negative samples in cross-domain knowledge transfer. It also proves that the universal true strong negative samples and cross-domain true strong negative samples proposed in the embodiment of the present application can achieve significant improvement in consistency based on the existing state-of-the-art model (SOTA) negative sampling method. The embodiment of the present application can be applied in the following scenarios: cross-domain recommendations between platforms with sparse consumer behavior and platforms with rich consumer behavior.

[0249] The following is an explanation of the effect of the sample processing method of the cross-domain recommendation model provided by the embodiment of the present application in combination with the experimental results. By comparison with the existing SOTA algorithm, the effectiveness and universality of the method of the embodiment of the present application are comprehensively analyzed. In the performance comparison, three classic evaluation indicators were selected to evaluate the effectiveness of the sample processing method of the cross-domain recommendation model provided by the embodiment of the present application, including NDCG@k (N@k), HitRate@k (HR@k) and the area under the ROC curve and the coordinate axis (Area Under Curve, AUC), where k is selected in [5, 10, 20, 50]. The embodiment of the present application randomly selects 99 negative samples for each positive sample in the test set, and shows the best results in bold in the experimental results table, and underlines the best effect of the baseline algorithm.

[0250] Figure 6A is a table of the first experimental results provided by an embodiment of the present application; Figure 6A shows the experimental results recommended from the game field to the toy field. The negative sampling methods in the related technologies involved in the table include: negative sampling with network-generated candidates (NNCF), AugNS, sparse random negative sampling (SRNS), dynamic negative sampling (DNS), DNS*, and MixGCF.

[0251] FIG6B is a second experimental result table provided in an embodiment of the present application, showing the experimental results of recommendations from the toy field to the game field.

[0252] FIG6C is a third experimental result table provided in an embodiment of the present application; it shows the experimental results of recommendation from the movie field to the book field.

[0253] FIG6D is a fourth experimental result table provided in an embodiment of the present application, showing the experimental results of recommending from the book field to the movie field.

[0254] The following conclusions are drawn from the experimental result tables of Figures 6A to 6D: (1) The embodiment of the present application significantly outperforms all baseline algorithms on the four data sets, with a significance level of p<0.05 and an average error range of less than 0.003. The sample processing method of the cross-domain recommendation model provided by the embodiment of the present application has a greater improvement on smaller k and indicators that are more sensitive to ranking order (NDCG). This is because the embodiment of the present application focuses on distinguishing strong negative samples that are more advantageous in the first few positions of the sorted list. This superiority is consistent in the four cross-domain settings based on the two strong negative sampling methods, indicating that the embodiment of the present application can bring ideal improvements to various strong negative sampling methods. In addition, this also proves the necessity of capturing specific cross-domain real strong negative samples to improve cross-domain recommendations. It is worth noting that the embodiment of the present application focuses on a more challenging and more common sampling environment in real recommendation systems (including 10 random negative samples and 10 strong negative samples, and more strong negative samples will reduce the impact of sampling). Compared with the classic strong negative sampling method, the consistency improvement (1%-5%) brought by the RealNHS (DNS*) in Figures 6A to 6D in the embodiments of the present application is sufficient to demonstrate its universality and effectiveness.

[0255] (2) Based on the challenging setting of selecting 20 negative samples in the embodiment of this application, no strong negative sampling baseline algorithm can consistently outperform other baseline algorithms on all datasets (sometimes even perform worse than using only random NS). Most existing strong negative sampling methods (such as DNS * , MixGCF) only relies on selecting the hardest items from some subset of candidate items to mitigate the impact of false HNS, resulting in over-reliance on the quality of randomly selected subsets of candidate items. Therefore, they perform worse on datasets with larger item corpora or sparser object behaviors (such as Game->Toy recommendation from game to toy and Movie->Book recommendation from movie to book). The improvements of the embodiments of the present application over existing strong negative sampling methods confirm the importance of the following two points: (1) The item-specific filters proposed in the universal true strong negative samples can provide unbiased information gradients for the recommendation model; (2) Explicit cross-domain true strong negative samples can simulate the changes in user preferences in multiple fields and incorporate them into the training process through the curriculum learning framework.

[0256] (3) Comparing the improvements between different datasets, the embodiment of the present application performs better in the Game->Toy recommendation and Movie->Book recommendation settings, which reflects that the embodiment of the present application can transfer informative knowledge from the dense source domain to the relatively sparse target domain (similar to the traditional cross-domain recommendation method). Moreover, on all datasets, the embodiment of the present application performs better than MixGCF and DNS. * The improvement is also significant, demonstrating that the embodiments of the present application are capable of further improving consistency over different baseline strong negative sampling algorithms. Benefiting from the novel cross-domain true strong negative samples in cross-domain recommendation and the dynamic filters for users and items, the embodiments of the present application significantly outperform other negative sampling methods on all datasets.

[0257] The following continues to describe an exemplary structure of the sample processing device 455 of the cross-domain recommendation model provided by the embodiment of the present application implemented as a software module. In some embodiments, as shown in Figure 2, 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 the sample object; the sample acquisition module 4551, configured to fuse the first interaction feature and the second interaction feature of the sample object to obtain a fused interaction feature of the sample object, wherein the first interaction feature is the interaction feature of the sample object in the source domain, and the second interaction feature is the interaction feature of the sample object in the target domain; a sample filtering module 4552, configured to determine a similarity index between the fused interaction feature and each recommendation item, and based on the similarity index The target is to screen out multiple strong negative samples from multiple recommendation items, and combine the multiple recommendation items obtained by screening into a candidate recommendation item set; the sample acquisition module 4551 is configured to obtain the third interaction feature and the fourth interaction feature of the sample object, wherein the third interaction feature is the interaction feature of the sample object's time-sensitive interaction behavior in the source domain, and the fourth interaction feature is the cluster center of the second interaction feature of multiple sample objects in the target domain; the sample acquisition module 4551 is configured to fuse the third interaction feature and the fourth interaction feature of the sample object to obtain the migration interaction feature of the sample object; the sample filtering module 4552 is configured to screen out multiple real strong negative samples from multiple strong negative samples based on the similarity index between the migration interaction feature and each recommendation item in the candidate recommendation item set, wherein the multiple real strong negative samples are used to train the cross-domain recommendation model.

[0258] In some embodiments, the sample acquisition module 4551 is configured to obtain the source domain projects corresponding to each interactive behavior performed by the sample object in the source domain, perform feature extraction on each source domain project, and obtain the source domain project feature, before fusing the first interactive feature and the second interactive feature of the sample object to obtain the fused interactive feature of the sample object; combine the feature of each source domain project into a first interactive feature in the form of a sequence according to the order in which each interactive behavior in the source domain is performed; obtain the target domain projects corresponding to each interactive behavior performed by the sample object in the target domain, perform feature extraction on each target domain project, and obtain the target domain project feature; combine the feature of each target domain project into a second interactive feature in the form of a sequence according to the order in which each interactive behavior in the target domain is performed.

[0259] 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 for the source domain and the target domain; the sample acquisition module 4551 is configured to perform feature prediction based on each source domain item feature in the first interaction feature in sequence form to obtain a first prediction feature, wherein the first prediction feature is used to characterize the prior interaction behavior of the sample object in the source domain; perform feature prediction based on each target domain item feature in the second interaction feature in sequence form to obtain a second prediction feature, wherein the second prediction feature is used to characterize the prior interaction behavior of the sample object in the target domain; call the corrected linear function to activate the first prediction feature and the second prediction feature to obtain the prior interaction feature of the sample object in the target domain; call the corrected linear function to activate the following parameters to obtain the comprehensive interaction feature of the sample object for the source domain and the target domain: the last source domain item feature in the first interaction feature in sequence form, and the last target domain item feature in the second interaction feature in sequence form.

[0260] 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 obtain a second similarity index between the comprehensive interaction features of the sample object for the source domain and the target domain and the recommendation item features corresponding to each recommendation item.

[0261] In some embodiments, the sample filtering module 4552 is configured to sort each recommended item in descending order according to a first similarity index, and combine at least some of the recommended items at the head of the descending sorting result into a first candidate set; obtain the positive sample features of the positive sample corresponding to the sample object, and obtain a third similarity index between the positive sample features and the recommended item features of each recommended item in the first candidate set; delete the recommended items whose third similarity index is greater than the first similarity threshold from the first candidate set to obtain a second candidate set; sort each recommended item in the second candidate set in descending order according to the second similarity index, and combine at least some of the recommended items at the head of the descending sorting result into a candidate recommended item set.

[0262] In some embodiments, the sample acquisition module 4551 is configured to use the last source domain item feature in the first interaction feature in sequence form as the third interaction feature, wherein the last source domain item feature is used to characterize the last interaction behavior performed by the sample object in the source domain; obtain the first ratio between the following parameters corresponding to 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; add each first ratio to obtain the fourth interaction feature.

[0263] In some embodiments, 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 4551 is configured to call the corrected linear function to activate the first prediction feature and the fourth interaction feature of the sample object to obtain the prior source domain migration interaction features of the sample object; call the corrected 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.

[0264] In some embodiments, the sample filtering module 4552 is configured to obtain a fourth similarity index between the prior source domain migration interaction features of the sample object and the recommendation item features corresponding to each recommendation item; sort each strong negative sample in the candidate recommendation item set in descending order according to the fourth similarity index, and combine at least part of the strong negative samples at the head of the descending sorting result into a third candidate set; 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 recommendation item features of each recommendation item in the third candidate set; delete the recommendation 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 recommendation item features corresponding to each recommendation item; sort each recommendation item in the fourth candidate set in descending order according to the sixth similarity index, and take at least part of the recommendation items at the head of the descending sorting result as true strong negative samples.

[0265] In some embodiments, the sample filtering module 4552 is configured to, after obtaining multiple recommended items in the target field, 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; take the sum of the ratios between the following parameters of each item cluster as the average clustering index corresponding to the multiple recommended items: the clustering index of the item cluster, the number of clusters of the item cluster; determine the decayed average clustering index based on the first difference between the current moment and the starting moment of sample processing and the average clustering index; and take the smaller value between the average clustering index and the decayed average clustering index as the first similarity threshold.

[0266] In some embodiments, the sample filtering module 4552 is configured to perform the following processing for each item cluster: 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 first product and the number of recommended items in the item cluster; and use the sum of each second ratio as the clustering indicator of the item cluster.

[0267] In some embodiments, the sample filtering module 4552 is configured to obtain a preconfigured period decay ratio, an initial filtering index, and a number of cycles for sample processing; obtain a third ratio between the average clustering index and the initial filtering index; use the ratio between the first difference and the number of cycles as an exponent and the period decay ratio as a base to form a time decay parameter; and use the product of the third ratio and the time decay parameter as the decayed average clustering index.

[0268] In some embodiments, the model training module 4553 is configured to obtain a training sample set after screening out multiple real strong negative samples from multiple strong negative samples based on the similarity index between the migration interaction feature and each recommended item in the candidate recommended item set, wherein the training sample set includes: sample interaction features of the sample object, multiple sample recommended items as positive samples, and multiple sample recommended items as negative samples, the negative samples include a preconfigured number of real strong negative samples, the sample label value of the negative sample is 0, and the sample label value of the positive sample is 1; based on the training sample set, the initialized cross-domain recommendation model is called to predict the recommendation results to obtain the recommendation results corresponding to each sample recommended item; according to the difference between the recommendation results corresponding to each sample recommended item and the sample label value, the loss function of the cross-domain recommendation model is determined; based on the loss function, the parameters of the initialized cross-domain recommendation model are updated to obtain the trained cross-domain recommendation model.

[0269] In some embodiments, the model training module 4553 is configured to perform the following processing for each sample recommendation item: multiply the transposed matrix of the interaction feature matrix of the sample object and the matrix of the 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 logarithm of the second difference and the logarithm of the third difference to obtain a third product; take the sum of the second product and the third product as the sub-loss of the sample recommendation item; and add each sub-loss to obtain the loss function of the cross-domain recommendation model.

[0270] An embodiment of the present application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. A 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 in the embodiment of the present application.

[0271] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, which stores computer-executable instructions or computer programs. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the sample processing method of the cross-domain recommendation model provided by an embodiment of the present application, for example, the sample processing method of the cross-domain recommendation model shown in Figure 3A.

[0272] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or various devices including one or any combination of the above memories.

[0273] In some embodiments, computer-executable instructions may be in the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0274] As an example, computer-executable instructions may, but need not, correspond to a file in a file system, may be stored as part of a file that stores other programs or data, such as in one or more scripts in a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple coordinating files (e.g., files storing one or more modules, subroutines, or code portions).

[0275] As an example, executable instructions may be deployed to be executed on one electronic device, or on multiple electronic devices located at one site, or on multiple electronic devices distributed across multiple sites and interconnected by a communication network.

[0276] In summary, the embodiments of the present application perform an initial screening of multiple recommendation items based on the fusion interaction features of sample objects across different domains, obtaining a set of candidate recommendation items composed of strong negative samples. This set of candidate recommendation items is then screened based on the interaction features of sample objects migrating across different domains, obtaining true strong negative samples for training a cross-domain recommendation model. Multiple rounds of screening improve the accuracy of the true strong negative samples obtained through screening, and the true strong negative samples obtained through screening are used to train a cross-domain recommendation model, which can improve the accuracy of the model's information recommendations in the target domain.

[0277] The above description is merely an embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, and improvements made within the spirit and scope of the present application are included in the scope of protection of the present application.

Claims

1. A sample processing method for a cross-domain recommendation model, the method being executed by an electronic device, the method comprising: Get multiple recommended projects in the target field; Fusing a first interaction feature of the sample object in the source domain and a second interaction feature in the target domain to obtain a fused interaction feature of the sample object; Determining a similarity index between the fused interaction feature and each of the recommended items; Filtering a plurality of strong negative samples from the plurality of recommended items based on the similarity index, and combining the plurality of strong negative samples into a candidate recommended item set; fusing a third interaction feature of the sample object's time-sensitive interaction behavior in the source domain and a fourth interaction feature representing a cluster center of the second interaction feature to obtain a migration interaction feature of the sample object; Based on a similarity index between the migration interaction feature and each of the recommended items in the candidate recommended item set, a plurality of true strong negative samples are screened out from the plurality of strong negative samples, wherein the plurality of true strong negative samples are used to train the cross-domain recommendation model.

2. The method according to claim 1, wherein: Before fusing the first interaction feature of the sample object in the source domain and the second interaction feature in the target domain to obtain the fused interaction feature of the sample object, the method further includes: Obtaining source domain items corresponding to each interactive behavior performed by the sample object in the source domain, performing feature extraction on each source domain item, and obtaining source domain item features; According to the order in which each of the interactive behaviors in the source domain is executed, combining each of the source domain project features into a first interactive feature in a sequence form; Obtaining target domain items corresponding to each interactive behavior performed by the sample object in the target domain, performing feature extraction on each target domain item, and obtaining target domain item features; According to the order in which each of the interactive behaviors in the target domain is executed, each of the target domain item features is combined into a second interactive feature in a sequence form.

3. The method according to claim 2, wherein: The fused interaction features include: a priori interaction features of the sample object in the target domain, and comprehensive interaction features of the sample object for the source domain and the target domain; The fusing the first interaction feature of the sample object in the source domain and the second interaction feature in the target domain to obtain the fused interaction feature of the sample object includes: Performing feature prediction on each of the source domain item features in the first interaction features in a sequence form to obtain a first prediction feature, wherein the first prediction feature is used to characterize the prior interaction behavior of the sample object in the source domain; Performing feature prediction based on each of the target domain item features in the second interaction features in a sequence form to obtain a second prediction feature, wherein the second prediction feature is used to characterize the prior interaction behavior of the sample object in the target domain; Calling a modified linear function to activate the first prediction feature and the second prediction feature to obtain a priori interaction features of the sample object in the target domain; The modified linear function is called to activate the following parameters to obtain the comprehensive interaction features of the sample object for the source domain and the target domain: the last source domain item feature in the first interaction feature in the sequence form, and the last target domain item feature in the second interaction feature in the sequence form.

4. The method according to claim 3, wherein: The determining of the similarity index between the fused interaction feature and each of the recommended items includes: Obtaining a first similarity index between the prior interaction feature of the sample object in the target field and the recommended item feature corresponding to each of the recommended items; A second similarity index between the comprehensive interaction feature of the sample object for the source field and the target field and the recommendation item feature corresponding to each of the recommendation items is obtained.

5. The method according to claim 4, wherein: The step of screening out a plurality of strong negative samples from the plurality of recommended items based on the similarity index, and combining the screened plurality of strong negative samples into a candidate recommended item set includes: Sort each of the recommended items in descending order according to the first similarity index, and combine at least part of the recommended items at the head of the descending sorting result into a first candidate set; Acquire a positive sample feature of a positive sample corresponding to the sample object, and acquire a third similarity index between the positive sample feature and a recommended item feature of each of the recommended items in the first candidate set; Deleting the recommended items whose third similarity index is greater than the first similarity threshold from the first candidate set to obtain a second candidate set; Each of the recommended items in the second candidate set is sorted in descending order according to the second similarity index, and at least part of the recommended items at the head of the descending sorting result are used as the multiple strong negative samples, and the multiple strong negative samples are combined into a candidate recommended item set.

6. The method according to any one of claims 2 to 5, wherein: Before fusing the third interaction feature of the sample object's time-sensitive interaction behavior in the source domain and the fourth interaction feature representing the cluster center of the second interaction feature to obtain the migration interaction feature of the sample object, the method further includes: The last source domain item feature in the first interaction feature in the sequence form is used as the third interaction feature, wherein the last source domain item feature is used to characterize the last interaction behavior performed by the sample object in the source domain; Obtaining a first ratio between the following parameters respectively corresponding to the plurality of sample objects: a second prediction feature of the sample object in the target domain and the number of objects in the object cluster to which the sample object belongs; Each of the first ratios is added together to obtain the fourth interaction feature.

7. The method according to claim 6, wherein: The migration interaction features include: a priori source domain migration interaction features of the sample object and source domain migration interaction features of the sample object; The step of fusing the third interaction feature of the sample object's interactive behavior with timeliness in the source domain and the fourth interaction feature representing the cluster center of the second interaction feature to obtain the migration interaction feature of the sample object includes: Calling a corrected linear function to activate the first prediction feature and the fourth interaction feature of the sample object to obtain a priori source domain migration interaction feature of the sample object; The modified linear function is called to activate the third interaction feature and the fourth interaction feature to obtain the source domain migration interaction feature of the sample object.

8. The method according to claim 7, wherein: The step of selecting a plurality of true strong negative samples from the plurality of strong negative samples based on a similarity index between the migration interaction feature and each of the recommended items in the candidate recommended item set comprises: Obtaining a fourth similarity index between the prior source domain migration interaction feature of the sample object and the recommended item feature corresponding to each of the recommended items; Sort each of the strong negative samples in the candidate recommendation item set in descending order according to the fourth similarity index, and combine at least part of the strong negative samples at the head of the descending sorting result into a third candidate set; Acquire a positive sample feature of a positive sample corresponding to the sample object, and acquire a third similarity index between the positive sample feature and a recommended item feature of each of the recommended items in the third candidate set; Deleting the recommended items whose third similarity index is greater than the second similarity threshold from the third candidate set to obtain a fourth candidate set; Obtaining a sixth similarity index between the source domain migration interaction feature of the sample object and the recommended item feature corresponding to each of the recommended items; Each of the recommended items in the fourth candidate set is sorted in descending order according to the sixth similarity index, and at least part of the recommended items at the head of the descending sorting result are used as true strong negative samples.

9. The method according to any one of claims 5 to 7, wherein: After obtaining a plurality of recommended items in the target field, the method further includes: Acquire the recommended item features of the plurality of recommended items, the item clusters to which they belong, and acquire the cluster center item features corresponding to each of the item clusters; Determine a clustering index corresponding to each of the project clusters based on the recommended project features of each of the recommended projects included in each of the project clusters and the cluster center project features; The sum of the ratios of the following parameters of each of the item clusters is used as the average clustering index corresponding to the plurality of recommended items: the clustering index of the item cluster and the number of clusters of the item cluster; Determine a decayed average clustering index based on a first difference between the current moment and the start moment of sample processing and the average clustering index; The smaller value between the average clustering index and the attenuated average clustering index is used as the first similarity threshold.

10. The method according to claim 9, wherein: The determining of the clustering index corresponding to each of the project clusters based on the recommended project features of each of the recommended projects included in each of the project clusters and the cluster center project features includes: The following processing is performed for each of the item clusters: Obtaining a first product between the transposition of each of the recommended item features in the item cluster and the cluster center item feature; respectively obtaining a second ratio between each of the first products and the number of recommended items in the item cluster; The sum of each of the second ratios is used as a clustering indicator of the item cluster.

11. The method according to claim 9 or 10, wherein: The step of determining the attenuated average clustering index based on the first difference between the current moment and the start moment of sample processing and the average clustering index comprises: Get the preconfigured period decay ratio, initial filtering index, and number of cycles for sample processing; Obtaining a third ratio between the average clustering index and the initial filtering index; Using the ratio between the first difference and the number of cycles as an exponent and the period decay ratio as a base to form a time decay parameter; The product of the third ratio and the time decay parameter is used as the decayed average clustering indicator.

12. The method according to any one of claims 1 to 11, wherein: After screening out a plurality of true strong negative samples from the plurality of strong negative samples based on the similarity index between the migration interaction feature and each of the recommended items in the candidate recommended item set, the method further comprises: Acquire a training sample set, wherein the training sample set includes: sample interaction features of sample objects, multiple sample recommendation items as positive samples, and multiple sample recommendation items as negative samples, wherein the negative samples include a preconfigured number of real strong negative samples, the sample label value of the negative samples is 0, and the sample label value of the positive samples is 1; Based on the training sample set, the initialized cross-domain recommendation model is called to predict the recommendation results, and the recommendation results corresponding to each of the sample recommendation items are obtained; Determining the loss function of the cross-domain recommendation model according to the difference between the recommendation result corresponding to each of the sample recommendation items and the sample label value; The parameters of the initialized cross-domain recommendation model are updated based on the loss function to obtain a trained cross-domain recommendation model.

13. The method according to claim 12, wherein: Determining the loss function of the cross-domain recommendation model according to the difference between the recommendation result corresponding to each of the sample recommendation items and the sample label value includes: The following processing is performed for each of the sample recommendation items: Multiplying the transposed matrix of the interactive feature matrix of the sample object and the matrix of the recommended item features of each of the sample recommended items to obtain the predicted probability of the sample recommended items; Obtaining a second product of the logarithm of the predicted probability and the sample label value of the sample recommendation item; Obtain a second difference between 1 and the sample label value, and obtain a logarithm of a third difference between 1 and the predicted probability; multiplying the logarithm of the second difference and the logarithm of the third difference to obtain a third product; The sum of the second product and the third product is used as a sub-loss of the sample recommendation item; Each of the sub-losses is added together to obtain the loss function of the cross-domain recommendation model.

14. A sample processing device for a recommendation model, the device comprising: a sample acquisition module configured to acquire a plurality of recommended items in a target domain; A sample acquisition module, configured to fuse a first interaction feature of a sample object in a source domain and a second interaction feature in a target domain to obtain a fused interaction feature of the sample object; A sample filtering module is configured to determine a similarity index between the fused interaction feature and each of the recommended items; based on the similarity index, filter out a plurality of strong negative samples from the plurality of recommended items, and combine the plurality of strong negative samples into a candidate recommended item set; The sample acquisition module is configured to fuse a third interaction feature of the sample object's time-sensitive interaction behavior in the source domain and a fourth interaction feature representing a cluster center of the second interaction feature to obtain a migration interaction feature of the sample object; The sample filtering module is configured to filter out a plurality of real strong negative samples from the plurality of strong negative samples based on a similarity index between the migration interaction feature and each of the recommended items in the candidate recommended item set, wherein the plurality of real strong negative samples are used to train the cross-domain recommendation model.

15. An electronic device, comprising: A memory for storing computer executable instructions; A processor, configured to implement the sample processing method of the recommendation model according to any one of claims 1 to 13 when executing the computer executable instructions or computer programs stored in the memory.

16. A computer-readable storage medium storing computer-executable instructions or a computer program, wherein the computer-executable instructions or the computer program, when executed by a processor, implements the sample processing method of the recommendation model according to any one of claims 1 to 13.

17. A computer program product, comprising computer executable instructions or a computer program, wherein the computer executable instructions or the computer program, when executed by a processor, implements the sample processing method of the recommendation model according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Cross user-based cross-domain recommendation method

    CN106951547A

  • A recommendation model training method and a related device

    CN109902708A

  • Recommendation model training method and device, equipment and storage medium

    CN114330654A

  • Recommendation model training method and device and electronic equipment

    CN114969489A

  • Resource recommendation method, and multi-target fusion model training method and apparatus

    WO2023040494A1

Cited By

  • Diversified judicial instruction data selection method and system based on large model perception

    CN119886229A

  • Cross-domain knowledge migration sequence recommendation method based on interest guidance

    CN120873295A

  • Intelligent matching management method and system for multi-channel-oriented institution course orders

    CN120951005A