Method, apparatus, and device for obtaining user feature representation and target object recommendation
By training a cross-domain universal user feature representation model, the problem that cross-domain enhancement cannot be achieved without overlapping users in the prior art is solved, and a common feature representation and effective cross-domain recommendation effect are achieved for different user domains.
Patent Information
- Application Number
- CN202110019725.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-07
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2041-01-07
AI Technical Summary
Existing cross-domain recommendation solutions cannot effectively enhance the recommendation effect of non-coinciding users, making it difficult to solve the problem of sparse data.
By training a user feature representation model that can be universal across domains, the model is trained based on sample behavior sequences of multiple user domains, generates a user's general feature representation vector, and sequence recommendation is performed through the target object recommendation model.
It realizes the common feature representation of different user domains, which can effectively solve the problem of sparse overlapping user data, and improves the cross-domain recommendation effect of non-coining users.
Smart Images

Figure CN114741584B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and particularly to the field of intelligent recommendation technology, and provides a method, device, and equipment for obtaining user feature representations and target object recommendations. Background Art
[0002] Currently, by analyzing big data to obtain user preferences and then recommending content that meets their preferences for users, a better network browsing experience can be provided for users. Any recommendation system needs to be built on a large amount of data, and data sparsity will directly affect the final recommendation effect.
[0003] The sequential recommendation model models the behavior sequence of each user to obtain the user's preferences to predict the items that the user may be interested in in the future. Therefore, relatively speaking, the sequential recommendation has higher requirements for the richness of user behavior than its traditional recommendation algorithms, and thus is more affected by data sparsity. To solve the problem of data sparsity in the sequential recommendation system, cross-domain information can be used for cross-domain recommendation. Cross-domain recommendation can use the auxiliary information learned from the source domain to improve the data sparsity problem in the target domain, thereby enhancing the recommendation in the target domain.
[0004] However, most of the existing cross-domain recommendation solutions currently can only act on the users in the overlapping part of the two domains, and there is no way to achieve cross-domain enhancement for non-overlapping users. However, in the actual system, the proportion of overlapping users in the two domains is very small, so such solutions are limited in improving the overall recommendation effect of the target domain. Summary of the Invention
[0005] Embodiments of this application provide a method, device, and equipment for obtaining user feature representations and target object recommendations, which are used to solve the problem that non-overlapping users cannot achieve cross-domain enhancement and to realize general feature representations for different user domains.
[0006] On the one hand, a method for obtaining a user feature representation is provided, and the method includes:
[0007] Based on the operation behavior of a target user in a target user domain for a target object, obtain the historical behavior sequence of the target user, where the historical behavior sequence includes multiple target objects operated by the target user in the target user domain;
[0008] Perform feature encoding on the historical behavior sequence through a trained user feature representation model to obtain a user feature representation vector of the target user;
[0009] Among them, the user feature representation model is trained based on the sample behavior sequences of each user in multiple user domains. When training the user feature representation model, the user feature representation vectors corresponding to each sample behavior sequence are respectively obtained through the user feature representation model, and the probability values of the corresponding user belonging to each user domain are obtained based on each user feature representation vector. When the difference degree between any two of the obtained probability values of the corresponding user belonging to each user domain is not greater than the preset difference degree threshold, the user feature representation model converges.
[0010] On the one hand, a target object recommendation method is provided, and the method includes:
[0011] Obtain the historical behavior sequence of the target user in the target user domain;
[0012] Perform feature encoding on the historical behavior sequence through the method of obtaining user feature representation in the above aspect to obtain the first user feature representation vector of the target user;
[0013] Determine at least one target object recommended for the target user through the trained target object recommendation model according to the first user feature representation vector and the short-term behavior sequence of the target user; the short-term behavior sequence includes the M target objects closest to the current moment in the historical behavior sequence.
[0014] Among them, the target object recommendation model is trained based on multiple training samples. Each training sample includes a user's user feature representation vector and a historical behavior sequence. And in each training process, the target object recommendation model predicts at least one target object according to the user feature representation vector included in each training sample and the first M target objects among the N target objects included in the historical behavior sequence, and updates the target object recommendation model according to the difference degree between the at least one target object and the remaining N - M target objects, where N and M are positive integers.
[0015] Optionally, determining at least one target object recommended for the target user through the trained target object recommendation model according to the first user feature representation vector and the short-term behavior sequence of the target user includes:
[0016] Perform feature encoding on the first user feature representation vector and the short-term user behavior sequence to obtain the second user feature representation vector of the target user;
[0017] Determine the at least one target object according to the similarity between the object feature representation vector of the target object included in the target user domain and the second user feature representation vector.
[0018] On the one hand, a device for obtaining user feature representations is provided. The device includes:
[0019] A data acquisition unit, configured to obtain a historical behavior sequence of the target user according to the operation behavior of the target user in the target user domain for the target object. The historical behavior sequence includes multiple target objects operated by the target user in the target user domain;
[0020] A feature encoding unit, configured to perform feature encoding on the historical behavior sequence through a trained user feature representation model to obtain a user feature representation vector of the target user;
[0021] Wherein, the user feature representation model is trained according to the sample behavior sequences of each user in multiple user domains. When training the user feature representation model, the user feature representation vectors corresponding to the respective sample behavior sequences are respectively obtained through the user feature representation model, and the probability values of the corresponding users belonging to each user domain are obtained based on each user feature representation vector. When the difference degree between any two of the obtained probability values of the corresponding users belonging to each user domain is not greater than a preset difference degree threshold, the user feature representation model converges.
[0022] Optionally, the device further includes a model training unit, a decoding unit, and a domain identification unit;
[0023] The data acquisition unit is further configured to obtain a sample behavior sequence set, which contains the sample behavior sequences of each user in multiple user domains;
[0024] The model training unit is configured to perform cyclic iterative training on the user feature representation model based on the sample behavior sequence set. One training process includes the following steps:
[0025] Call the feature encoding unit to perform feature encoding on the obtained respective sample behavior sequences to respectively obtain the corresponding user feature representation vectors;
[0026] Call the domain identification unit to respectively determine multiple attribution probabilities of the corresponding users belonging to each user domain based on the obtained respective user feature representation vectors, and each user domain corresponds to one attribution probability;
[0027] If it is determined that the user feature representation model satisfies the convergence condition based on the multiple attribution probabilities corresponding to each user, the training ends; the convergence condition at least includes: among the multiple attribution probabilities corresponding to any user, the difference degree between any two attribution probabilities is not greater than the preset difference degree threshold;
[0028] When it is determined that the user feature representation model does not meet the convergence condition based on the belonging probabilities corresponding to the respective users, the parameters of the user feature representation model are adjusted based on the belonging probabilities corresponding to the respective users.
[0029] Optionally, the model training unit is further configured to:
[0030] Call the decoding unit to obtain a predicted behavior sequence for each corresponding user based on the obtained user feature representation vectors of the respective users, and determine a loss value based on the comparison results between the obtained predicted behavior sequences and the corresponding sample behavior sequences;
[0031] Then the convergence condition further includes: the loss value is not greater than a preset loss value threshold.
[0032] Optionally, at least one overlapping user is included in the multiple user domains, and the user identifiers of the overlapping user in the multiple user domains are the same. Then the convergence condition further includes:
[0033] For each overlapping user, the similarity between any two user feature representation vectors among the user feature representation vectors obtained based on the sample behavior sequences of the overlapping user in each user domain is not less than a preset similarity threshold.
[0034] Optionally, the feature encoding unit is specifically configured to:
[0035] Obtain the content feature representation vector and the position feature representation vector of each target object in the sample behavior sequence; the position feature representation vector is used to characterize the position information of the target object in the sample behavior sequence;
[0036] Obtain the object feature representation vectors of the respective target objects according to the obtained content feature representation vectors and position feature representation vectors of the respective target objects;
[0037] Perform feature encoding on the obtained object feature representation vectors of the respective target objects through at least one encoder included in the user feature representation model to respectively obtain the self-attention representation vectors of the respective target objects; the output of the previous encoder in two adjacent encoders among the at least one encoder is the input of the subsequent encoder;
[0038] Select one self-attention representation vector from the self-attention representation vectors of the respective target objects output by the last encoder and determine it as the user feature representation vector corresponding to the sample behavior sequence.
[0039] Optionally, the feature encoding unit is specifically configured to:
[0040] Obtain at least one weight representation vector corresponding to each of the target objects respectively according to the object feature representation vectors of the respective target objects and at least one attention weight matrix included in an encoder; wherein, each weight representation vector corresponds to an attention weight matrix.
[0041] Obtain intermediate representation vectors of the respective target objects respectively according to the at least one weight representation vector corresponding to each of the target objects.
[0042] Perform activation processing on the intermediate representation vectors of the respective target objects to obtain self-attention representation vectors of the respective target objects respectively.
[0043] Optionally, the at least one attention weight matrix includes a query vector weight matrix, a key vector weight matrix, and a value vector weight matrix, and the feature encoding unit is specifically configured to:
[0044] Obtain corresponding query vectors, key vectors, and value vectors respectively according to the object feature representation vectors of the respective target objects and the query vector weight matrix, the key vector weight matrix, and the value vector weight matrix; for each of the target objects, perform the following operations respectively:
[0045] Obtain attention weight values corresponding to the respective target objects respectively according to the query vector of a target object and the key vectors of the respective target objects in the historical behavior sequence; the attention weight values are used to characterize the degree of association between the respective target objects and the one target object.
[0046] Obtain the intermediate representation vector of the one target object according to the value vectors of the respective target objects and the attention weight values corresponding to the respective target objects.
[0047] Optionally, the feature encoding unit is specifically configured to:
[0048] Obtain the similarity between the query vector of the one target object and the key vectors of the respective target objects respectively.
[0049] Perform dimensionality reduction processing and normalization processing on each similarity value respectively to obtain the attention weight values corresponding to the respective target objects.
[0050] Optionally, the respective target objects include a termination identification object, and the termination identification object is used to represent the end of the sequence, and the model training unit is specifically configured to:
[0051] Select the self-attention representation vector corresponding to the termination identification object and determine it as the user feature representation vector corresponding to the sample behavior sequence.
[0052] Optionally, the decoding unit is specifically configured to:
[0053] Determine the respective self-attention representation vectors corresponding to the respective user feature representation vectors; wherein, the positional relationship of the respective self-attention representation vectors corresponds to the positional relationship of the corresponding target object in the sample behavior sequence.
[0054] For each of the self-attention representation vectors, perform the following operations respectively: Decode according to a self-attention representation vector and the self-attention representation vectors located before the one self-attention representation vector to obtain the target object corresponding to the one self-attention representation vector.
[0055] Combine the target objects corresponding to the respective self-attention representation vectors obtained by decoding according to the positional relationship of the respective self-attention representation vectors to obtain the predicted behavior sequence.
[0056] On the one hand, a target object recommendation device is provided, and the device includes:
[0057] A data acquisition unit for acquiring the historical behavior sequence of a target user in a target user domain.
[0058] A feature encoding unit for performing feature encoding on the historical behavior sequence by the method of obtaining user feature representations in the above aspect to obtain the first user feature representation vector of the target user.
[0059] An object recommendation unit for determining at least one target object recommended for the target user according to the first user feature representation vector and the short-term behavior sequence of the target user through a trained target object recommendation model; the short-term behavior sequence includes the M target objects closest to the current moment in the historical behavior sequence.
[0060] Wherein, the target object recommendation model is trained according to a plurality of training samples, each training sample includes a user feature representation vector of a user and a historical behavior sequence, and in each training process, the target object recommendation model predicts at least one target object according to the user feature representation vector included in each training sample and the first M target objects among the N target objects included in the historical behavior sequence, and updates the target object recommendation model according to the difference degree between the at least one target object and the remaining N - M target objects, and N and M are positive integers.
[0061] Optionally, the object recommendation unit is specifically configured to:
[0062] Perform feature encoding on the first user feature representation vector and the short-term user behavior sequence to obtain the second user feature representation vector of the target user.
[0063] Determine the at least one target object according to the similarity between the object feature representation vector of the target object included in the target user domain and the second user feature representation vector.
[0064] On the one hand, a computer device is provided, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of any of the above methods are implemented.
[0065] On the one hand, a computer storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps of any of the above methods are implemented.
[0066] On the one hand, a computer program product or a computer program is provided. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the steps of any of the above methods.
[0067] In the embodiments of the present application, the user feature representation model is trained by multiple sample behavior sequences of multiple user domains. When training, the user feature representation vector is encoded through the user feature representation model, and the user domain discrimination is performed according to the user feature representation vector. When the difference degrees of the probability values of any two user domains among the obtained probability values of the corresponding users belonging to each user domain are very small, it can be considered that the user domain to which the user belongs cannot be discriminated based on the user feature representation vector, so that the user feature representation vector can become a general feature representation of the user in each user domain. Furthermore, the trained user feature representation model can act on non-overlapping users in cross-domains, fundamentally solving the problem of sparse data of overlapping users, and also solving the problem that non-overlapping users cannot achieve cross-domain enhancement, and realizing the general feature representation of different user domains. Description of the Drawings
[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only the embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained according to the provided drawings without creative efforts.
[0069] Figure 1 It is a schematic diagram of the scenario provided by the embodiments of the present application;
[0070] Figure 2 It is a schematic diagram of the cross-domain sequence recommendation framework provided by the embodiments of the present application;
[0071] Figure 3 Schematic diagram of the training process of the user feature representation model provided by the embodiment of the present application;
[0072] Figure 4 Schematic diagram of the training architecture of the user feature representation model provided by the embodiment of the present application;
[0073] Figure 5 Schematic diagram of a structure of the user feature representation model provided by the embodiment of the present application;
[0074] Figure 6 Schematic diagram of the process for obtaining the object feature representation vector provided by the embodiment of the present application;
[0075] Figure 7 Schematic diagram of the processing process of the Multi-Head Attention layer provided by the embodiment of the present application;
[0076] Figure 8 Schematic diagram of the processing flow of the object feature representation vector provided by the embodiment of the present application;
[0077] Figure 9 Schematic diagram of the method process for obtaining the user feature representation provided by the embodiment of the present application;
[0078] Figure 10 Schematic diagram of the process of the target object recommendation method provided by the embodiment of the present application;
[0079] Figure 11 Schematic diagram of a structure of the device for obtaining the user feature representation provided by the embodiment of the present application;
[0080] Figure 12 Schematic diagram of a structure of the target object recommendation device provided by the embodiment of the present application;
[0081] Figure 13 Schematic diagram of a structure of the computer device provided by the embodiment of the present application. Detailed implementation manners
[0082] To make the objectives, technical solutions, and advantages of the present application clearer and more understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application. Without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other arbitrarily. And although the logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than here.
[0083] To facilitate the understanding of the technical solutions provided in the embodiments of the present application, some key terms used in the embodiments of the present application are explained herein first:
[0084] Target object: It may include any object involved in the network. For example, it may include audio, video, image, commodity, text, etc.
[0085] User behavior sequence: It is a sequence composed of the objects to be operated on which the user's operation behaviors are directed. Taking the streaming media object as a video as an example, the user behavior sequence may be multiple videos played by the user in the past. For example, if the order of the videos played by the user in the past is v1, v2, v3, and v4 in sequence, then the user behavior sequence of this user may be {v1, v2, v3, v4}.
[0086] User domain: A user domain includes multiple users with common attributes. For example, the common attribute may be belonging to the same network platform. Then, the users in a network platform can form a user domain. The same user can register accounts belonging to each network platform on different network platforms. For example, a user can register an account on a certain video website, or register an account on a certain audio website, or register an account on a certain social platform. These accounts belong to different network platforms, but the user information used for registering the accounts can be the same. For example, the same mobile phone number can be used for registration. Then, based on the mobile phone number as the user identifier, it can be known that these accounts actually correspond to the same user; or, the common attribute can also be having the same or similar tag attributes. For example, the users in a network platform are divided into domains according to tag attributes (such as hobbies or user types), etc. Users with the same or similar tag attributes belong to a user domain. Similarly, a user can have multiple tag attributes, so a user may appear in multiple user domains.
[0087] User feature representation vector: Also known as user portrait. Briefly speaking, it is to use a vector to represent a user or a certain feature of a user. Taking videos as an example, the portrait of the user in terms of videos can express the user's preference for videos and can assist in providing personalized video recommendations for the user.
[0088] Attention Mechanism: The essence of the attention mechanism comes from the human visual attention mechanism. When people perceive things visually, they generally don't look at an entire scene from beginning to end every time. Instead, they often observe and focus on specific parts according to their needs. Moreover, when people find that a certain part of a scene often appears with the things they want to observe, they will learn to focus on that part when a similar scene appears in the future. Therefore, the attention mechanism is essentially a means of screening out high-value information from a large amount of information. Among a large amount of information, the importance of different information for the result is different, and this importance can be reflected by assigning different weights. In other words, the attention mechanism can be understood as a rule for allocating weights when synthesizing multiple sources. Specifically, the attention mechanism realizes the mapping from a query and a series of key-value pairs to an output result. Among them, the query, key, and value are all vectors, and the output result is calculated by weighted summation of the values, and the weight corresponding to each value is calculated by a compatibility function through the query and the key. That is:
[0089]
[0090] Attention(Query, Source) represents the output result obtained based on the attention mechanism. Similarity can be the weight calculated based on the Softmax normalization function. The parameter of the Softmax normalization function is the query vector, and Source is the set of key-value pairs, L x is the length of Source, or the number of key-value pairs in Source. The above description is for a single attention mechanism. In a single attention mechanism, a single set of query can be used. In a multi-head attention mechanism, there are multiple sets of query. After calculating the results by weighted averaging for each set of query respectively, finally, multiple sets of results are concatenated and other operations are performed to obtain the final result.
[0091] Cross-domain recommendation can utilize the auxiliary information learned from the source domain to improve the problem of data sparsity in the target domain, thereby enhancing the recommendation in the target domain. It is an effective method to solve the data sparsity problem in sequential recommendation. However, most existing cross-domain recommendation solutions can only act on the users in the overlapping part of the two domains, and there is no way to achieve cross-domain enhancement for non-overlapping users. For example, in the related technology, through the method of a mapping function, a mapping function can be learned through the information of the overlapping users in the two domains, which can map the user representation from one domain to another, so as to enhance the user representation in one domain with the user representation in the other domain. However, the accuracy of the mapping function is still restricted by the proportion of overlapping users in the two domains. When the proportion of overlapping users in the two domains is very small, it is still limited in improving the overall recommendation effect in the target domain.
[0092] Therefore, the sequential recommendation models obtained by relying on the information of overlapping users cannot get rid of the influence of data sparsity. In order to fundamentally solve the problem of data sparsity, it is necessary to combine the information of non-overlapping users in multiple domains.
[0093] In view of this, the embodiment of the present application provides a method for obtaining user feature representation. In this method, the user feature representation model is trained by multiple sample behavior sequences in multiple user domains. And during training, the user feature representation vector is encoded through the user feature representation model, and the user domain is discriminated according to the user feature representation vector. When the difference degree of the probability values of any two user domains is very small among the probability values of the corresponding users belonging to each user domain obtained, it can be considered that the user domain to which the user belongs cannot be discriminated based on the user feature representation vector, so that the user feature representation vector can become the general feature representation of the user in each user domain. Furthermore, the trained user feature representation model can act on non-overlapping users in cross-domain, so as to fundamentally solve the problem of data sparsity of overlapping users, and also solve the problem that non-overlapping users cannot achieve cross-domain enhancement, and realize the general feature representation of different user domains.
[0094] After introducing the design idea of the embodiment of the present application, the technologies involved in the embodiment of the present application will be briefly introduced below.
[0095] Artificial Intelligence (AI) is to use a digital computer or a machine controlled by a digital computer to simulate, extend and expand human intelligence, sense the environment, acquire knowledge and use knowledge to obtain the best results of theory, method, technology and application system. In other words, artificial intelligence is a comprehensive technology of computer science. It attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a way similar to human intelligence. Artificial intelligence is also to study the design principles and implementation methods of various intelligent machines, so that the machines have the functions of perception, reasoning and decision-making.
[0096] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. The basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, and mechatronics. The software technologies of artificial intelligence mainly include several major directions such as computer vision technology, speech processing technology, natural language processing technology, and machine learning / deep learning.
[0097] Machine Learning (ML) is an interdisciplinary field that involves multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve their own performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent, and its applications cover all fields of artificial intelligence. Machine learning and deep learning usually include technologies such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and rote learning.
[0098] The solution provided in the embodiments of this application mainly relates to technologies such as machine learning / deep learning under the field of artificial intelligence. Specifically, through the method provided in this application, a user feature representation model is obtained through machine learning, and then the general feature representation of users in any user domain can be obtained based on this user feature representation model, and then it can be extended to each user domain for sequence recommendation. This will be specifically described through subsequent embodiments.
[0099] Next, a simple introduction will be made to the application scenarios applicable to the technical solution of the embodiments of this application. It should be noted that the application scenarios introduced below are only used to illustrate the embodiments of this application and are not restrictive. In the specific implementation process, the technical solution provided in the embodiments of this application can be flexibly applied according to actual needs.
[0100] The solution provided in the embodiments of this application can be applied to most scenarios that require sequence recommendation, such as video recommendation scenarios, short video recommendation scenarios, audio recommendation scenarios, recommendation scenarios for texts such as news, and product recommendation scenarios.
[0101] Please refer to Figure 1 As shown, it is a schematic diagram of a scenario applicable to the embodiments of this application. This scenario includes servers 101 and 102 in multiple user domains.
[0102] Both server 101 and server 102 can be independent physical servers, or server clusters or distributed systems composed of multiple physical servers. They can also be cloud servers that provide 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, but are not limited thereto.
[0103] Server 101 can be the background server corresponding to each user domain. For example, it can be the background server of a video website, an audio website, a news website, or a shopping platform. Server 101 can store user information of each user domain, such as information about the target objects of each user's historical operation behaviors.
[0104] Server 102 can include one or more processors 1021, a memory 1022, and an I / O interface 1023 for interacting with the terminal. In addition, server 102 can also be configured with a database 1024, which can be used to store the user feature representation vectors of each user obtained through learning and the model parameters obtained through training. Among them, server 102 can be, for example, a dedicated server for obtaining user feature representation vectors, or the background server of a certain user domain.
[0105] In a possible implementation manner, program instructions of the method for obtaining the representation vector of a user provided in the embodiments of the present application can be stored in the memory 1022 of server 102. When these program instructions are executed by the processor 1021, they can be used to implement the steps of the method for obtaining the user feature representation provided in the embodiments of the present application to obtain a user feature representation model, and the feature representation vector of the user regarding the target object can be obtained based on this model. For example, after obtaining the user feature representation model, based on the request of server 101, which is used to request the user feature representation vectors of each user included in itself, server 102 responds to this request, performs feature encoding based on the historical user behavior sequence of the user to obtain the user feature representation vector, and returns it to server 101.
[0106] In addition, program instructions of the target object recommendation method provided in the embodiments of the present application can also be stored in the memory 1022 of server 102. When these program instructions are executed by the processor 1021, they can be used to implement the steps of the target object recommendation method provided in the embodiments of the present application, and personalized target object recommendations can be made for the user based on the feature representation vector of the user obtained by the above method. For example, server 101 can request server 102 to determine the target object recommended for the target user. After server 102 determines the target object recommended for the target user, it returns it to server 101.
[0107] In another possible implementation, the server 102 obtains a user feature representation model through the steps of the method for obtaining user feature representations provided in the embodiments of the present application. Then, the server 102 can send the user feature representation model to each server 101. Subsequently, the server 101 can obtain the user feature representation vectors of each user included therein based on the trained user feature representation model. Similarly, the server 102 obtains a target object recommendation model through the steps of the method for target object recommendation provided in the embodiments of the present application. Then, the server 102 can send the target object recommendation model to each server 101. Subsequently, the server 101 can determine the target objects recommended for each user included therein based on the trained target object recommendation model.
[0108] The server 101 and the server 102 can be directly or indirectly communicatively connected through one or more networks 103. The network 103 can be a wired network or a wireless network. For example, the wireless network can be a mobile cellular network or a Wireless-Fidelity (WIFI) network. Of course, it can also be other possible networks, and the embodiments of the present invention do not limit this.
[0109] Taking the short video recommendation scenario as an example, the server 102 can obtain the user behavior data of multiple users from multiple user domains. For example, it can obtain the user behavior data of multiple short video users from the back-end server of the target short video application, the user behavior data of multiple video users from the back-end server of the video application, and the user behavior data of multiple audio users from the back-end server of the audio application. Then, it can obtain multiple sample behavior sequences based on the user behavior data of multiple user domains, and train the user feature representation model through the multiple sample behavior sequences, so that the user feature representation vectors obtained by the user feature representation model can express the information of the original sample behavior sequences. And when performing domain discrimination on the user based on the user feature representation vector, it is impossible to determine which user domain the user specifically belongs to. At this time, the general representation of the user with respect to each user domain is obtained.
[0110] Furthermore, the user feature representation model obtained from the above training and the sequential recommendation model are trained together to obtain a target object recommendation model for cross-domain sequential recommendation. Among them, the target object at the front of the above sample behavior sequence can be used as the input. After the user feature representation model encodes its features to obtain the user feature representation vector of the user, the target objects recommended for each user can be predicted through the sequential recommendation model. When the model reaches the convergence condition, the obtained target object recommendation model can be applied to a specific short video recommendation scenario. Since the user feature representation model is a model that can generally represent users, even if the data of the short video application is not used during training, it can still be applied to the sequential recommendation of this short video application.
[0111] In addition, after obtaining the user feature representation model as described above, the user feature representation vectors of each user in the short video application can be obtained through the user feature representation model. Then, based on the user feature representation vectors of each user and the short-term behavior sequence, the target object recommendation model is trained to obtain the target object recommendation model and applied to the sequential recommendation of the short video application.
[0112] Of course, the method provided in the embodiments of the present application is not limited to Figure 1 the application scenarios shown, and can also be used in other possible application scenarios, which are not limited in the embodiments of the present application. The functions that can be realized by each device in Figure 1 the application scenarios shown will be described together in the subsequent method embodiments, and will not be elaborated here too much.
[0113] Before introducing the method of the embodiments of the present application, first introduce the network framework provided by the embodiments of the present application. Please refer to Figure 2 , which is a schematic diagram of the cross-domain sequential recommendation framework provided by the embodiments of the present application. This framework is a network framework that combines general feature representation and cross-domain sequential recommendation (General User Representation based-Cross Domain Sequential Recommender, GUR-CDSR). It is specifically composed of two parts, namely Figure 2 the General User Representation based (GUR) module and the Cross Domain Sequential Recommender (CDSR) module shown. Among them, the GUR module is used to represent the features of users according to the historical behavior sequences of users, and the CDSR mode is used to perform sequential recommendation on the user feature representation obtained by the GUR module.
[0114] Specifically, when applied to an actual target object recommendation scenario, the GUR module is a user feature representation model, and the CDSR module is a target object recommendation model. The input of the GUR module is a historical behavior sequence of a user, and the input of the CDSR module is the output of the GUR module, that is, the feature representation vector of the user. Furthermore, the CDSR module performs sequence recommendation based on the feature representation vector of the user and the short-term behavior sequence. Alternatively, GUR-CDSR as a whole forms a target object recommendation model. When in use, a historical behavior sequence of a user is input, and then the recommended sequence of the user is output.
[0115] In actual application, the user feature representation model and the target object recommendation model can be trained separately. For example, the user feature representation model can be pre-trained first, and then the user feature representation is obtained through the user feature representation model. Then, the target object recommendation model is trained based on the user feature representation. It is also possible to pre-train the user feature representation model first. When the user feature representation model converges, the user feature representation model and the target object recommendation model are jointly trained to further adjust the user feature representation model, thereby further improving the accuracy of the user feature representation model. Alternatively, the user feature representation model and the target object recommendation model can also be directly jointly trained. The embodiments of the present application do not limit this.
[0116] According to Figure 2 shown, the recommendation of the target object can essentially be divided into two stages: user feature representation and obtaining the recommended sequence. First, the user feature representation stage will be introduced below. Since the user feature representation is obtained through the trained user feature representation model, first, the training process of the user feature representation model will be introduced below. Refer to Figure 3 and Figure 4 shown, Figure 3 is a schematic diagram of the training process of the user feature representation model, Figure 4 is a schematic diagram of the training architecture of the user feature representation model.
[0117] Step 301: Obtain a sample behavior sequence set composed of sample behavior sequences of each user in multiple user domains.
[0118] In the embodiments of the present application, in order to obtain a user feature representation model that can generally represent users, the behavior sequences of multiple users in multiple user domains can be selected as sample behavior sequences to train the model. A behavior sequence includes multiple target objects operated by a user in a user domain. For example, for a video platform, a behavior sequence can be multiple videos played by a user on the video platform. Alternatively, for a news platform, a behavior sequence can be news browsed by a user on the news platform.
[0119] It should be understood that the statuses of multiple sample behavior sequences obtained from multiple user domains are equivalent. For example, if 1000 sample behavior sequences are obtained from a video platform and 1500 sample behavior sequences are obtained from a news platform, then a total of 2500 sample behavior sequences can be obtained and used together as training samples to train the user feature representation model. Alternatively, as Figure 4 shown, the 1000 sample behavior sequences obtained from the video platform can be used to train the user feature representation model corresponding to the video platform. In addition, the 1500 sample behavior sequences obtained from the news platform can be used to train the user feature representation model corresponding to the news platform. Then, according to Figure 4 the idea of adversarial training shown, adversarial training is performed on the user feature representation models corresponding to the two platforms.
[0120] In the embodiments of the present application, the lengths of the sample behavior sequences in different user domains can be the same or different. Figure 4 Taking two domains as an example, namely user domain A and user domain B, their corresponding lengths are 5 and 4 respectively. And the lengths of the sample behavior sequences corresponding to different users can be the same or different. In the specific implementation process, in order to reduce the processing difficulty of the model, the lengths of all sample behavior sequences can be unified, that is, the lengths of all obtained sample behavior sequences are the same.
[0121] In the embodiments of the present application, since the sample sequences in different user domains may be different, different user domains can correspond to their respective user feature representation models. However, as Figure 4 shown, the overall structures of the user feature representation models in each user domain are the same, and the difference lies in that the number of parameters of each user feature representation model may be different.
[0122] Step 302: Perform feature encoding on each sample behavior sequence to obtain corresponding user feature representation vectors respectively.
[0123] In the embodiments of the present application, the user feature representation model can adopt any network model that can perform sequence learning. For example, it can be a Recurrent Neural Network (RNN) model, a Long Short-Term Memory (LSTM) model, or a transformer model, etc.
[0124] As Figure 5 shown, it is a schematic structural diagram of a user feature representation model. Among them, the user feature representation model includes a vectorization layer ( Figure 5 not shown), multiple encoders, and multiple decoders. The number of encoders and decoders can be set according to actual needs, for example, it can be 6 or 8, etc. The embodiments of the present application do not limit this.
[0125] As shown Figure 4 in the figure, during the training process, the sample behavior sequence of user i in user domain A and the sample behavior sequence of user j in user domain B both need to be processed through a vectorization layer, an encoder, and a decoder layer. Thus, it can be seen that for any sample behavior sequence, the processing process of the feature representation model is similar. Therefore, the following mainly takes the processing process of a sample behavior sequence as an example for introduction.
[0126] In the embodiments of the present application, as Figure 4 shown in the figure, before the encoder performs feature encoding to obtain the user feature representation vector, it is necessary to perform vectorization processing on each target object to obtain the object feature representation vector of each target object. For the sample behavior sequence of user i the object feature representation vector of each target object can be obtained through the following process:
[0127]
[0128] Among them, is the sequence of object feature representation vectors obtained based on the behavior sequence S i represents the L-th target object in the sample behavior sequence of user i, where L is the length of the sample behavior sequence, and eos is the termination identification object in the sequence. The termination identification object is located at the last position in the sample behavior sequence and is used to represent the end of the sequence.
[0129] Specifically, for each target object in the sample behavior sequence, its content feature representation vector and position feature representation vector can be obtained respectively. Then, based on the content feature representation vector (item embedding) and position feature representation vector (positional embedding) of each target object, the object feature representation vector of each target object can be obtained. Among them, item embedding is used to represent the object information included in each target object itself, that is, the target object itself. The item embedding of the same target object appearing in different sample behavior sequences is the same. Positional embedding is used to represent the position information of the target object in the sample behavior sequence. The positional embedding of the target object at the same position in different sample behavior sequences expresses approximately the same meaning.
[0130] As Figure 6 As shown in the figure, it is a schematic diagram of the process for obtaining the object feature representation vector of the target object in a sample behavior sequence. Among them, after obtaining the item embedding and positional embedding of each target object respectively, the sum of the item embedding and the positional embedding is calculated to represent a specific target object in the sample behavior sequence.
[0131] In specific applications, both the item embedding and the positional embedding are trainable vectors. When initializing, they can be initialized according to the actual content of each target object. For example, the item embedding can be extracted using algorithms such as Word2Vec or Convolutional Neural Networks (CNN), and the positional embedding can be obtained through formula calculation. Or, the item embedding and the positional embedding can also be randomly initialized. During the training process, the item embedding and the positional embedding are adjusted together with the training process of the model as the parameters of the model.
[0132] As Figure 4 shown, after obtaining the object feature representation vectors corresponding to each target object in each sample behavior sequence, the object feature representation vectors corresponding to each target object can be input into the encoder, and feature encoding is performed through the encoder of the user feature representation model. For the sample behavior sequence of user i The object feature representation vectors of each target object can be obtained through the following process:
[0133]
[0134] Among them, is the sequence composed of self-attention representation vectors obtained based on the behavior sequence S i and h i corresponds to eos.
[0135] As Figure 5 shown, the encoder of the user feature representation model is at least one cascaded encoder, and the output of the previous encoder in two adjacent encoders among the at least one encoder is the input of the subsequent encoder. In each encoder, it includes a Multi-Head Attention layer, a Feed Forward layer, and an Add&norm layer.
[0136] Specifically, the Multi-Head Attention layer obtains information about each target object and sequence information in the behavior sequence of each sample based on the Multi-Head Attention mechanism. Refer to Figure 7 As shown in the figure, it is a schematic diagram of the processing process of the Multi-Head Attention layer. Among them, the Multi-Head Attention layer includes at least one Attention layer. In specific applications, the number of Attention layers can be set according to actual needs. For example, it can be 2 or 8, etc. The input of each Attention layer is a set composed of the object feature representation vectors of each target object in the behavior sequence of each sample, and each Attention layer corresponds to at least one attention weight matrix. Through the object feature representation vectors of each target object and at least one attention weight matrix, at least one weight representation vector corresponding to each target object can be obtained respectively. One target object corresponds to at least one weight representation vector, and each weight representation vector corresponds to an attention weight matrix.
[0137] As Figure 8 shown, it is a processing flow chart of an object feature representation vector. Among them, at least one attention weight matrix includes a query vector weight matrix W Q , a key vector weight matrix Q K and a value vector weight matrix Q V . For an object feature representation vector, the object feature representation vector is multiplied by the query vector weight matrix W Q , the key vector weight matrix Q K and the value vector weight matrix Q V respectively, and then the corresponding query vector Q, key vector K and value vector V can be obtained respectively. Then, for a sample behavior sequence, that is, the matrix composed of the object feature representation vectors of the target objects included in the sample behavior sequence, it is multiplied by the query vector weight matrix W Q , the key vector weight matrix Q K and the value vector weight matrix Q V respectively, to obtain the query vector matrix, key vector matrix and value vector matrix of the sample behavior sequence.
[0138] Furthermore, according to at least one weight representation vector corresponding to each target object, the intermediate representation vector of the target object can be obtained respectively.
[0139] Specifically, the attention weight values corresponding to each target object can be obtained respectively according to the query vector of each target object and the key vectors of each target object. The attention weight values are used to represent the degree of association between each target object and the target object. Furthermore, according to the value vectors of each target object and the attention weight values corresponding to each target object, the intermediate representation vector of the target object is obtained.
[0140] Among them, for any target object, the process of obtaining its attention weight is similar. Therefore, here, taking target object A as an example, the attention weight value of target object A is obtained in the following way:
[0141] Calculate the similarity between the query vector of target object A and the key vectors of each target object in the sequence respectively, and perform dimensionality reduction processing and normalization processing on each similarity value respectively to obtain the attention weight values corresponding to each target object. The attention weight values are used to represent the degree of association between each target object and the target object. The dimensionality reduction processing can be achieved, for example, by dividing by the dimension of the vector.
[0142] Exemplarily, when a sample behavior sequence includes 4 target objects Then when obtaining the intermediate representation vector of, the similarity between the query vector of and the key vector of can be obtained, and then the dimensionality reduction processing and normalization processing are performed on the similarity value to obtain the corresponding attention weight values respectively. Furthermore, according to the corresponding attention weight values and value vectors respectively, the intermediate representation vector of can be obtained.
[0143] For each sample behavior sequence, through the above process, each Attention layer can obtain an intermediate representation sub-vector of each target object in the sequence, forming a set of intermediate representation sub-vectors of the sequence. Furthermore, the set of intermediate representation sub-vectors is concatenated by columns to obtain a large matrix, and the intermediate representation vector set of the sequence is obtained by performing a fully connected process on the matrix. Each intermediate representation vector in the set corresponds to a target object in the sequence.
[0144] Please continue to refer to Figure 5As shown in the figure, after obtaining the intermediate representation vectors of each target object in each sample behavior sequence through the multi-head attention layer, activation processing is performed through the Feed Forward layer and the Add&norm layer to obtain the self-attention representation vectors of each target object. The positional relationship of each self-attention representation vector corresponds to the positional relationship of the corresponding target object in the sample behavior sequence. Among them, the Add&norm layer consists of two parts: residual connection (Add) and normalization (Norm). Among them, the residual connection is to add the input and the obtained intermediate representation vector and then perform the next processing. Norm can accelerate the convergence speed of the model. The Feed Forward layer consists of multiple fully connected layers, and linear activation processing is performed through multiple fully connected layers.
[0145] In the embodiments of the present application, the self-attention representation vectors corresponding to each target object in each sample behavior sequence output by the last encoder all contain all object information and sequence information in the sequence. Therefore, one of the self-attention representation vectors can be selected as the encoded output of the sample behavior sequence, that is, as the user feature representation vector of the user. For example, the self-attention representation vector corresponding to the last position, that is, eos, can be selected as the user feature representation vector of the user.
[0146] Step 303: Based on each user feature representation vector, decode to obtain the corresponding predicted behavior sequence respectively.
[0147] As Figure 4 shown, after obtaining the corresponding user feature representation vectors according to each sample behavior sequence, each user feature representation vector can be input into the decoder and decoded through the encoder of the user feature representation model to obtain the predicted behavior sequence. The decoding can be characterized by the following process:
[0148]
[0149] Among them, is the predicted behavior sequence decoded based on the user feature representation vector h i
[0150] In the embodiments of the present application, as Figure 5 shown, the user feature representation model includes multiple decoders, and the output of the last encoder is used as a part of the input of the first decoder. Each decoder is somewhat similar in structure to the encoder, but not exactly the same, as Figure 5 As shown, each decoder adds a Masked Multi-Head Attention layer to mask the values at certain positions in a sequence or matrix. For example, when a sequence includes 4 target objects, when decoding the first target object, the 3 target objects after the first target object need to be masked to avoid the phenomenon of information leakage where a certain position can see the information behind it.
[0151] Among them, the input of the Masked Multi-Head Attention layer of the first decoder is also the feature representation vectors of each object in the sample behavior sequence. For the object feature representation vector matrix corresponding to each sample behavior sequence, it is processed by the mask matrix of the Masked Multi-Head Attention layer, and the subsequent processing is the same as that of the Multi-Head Attention layer in the above encoder, so it will not be elaborated here.
[0152] Furthermore, the output of the Masked Multi-Head Attention layer and the output of the last encoder are jointly input into the Multi-Head Attention layer included in the decoder. In the Multi-Head Attention layer, the query vector Q for each target object is obtained from the output vector of the Masked Multi-Head Attention layer, while the key vector K and value vector V are obtained from the self-attention representation vectors output by the last encoder, and other calculation methods are the same as those of the Multi-Head Attention layer in the above encoder, so it will not be elaborated here.
[0153] For the second decoder, the input of its Masked Multi-Head Attention layer is the output of the first decoder, and the remaining processing is the same as that of the first decoder, so it will not be elaborated here.
[0154] In the embodiment of the present application, decoding is performed separately for each target object. For a user feature representation vector, decoding needs to be based on its corresponding self-attention representation vectors during decoding. Since each self-attention representation vector corresponds to a target object, decoding also starts to be performed separately for each self-attention representation vector. When decoding for each self-attention representation vector, the following operations are respectively performed:
[0155] Through the above mask matrix, decoding can be performed based on a self-attention representation vector and the self-attention representation vectors preceding the self-attention representation vector, to obtain a target object corresponding to the self-attention representation vector. Furthermore, according to the positional relationship of each self-attention representation vector, the target objects corresponding to each decoded self-attention representation vector can be combined to obtain a predicted behavior sequence.
[0156] For the user feature representation model, whether the predicted behavior sequence is consistent with the sample behavior sequence can measure the accuracy of the user feature representation model for sequence encoding. When the user feature representation model performs feature encoding on a certain user behavior sequence, if it can reverse-infer to the original user behavior sequence based on the feature encoding, then obviously the user feature representation model expresses the information in the sequence comprehensively and accurately. Therefore, this idea can be used to measure whether the user feature representation model converges.
[0157] Specifically, the reconstruction loss can be obtained by the following formula:
[0158]
[0159] where L(S i , S i′ ) represents the reconstruction loss, S i is the sample behavior sequence, S i′ is the predicted behavior sequence, θ is the model parameter, p θ is the conditional probability distribution of θ, m is the sequence length, represents predicting the target object at position m using only all the information before position m for prediction.
[0160] The reconstruction loss can represent the probability that the objects at each position in the predicted behavior sequence are the same as those in the sample behavior sequence, or can be understood as the sum of the probabilities that the objects at each position are the same. Therefore, when the value of the reconstruction loss reaches the minimum, the probability of being the same reaches the maximum, and the probability that the two predicted behavior sequences are consistent with the sample behavior sequence is greater, which can ensure that the output of the encoder contains all the necessary information required for the input of the reconstruction elements, and obtain an effective hidden vector representation of the sequence.
[0161] In practical applications, step 303 can be an optional step and can be selected according to actual needs. Therefore, it is shown as a dashed line in Figure 3 .
[0162] Step 304: Based on each user feature representation vector, determine multiple belonging probabilities for the corresponding user belonging to each user domain.
[0163] In the embodiments of the present application, in order to obtain a cross-domain user general representation, based on the idea of adding regularization constraint conditions to the model, the model can have a more effective hidden vector representation.
[0164] Specifically, if the user latent vector representation of a single domain is desired to contain the user preference information of another domain, assuming that the user representations obtained by the single-domain autoencoders in domain A and domain B belong to two different distributions p a and p b , the generalization of the user representation can be achieved by adding the following regularization term:
[0165]
[0166]
[0167] However, it is difficult to obtain the latent vector distributions of different domains and optimize the KL term. Therefore, an adversarial learning method is proposed to indirectly minimize the KL distance between the latent vector representations of users in two domains.
[0168] Therefore, a domain discriminator can be used to classify the obtained user feature representation vectors to determine the probability that the user feature representation vectors correspond to users belonging to each domain, so as to determine which user domain the user specifically comes from. For example, if there are two user domains, user domain A and user domain B, the task of the domain discriminator is to determine whether the given user feature representation vector comes from user domain A or user domain B. Through adversarial training, the discriminator and the encoders of their respective domains are alternately optimized. When the discriminator can no longer distinguish which domain the user representation comes from, we achieve the minimization of the KL distance between the user representations in two domains.
[0169] Specifically, the domain discriminator can be implemented by a multi-layer feed-forward network. The input of the network is the user feature representation vector, and the output is the multiple belonging probabilities that the user corresponding to the user feature representation vector belongs to each user domain, and one belonging probability corresponds to one user domain.
[0170] Step 305: Determine whether the user feature representation model meets the convergence condition according to the predicted behavior sequence and the determined belonging probability.
[0171] In the embodiment of the present application, as described above, the loss value of the model can be determined according to the comparison result between the predicted behavior sequence and the corresponding sample behavior sequence. Furthermore, it can be determined whether the user feature representation model meets the convergence condition according to the loss value and the belonging probability corresponding to each user.
[0172] Specifically, the convergence condition may include:
[0173] (1) The loss value is not greater than the preset loss value threshold.
[0174] (2) Among the multiple attribution probabilities corresponding to any user, the difference between any two attribution probabilities is not greater than a preset difference threshold, that is, the probabilities of each user belonging to each user domain are almost the same or exactly the same. Alternatively, it is also possible to perform a transformation based on the probability value. For example, the accuracy of the domain discriminator can be obtained from the probability value. When the accuracy of the domain discriminator approaches 0.5, the domain discriminator cannot distinguish which domain the user representation comes from.
[0175] In the embodiments of the present application, since there are some overlapping users in different user domains and the identity identifiers of the overlapping users are the same, in order to make more full use of the information in the two domains, when there are a certain number of overlapping users in the two domains, restrictions are imposed on the hidden vector representations of these overlapping users, forcing the user feature representation vectors in different user domains to be equal or approximately equal. Then, the convergence condition of the user feature representation model can further include:
[0176] Among the user feature representation vectors obtained from the sample behavior sequences of each overlapping user in each user domain, the similarity between any two user feature representation vectors is not less than a preset similarity threshold.
[0177] Step 306: If the result of step 305 is no, then adjust the parameters of the user feature representation model.
[0178] When the user feature representation model meets the convergence condition, the parameters of the user feature representation model are adjusted according to the loss value and the attribution probability, etc., and the adjusted user feature representation model is used to enter the next training process, that is, jump to step 302.
[0179] Step 307: If the result of step 305 is yes, then the training ends.
[0180] When the user feature representation model meets the convergence condition, the training ends.
[0181] In the embodiments of the present application, after the user feature representation model is trained, the user feature representation model can be used for the feature representation of the user. Please refer to Figure 9 , which is a schematic flowchart of the method for obtaining the user feature representation provided by the embodiments of the present application.
[0182] Step 901: Obtain the historical behavior sequence of the target user according to the operation behavior of the target user in the target user domain for the target object.
[0183] Step 902: Perform feature encoding on the historical behavior sequence through the trained user feature representation model to obtain the user feature representation vector of the target user.
[0184] Among them, the feature encoding can be implemented by the vectorization layer and the encoder of the user feature representation model. Since the detailed processing process has been introduced in the above training process, it will not be elaborated here.
[0185] In the embodiments of the present application, based on the obtained user feature representation vector, sequence recommendation of target objects can be performed for the user. Therefore, the target object recommendation method provided in the embodiments of the present application will be introduced below. As Figure 10 shown, it is a schematic flowchart of the target object recommendation method provided in the embodiments of the present application.
[0186] Step 1001: Obtain the historical behavior sequence of the target user in the target user domain.
[0187] Among them, the historical behavior sequence is a sequence composed of target objects that the target user has historically operated on in the target user domain. Based on actual needs, the length of the historical behavior sequence can be set.
[0188] Step 1002: Perform feature encoding on the historical behavior sequence to obtain the first user feature representation vector of the target user.
[0189] Specifically, that is, use the Figure 9 process in the corresponding embodiment to obtain the first user feature representation vector of the target user.
[0190] Step 1003: Determine at least one target object recommended for the target user through the trained target object recommendation model according to the first user feature representation vector and the short-term behavior sequence of the target user.
[0191] See Figure 2 shown. Through the GUR module, information from another domain can be fused into the single-domain user representation through adversarial learning to obtain a generalized user latent vector representation, and then applied to single-domain recommendation, that is, use the CDSR module for sequence recommendation. Its recommendation process can be expressed as:
[0192]
[0193]
[0194]
[0195] Among them, is the first user feature representation vector, is the historical behavior sequence of user i, is the short-term behavior sequence of user i, which includes the M target objects closest to the current moment in the historical behavior sequence. Rec represents the fusion process of the user feature representation vector and the short-term behavior sequence. The fusion process is to obtain the second user feature representation vector by performing feature encoding on the first user feature representation vector and the short-term user behavior sequence. The process of feature encoding is similar to the process of the encoder or decoder in the above user feature representation model. is the second user feature representation vector obtained after fusing the user feature representation vector and the short-term behavior sequence. v is the object feature representation vector of the target object in the target user domain A. represents the similarity between and v, that is, the interest value of user i for the target object v. Furthermore, at least one target object recommended for the target user can be determined according to the similarity, that is, the target object with a higher similarity is recommended to the target user.
[0196] Among them, the target object recommendation model is trained according to multiple training samples.
[0197] In a possible implementation manner, the target object recommendation model may refer to Figure 2 the CDSR module shown. Then, when training the target object recommendation model, each training sample may include the user feature representation vector of a user and the short-term behavior sequence. And in each training process, the first M target objects in the short-term behavior sequence are used as training inputs, and the remaining N - M target objects are used as training supervision, where N and M are positive integers.
[0198] Furthermore, in each training, at least one target object is predicted according to the user feature representation vector included in each training sample and the first M target objects, and it is judged whether the target object recommendation model converges according to the difference degree between at least one target object and the remaining N - M target objects. When the target object recommendation model does not converge, the target object recommendation model is updated according to the difference degree between at least one target object and the remaining N - M target objects. If the target object recommendation model has converged, the training is ended.
[0199] In a possible implementation manner, the target object recommendation model may include Figure 2 the GUR module and the CDSR module shown. Then, when training the target object recommendation model, the GUR module can be trained in advance. When the GUR module is stable, joint training is carried out. Among them, each training sample may include the historical behavior sequence of a user. The historical behavior sequence includes the short-term behavior sequence, and the last N - M target objects in the short-term behavior sequence are used as training supervision.
[0200] Furthermore, during each training session, the GUR module performs feature encoding based on the historical behavior sequence to obtain the user feature representation vector of the user. Then, at least one target object is predicted based on the user feature representation vector and the first M target objects in the short-term behavior sequence. The convergence of the target object recommendation model is determined based on the degree of difference between at least one target object and the remaining N - M target objects. When the target object recommendation model has not converged, the target object recommendation model is updated based on the degree of difference between at least one target object and the remaining N - M target objects. If the target object recommendation model has converged, the training is terminated.
[0201] Among them, the loss value of the target object recommendation model can be obtained through the following formula:
[0202]
[0203] Among them, L(s a , s′ a ) represents the loss of the GUR module, represents the loss of the CDSR module, and α is a hyperparameter used to control the proportion of the two losses in the fusion, with a value in the range of (0, 1).
[0204] To verify the effectiveness of the model in the embodiments of the present application, tests were conducted. Two evaluation metrics were used to evaluate the final sequence recommendation effect during the tests, namely the hit rate (HT) and the normalized discounted cumulative gain (NDCG). NDCG is used to measure and evaluate the search result algorithm.
[0205] Specifically, the performance of the algorithm was tested in three cross-domain recommendation scenarios composed of six datasets. The first four of them are Amazon public datasets, and the last two are user behavior data screened from Weishi and Tencent Video within three consecutive days. All models use Adam as the optimizer, with a batch size of 128 and a learning rate of 0.0001. The training data uses all sequences except the last two items as training, the second-to-last item as validation, and the last item as testing. The experimental hardware environment uses GPU Tesla P40 and TensorFlow version 1.4.0.
[0206] After comparing with the current sequence recommendation algorithms, the HT metric and the NDCG metric almost entirely outperform all current algorithms. Moreover, when conducting ablation tests, the HT metric and the NDCG metric also outperform all current algorithms. Thus, it can be seen that the method of the embodiments of the present application greatly improves the accuracy of sequence recommendation.
[0207] Please refer to Figure 11 , based on the same inventive concept, the embodiments of the present application further provide a device 110 for obtaining user feature representations. The device includes:
[0208] A data acquisition unit 1101, configured to obtain a historical behavior sequence of a target user according to the operation behavior of the target user in the target user domain for a target object. The historical behavior sequence includes multiple target objects operated by the target user in the target user domain;
[0209] A feature encoding unit 1102, configured to perform feature encoding on the historical behavior sequence through a trained user feature representation model to obtain a user feature representation vector of the target user;
[0210] Wherein, the user feature representation model is trained according to the sample behavior sequences of each user in multiple user domains. When training the user feature representation model, the user feature representation vectors corresponding to the respective sample behavior sequences are respectively obtained through the user feature representation model, and the probability values of the corresponding users belonging to each user domain are obtained based on each user feature representation vector. When the difference degree between any two probability values among the obtained probability values of the corresponding users belonging to each user domain is not greater than a preset difference degree threshold, the user feature representation model converges.
[0211] Optionally, it further includes a model training unit 1105, a decoding unit 1103, and a domain identification unit 1104;
[0212] The data acquisition unit 1101 is further configured to obtain a sample behavior sequence set, and the sample behavior sequence set includes the sample behavior sequences of each user in multiple user domains;
[0213] The model training unit 1105 is configured to perform iterative training on the user feature representation model based on the sample behavior sequence set. One training process includes the following steps:
[0214] Call the feature encoding unit 1102 to perform feature encoding on each obtained sample behavior sequence to respectively obtain the corresponding user feature representation vectors;
[0215] Call the domain identification unit 1104 to respectively determine multiple attribution probabilities of the corresponding users belonging to each user domain based on the obtained user feature representation vectors, and each user domain corresponds to one attribution probability;
[0216] If, based on multiple belonging probabilities corresponding to each user, it is determined that the user feature representation model meets the convergence condition, the training ends; the convergence condition includes at least: among the multiple belonging probabilities corresponding to any user, the difference degree between any two belonging probabilities is not greater than a preset difference degree threshold.
[0217] If, based on the belonging probabilities corresponding to each user, it is determined that the user feature representation model does not meet the convergence condition, then the parameters of the user feature representation model are adjusted based on the belonging probabilities corresponding to each user.
[0218] Optionally, the model training unit 1105 is further configured to:
[0219] Call the decoding unit 1103 to obtain a predicted behavior sequence for the corresponding user respectively based on the obtained user feature representation vectors of each user, and determine a loss value based on the comparison results between the obtained predicted behavior sequences and the corresponding sample behavior sequences.
[0220] Then the convergence condition further includes: the loss value is not greater than a preset loss value threshold.
[0221] Optionally, at least one overlapping user is included in multiple user domains, and the user identifiers of the overlapping user in multiple user domains are the same, then the convergence condition further includes:
[0222] For each overlapping user, the similarity between any two user feature representation vectors among the user feature representation vectors obtained based on the sample behavior sequences of each overlapping user in each user domain is not less than a preset similarity threshold.
[0223] Optionally, the feature encoding unit 1102 is specifically configured to:
[0224] Obtain the content feature representation vector and the position feature representation vector of each target object in the sample behavior sequence; the position feature representation vector is used to characterize the position information of the target object in the sample behavior sequence.
[0225] According to the obtained content feature representation vectors and position feature representation vectors of each target object, obtain the object feature representation vectors of each target object.
[0226] According to the obtained object feature representation vectors of each target object, perform feature encoding through at least one encoder included in the user feature representation model to obtain the self-attention representation vectors of each target object respectively; the output of the previous encoder in two adjacent encoders among at least one encoder is the input of the subsequent encoder.
[0227] Among the self-attention representation vectors of each target object in the output of the last encoder, select a self-attention representation vector and determine it as the user feature representation vector corresponding to the sample behavior sequence.
[0228] Optionally, the feature encoding unit 1102 is specifically configured to:
[0229] According to the object feature representation vectors of each target object and at least one attention weight matrix included in an encoder, respectively obtain at least one weight representation vector corresponding to each target object; wherein, each weight representation vector corresponds to an attention weight matrix;
[0230] According to the at least one weight representation vector corresponding to each target object, respectively obtain the intermediate representation vector of each target object;
[0231] Perform activation processing on the intermediate representation vectors of each target object to respectively obtain the self-attention representation vectors of each target object.
[0232] Optionally, if the at least one attention weight matrix includes a query vector weight matrix, a key vector weight matrix, and a value vector weight matrix, then the feature encoding unit 1102 is specifically configured to:
[0233] According to the object feature representation vectors of each target object and the query vector weight matrix, the key vector weight matrix, and the value vector weight matrix, respectively obtain the corresponding query vector, key vector, and value vector; for each target object, respectively perform the following operations:
[0234] According to the query vector of a target object and the key vectors of each target object in the historical behavior sequence, respectively obtain the attention weight values corresponding to each target object; the attention weight values are used to characterize the association degree between each target object and a target object;
[0235] According to the value vectors of each target object and the attention weight values corresponding to each target object, obtain the intermediate representation vector of a target object.
[0236] Optionally, the feature encoding unit 1102 is specifically configured to:
[0237] Respectively obtain the similarity between the query vector of a target object and the key vectors of each target object;
[0238] Respectively perform dimensionality reduction processing and normalization processing on each similarity value to obtain the attention weight values corresponding to each target object.
[0239] Optionally, each target object includes a termination identification object, and the termination identification object is used to characterize the end of the sequence, then the feature encoding unit 1102 is specifically configured to:
[0240] Select the self-attention representation vector corresponding to the termination identification object and determine it as the user feature representation vector corresponding to the sample behavior sequence.
[0241] Optionally, the decoding unit 1103 is specifically configured to:
[0242] Respectively determine the self-attention representation vectors corresponding to each user feature representation vector; wherein, the positional relationship of each self-attention representation vector corresponds to the positional relationship of the corresponding target object in the sample behavior sequence;
[0243] For each self-attention representation vector, perform the following operations respectively: Decode according to a self-attention representation vector and the self-attention representation vectors located before a self-attention representation vector to obtain the target object corresponding to a self-attention representation vector;
[0244] According to the positional relationship of each self-attention representation vector, combine the target objects corresponding to each decoded self-attention representation vector to obtain the predicted behavior sequence.
[0245] This device can be used to execute Figures 2 - 9 the method shown in the embodiments shown, therefore, for the functions that each functional module of this device can achieve, etc., reference can be made to Figures 2 - 9 the description of the embodiments shown, which will not be elaborated here.
[0246] Please refer to Figure 12 , based on the same inventive concept, an embodiment of the present application further provides a target object recommendation device 120, and this device includes:
[0247] A data acquisition unit 1201, configured to acquire the historical behavior sequence of the target user in the target user domain;
[0248] A feature encoding unit 1202, configured to perform feature encoding on the historical behavior sequence by the method of obtaining the user feature representation in the above aspect to obtain the first user feature representation vector of the target user;
[0249] An object recommendation unit 1203, configured to determine at least one target object recommended for the target user according to the first user feature representation vector and the short-term behavior sequence of the target user through the trained target object recommendation model; the short-term behavior sequence includes the M target objects closest to the current moment in the historical behavior sequence;
[0250] Among them, the target object recommendation model is trained based on multiple training samples. Each training sample includes a user feature representation vector of a user and a historical behavior sequence. And in each training process, the target object recommendation model predicts at least one target object according to the user feature representation vector included in each training sample and the first M target objects among the N target objects included in the historical behavior sequence, and updates the target object recommendation model according to the difference degree between the at least one target object and the remaining N - M target objects. N and M are positive integers.
[0251] Optionally, the object recommendation unit 1203 is specifically configured to:
[0252] Perform feature encoding on the first user feature representation vector and the short-term user behavior sequence to obtain a second user feature representation vector of the target user;
[0253] Determine at least one target object according to the similarity between the object feature representation vector of the target object included in the target user domain and the second user feature representation vector.
[0254] This device can be used to execute Figure 10 the method shown in the embodiments shown, therefore, for the functions that can be realized by each functional module of this device, reference can be made to Figure 10 the description of the embodiments shown, and details will not be repeated here.
[0255] Please refer to Figure 13 , based on the same technical concept, an embodiment of the present application also provides a computer device 130, which may include a memory 1301 and a processor 1302.
[0256] The memory 1301 is used to store a computer program executed by the processor 1302. The memory 1301 may mainly include a program storage area and a data storage area. Among them, the program storage area may store an operating system, application programs required for at least one function, etc.; the data storage area may store data created according to the use of the computer device, etc. The processor 1302 may be a central processing unit (CPU) or a digital processing unit, etc. In the embodiments of the present application, the specific connection medium between the above-mentioned memory 1301 and the processor 1302 is not limited. In the embodiments of the present application Figure 13 it is shown that the memory 1301 and the processor 1302 are connected through a bus 1303. The bus 1303 is shown in Figure 13 in thick lines. The connection manners of other components are only for illustrative purposes and are not to be construed as limiting. The bus 1303 may be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 13It is represented by only one thick line, but it does not mean that there is only one bus or one type of bus.
[0257] The memory 1301 can be a volatile memory, such as a random-access memory (RAM); the memory 1301 can also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD), or a solid-state drive (SSD), or the memory 1301 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1301 can be a combination of the above memories.
[0258] The processor 1302 is used to execute the method performed by the device in the embodiment shown in Figures 2 - 10 when calling the computer program stored in the memory 1301.
[0259] In some possible implementation manners, each aspect of the method provided in this application can also be implemented in the form of a program product, which includes program code. When the program product runs on a computer device, the program code is used to cause the computer device to execute the steps in the method according to various exemplary implementation manners of this application described above in this specification. For example, the computer device can execute the method performed by the device in the embodiment shown in Figures 2 - 10 when calling the computer program stored in the memory 1301.
[0260] The program product can adopt any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (non-exhaustive list) of the readable storage medium include: an electrical connection with one or more wires, a portable disk, a hard disk, a random-access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0261] Although the preferred embodiments of this application have been described, those skilled in the art can make additional changes and modifications once they know the basic creative concepts. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications falling within the scope of this application.
[0262] Obviously, those skilled in the art can make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalent technologies, this application is also intended to cover these changes and modifications.
Claims
1. A method for obtaining a user feature representation, characterized in that, the method includes: Obtaining a historical behavior sequence of the target user according to the operation behavior of the target user in the target user domain for the target object, where the historical behavior sequence includes multiple target objects operated by the target user in the target user domain; the target object includes one or more of audio, video, image, news, commodity or text; Performing feature encoding on the historical behavior sequence through a trained user feature representation model to obtain a user feature representation vector of the target user; Wherein, the user feature representation model is trained according to the sample behavior sequences of each user in multiple user domains, each user domain in the multiple user domains includes multiple users with common attributes, at least one overlapping user is included in the multiple user domains, the user identifiers of the overlapping users are the same in the multiple user domains, and when training the user feature representation model, the user feature representation vectors corresponding to each sample behavior sequence are respectively obtained through the user feature representation model, and the probability value of the corresponding user belonging to each user domain is obtained based on each user feature representation vector. When the difference degree between any two probability values among the obtained probability values of the corresponding user belonging to each user domain is not greater than a preset difference degree threshold, and for each overlapping user, the similarity between any two user feature representation vectors among the user feature representation vectors obtained based on the sample behavior sequences of each overlapping user in each user domain is not less than a preset similarity threshold, the user feature representation model converges.
2. The method according to claim 1, characterized in that, the user feature representation model is trained in the following manner: Obtaining a sample behavior sequence set, where the sample behavior sequence set contains the sample behavior sequences of each user in multiple user domains; Based on the sample behavior sequence set, performing iterative training on the user feature representation model, where one training process includes the following steps: Performing feature encoding on each obtained sample behavior sequence to respectively obtain corresponding user feature representation vectors; Based on the obtained user feature representation vectors, respectively determining multiple belonging probabilities of the corresponding user belonging to each user domain, and each user domain corresponds to one belonging probability; If it is determined that the user feature representation model meets the convergence condition based on the multiple belonging probabilities corresponding to each user, the training ends; the convergence condition at least includes: among the multiple belonging probabilities corresponding to any user, the difference degree between any two belonging probabilities is not greater than the preset difference degree threshold; If it is determined that the user feature representation model does not meet the convergence condition based on the belonging probabilities corresponding to each user, then the parameters of the user feature representation model are adjusted based on the belonging probabilities corresponding to each user.
3. The method according to claim 2, characterized in that, after performing feature encoding on each obtained sample behavior sequence to respectively obtain corresponding user feature representation vectors, the method further includes: Based on the obtained respective user feature representation vectors, a predicted behavior sequence is obtained for each corresponding user respectively, and a loss value is determined based on the comparison results between the obtained respective predicted behavior sequences and the corresponding sample behavior sequences; Then the convergence condition further includes: the loss value is not greater than a preset loss value threshold.
4. The method according to claim 1, wherein, for each sample behavior sequence, feature encoding is performed on the sample behavior sequence to obtain a corresponding user feature representation vector, including: obtaining a content feature representation vector and a position feature representation vector of each target object in the sample behavior sequence; the position feature representation vector is used to characterize the position information of the target object in the sample behavior sequence; obtaining an object feature representation vector of each target object according to the obtained content feature representation vectors and position feature representation vectors of the respective target objects; according to the obtained object feature representation vectors of the respective target objects, feature encoding is performed through at least one encoder included in the user feature representation model to respectively obtain self-attention representation vectors of the respective target objects; the output of the previous encoder in two adjacent encoders among the at least one encoder is the input of the subsequent encoder; among the self-attention representation vectors of the respective target objects output by the last encoder, one self-attention representation vector is selected and determined as the user feature representation vector corresponding to the sample behavior sequence.
5. The method according to claim 4, wherein, when performing feature encoding through each encoder, it includes the following steps: respectively obtaining at least one weight representation vector corresponding to each target object according to the object feature representation vectors of the respective target objects and at least one attention weight matrix included in an encoder; wherein each weight representation vector corresponds to an attention weight matrix; respectively obtaining an intermediate representation vector of each target object according to the at least one weight representation vector corresponding to each target object; performing activation processing on the intermediate representation vectors of the respective target objects to respectively obtain self-attention representation vectors of the respective target objects.
6. The method according to claim 5, wherein, the at least one attention weight matrix includes a query vector weight matrix, a key vector weight matrix, and a value vector weight matrix; the respectively obtaining at least one weight representation vector corresponding to each target object according to the object feature representation vectors of the respective target objects and at least one attention weight matrix included in an encoder includes: respectively obtaining corresponding query vectors, key vectors, and value vectors according to the object feature representation vectors of the respective target objects and the query vector weight matrix, the key vector weight matrix, and the value vector weight matrix; the respectively obtaining an intermediate representation vector of each target object according to the at least one weight representation vector corresponding to each target object and the at least one weight representation vector corresponding to other target objects in the sample behavior sequence includes: for each of the respective target objects, the following operations are respectively performed: Obtain the attention weight values corresponding to each target object respectively according to the query vector of a target object and the key vectors of each target object in the historical behavior sequence; the attention weight values are used to characterize the degree of association between each target object and the one target object; According to the value vectors of each target object and the attention weight values corresponding to each target object respectively, obtain the intermediate representation vector of the one target object.
7. The method according to claim 6, characterized in that, The obtaining the attention weight values corresponding to each target object respectively according to the query vector of a target object and the key vectors of each target object in the historical behavior sequence includes: Obtain the similarity between the query vector of the one target object and the key vectors of each target object respectively; Perform dimensionality reduction processing and normalization processing on each similarity value respectively to obtain the attention weight values corresponding to each target object respectively.
8. The method according to claim 4, characterized in that, Each of the target objects includes a termination identification object, and the termination identification object is used to represent the end of the sequence; The selecting one self-attention representation vector from the self-attention representation vectors of each target object output by the last encoder and determining it as the user feature representation vector corresponding to the sample behavior sequence includes: Select the self-attention representation vector corresponding to the termination identification object and determine it as the user feature representation vector corresponding to the sample behavior sequence.
9. The method according to claim 4, characterized in that, Based on the obtained user feature representation vectors, obtain the predicted behavior sequences for the corresponding users respectively, including: Determine the self-attention representation vectors corresponding to the user feature representation vectors respectively; wherein, the positional relationship of the self-attention representation vectors corresponds to the positional relationship of the corresponding target objects in the sample behavior sequence; For each of the self-attention representation vectors, perform the following operations respectively: decode according to a self-attention representation vector and the self-attention representation vectors before the one self-attention representation vector to obtain the target object corresponding to the one self-attention representation vector; Combine the target objects corresponding to the self-attention representation vectors obtained by decoding according to the positional relationship of the self-attention representation vectors to obtain the predicted behavior sequence.
10. A target object recommendation method, characterized in that, The method includes: Obtain the historical behavior sequence of the target user in the target user domain; Perform feature encoding on the historical behavior sequence by the method according to any one of claims 1 to 9 to obtain the first user feature representation vector of the target user; Determine at least one target object recommended for the target user according to the first user feature representation vector and the short-term behavior sequence of the target user; the short-term behavior sequence includes the M target objects closest to the current moment in the historical behavior sequence; Among them, the target object recommendation model is trained based on multiple training samples. Each training sample includes a user feature representation vector of a user and a historical behavior sequence. And in each training process, the target object recommendation model predicts at least one target object according to the user feature representation vector included in each training sample and the first M target objects among the N target objects included in the historical behavior sequence, and updates the target object recommendation model according to the difference degree between the at least one target object and the remaining N - M target objects. N and M are positive integers.
11. An apparatus for obtaining user feature representation, Characterized in that, The apparatus includes: A data acquisition unit, configured to obtain the historical behavior sequence of the target user according to the operation behavior of the target user in the target user domain on the target object. The historical behavior sequence includes multiple target objects operated by the target user in the target user domain; the target object includes one or more of audio, video, image, news, commodity or text; A feature encoding unit, configured to perform feature encoding on the historical behavior sequence through a trained user feature representation model to obtain the user feature representation vector of the target user; Among them, the user feature representation model is trained based on the sample behavior sequences of each user in multiple user domains. Each of the multiple user domains includes multiple users with common attributes. At least one overlapping user is included in the multiple user domains. The user identifiers of the overlapping user in the multiple user domains are the same. And when training the user feature representation model, the user feature representation vectors corresponding to the respective sample behavior sequences are respectively obtained through the user feature representation model, and the probability value of the corresponding user belonging to each user domain is obtained based on each user feature representation vector. When the difference degree between any two probability values among the obtained probability values of the corresponding user belonging to each user domain is not greater than a preset difference degree threshold, and for each overlapping user, the similarity between any two user feature representation vectors among the user feature representation vectors obtained based on the sample behavior sequences of the each overlapping user in each user domain is not less than a preset similarity threshold, the user feature representation model converges.
12. A target object recommendation apparatus, Characterized in that, The apparatus includes: A data acquisition unit, configured to obtain the historical behavior sequence of the target user in the target user domain; A feature encoding unit, configured to perform feature encoding on the historical behavior sequence through the method according to any one of claims 1 to 9 to obtain the first user feature representation vector of the target user; An object recommendation unit, configured to determine at least one target object recommended for the target user through a trained target object recommendation model according to the first user feature representation vector and the short-term behavior sequence of the target user; the short-term behavior sequence includes the M target objects closest to the current moment in the historical behavior sequence; Among them, the target object recommendation model is obtained by training with multiple training samples. Each training sample includes a user feature representation vector of a user and a historical behavior sequence. And in each training process, the target object recommendation model predicts at least one target object according to the user feature representation vector included in each training sample and the first M target objects among the N target objects included in the historical behavior sequence, and updates the target object recommendation model according to the difference degree between the at least one target object and the remaining N - M target objects. N and M are positive integers.
13. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein, when the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 or 10 are implemented.
14. A computer storage medium, on which computer program instructions are stored, wherein, when the computer program instructions are executed by the processor, the steps of the method according to any one of claims 1 to 9 or 10 are implemented.
Citation Information
Patent Citations
Sequence recommendation method, device and equipment based on self-attention mechanism
CN110008409A
Behavior prediction system updating method and device
CN111737584A