User behavior model training, recommendation methods, devices and equipment

Through the unsupervised learning method that maximizes mutual information, the problem of high cost in user behavior modeling is solved, and efficient user behavior sequence modeling and model pre-training is realized, which is suitable for user recommendation and classification tasks.

CN112307351BActive Publication Date: 2025-09-02INST OF COMPUTING TECH CHINESE ACAD OF SCI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011318160.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-11-23
Publication Date
2025-09-02
Estimated Expiration
2040-11-23

AI Technical Summary

Technical Problem

In the prior art, user behavior modeling requires high manual annotation costs and resource costs, and complex end-to-end models are constructed, resulting in waste of training time and resources.

Method used

Unsupervised learning method that maximizes mutual information, and uses the goal of maximizing mutual information between user behavior sequences and current user expressions to model user behavior sequences to reduce training costs and avoid building complex end-to-end models.

Benefits of technology

It realizes user behavior sequence modeling without manual annotation, reduces training time and cost, and obtains better model performance, suitable for user recommendation and classification tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112307351B_ABST
    Figure CN112307351B_ABST
Patent Text Reader

Abstract

The present application discloses a user behavior model training, recommendation method, apparatus, and device. The model training method includes: obtaining a user behavior sequence; inputting the user behavior sequence into a user behavior sequence model under current model parameters to obtain the current user expression; obtaining a first training sample based on the current user expression and the user behavior sequence; determining a mutual information loss value using a mutual information loss function based on the first training sample, and updating the model parameters of the user behavior sequence model based on the mutual information loss value; using the updated model parameters as the current model parameters, returning to execute the step of inputting the user behavior sequence into the user behavior sequence model under the current model parameters to obtain the current user expression, until the current model parameters meet preset conditions. The present application implements user behavior sequence modeling through an unsupervised learning method based on mutual information maximization, reducing the training time and cost of the user behavior sequence model, and can be widely used in the field of artificial intelligence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a method, apparatus, and device for training and recommending user behavior models. Background Art

[0002] With the development of the internet, the number of users of products like e-commerce and social media has grown exponentially. User behavior on the internet is diverse. For example, in social applications, we can capture user chats, browsing Moments, and sending red envelopes. In information applications, we can capture clicks, forwarding, commenting, replying, and saving. In search engines, we capture search and click activity. User behavior is a crucial characteristic that distinguishes different users, and user behavior is time-series. Therefore, modeling user behavior sequences that change over time is a crucial research topic.

[0003] Related technologies typically use supervised learning methods to model user behavior. This requires manual data labeling and the construction of a complex end-to-end model. This end-to-end model takes user behavior data as input and outputs manually labeled labels. By training this end-to-end model, a model that meets business needs can be obtained. However, this approach requires high manual labeling costs, and to achieve good model performance, a complex end-to-end model often needs to be constructed. This makes training expensive in terms of both resources and time for practical applications. Summary of the Invention

[0004] In view of this, embodiments of the present application provide a method, apparatus, and device for training, recommending, and classifying user behavior models, which can reduce the time and cost of modeling user behavior sequences.

[0005] An aspect of an embodiment of the present application provides a method for training a user behavior model, comprising the following steps:

[0006] Get user behavior sequence;

[0007] Inputting the user behavior sequence into the user behavior sequence model under the current model parameters to obtain the current user expression;

[0008] Obtaining a first training sample according to the current user expression and the user behavior sequence;

[0009] Determining a mutual information loss value using a mutual information loss function according to the first training sample, and updating model parameters of the user behavior sequence model according to the mutual information loss value;

[0010] Using the updated model parameters as the current model parameters, returning to the step of inputting the user behavior sequence into the user behavior sequence model under the current model parameters to obtain the current user expression, until the current model parameters meet the preset conditions, wherein the preset condition is that the mutual information between the current user expression and the user behavior sequence is maximum.

[0011] Another aspect of the present invention provides a recommendation method, comprising the following steps:

[0012] Obtain a pre-trained user behavior sequence model through the model training method described above;

[0013] Using the recommended supervision data to adjust the parameters of the user behavior sequence model to obtain a user recommendation model;

[0014] Recommendations are made according to the user recommendation model.

[0015] Another aspect of the present invention provides a classification method, comprising the following steps:

[0016] Obtain a pre-trained user behavior sequence model through the model training method described above;

[0017] Using the classified supervision data to adjust the parameters of the user behavior sequence model to obtain a user classification model;

[0018] Classification is performed according to the user classification model.

[0019] Another aspect of the present invention provides a model training device, comprising:

[0020] User behavior sequence acquisition module, used to obtain user behavior sequence;

[0021] A user expression determination module is used to input the user behavior sequence into the user behavior sequence model under the current model parameters to obtain the current user expression;

[0022] A first training sample construction module, configured to obtain a first training sample based on the current user expression and the user behavior sequence;

[0023] a model updating module, configured to determine a mutual information loss value using a mutual information loss function according to the first training sample, and update model parameters of the user behavior sequence model according to the mutual information loss value;

[0024] A return module is used to use the updated model parameters as the current model parameters and return to the user expression determination module until the current model parameters meet a preset condition, wherein the preset condition is that the mutual information between the current user expression and the user behavior sequence is maximum.

[0025] Another aspect of an embodiment of the present application provides a computer device, including a processor and a memory;

[0026] The memory is used to store programs;

[0027] The processor is used to execute the model training method, recommendation method or classification method described above according to the program.

[0028] Another aspect of an embodiment of the present application provides a storage medium, which stores a program, and the program is executed by a processor to complete the model training method, recommendation method or classification method described above.

[0029] The technical solution of the embodiment of the present application constructs a first training sample based on the user behavior sequence and the current user expression, then determines the mutual information loss value using the mutual information loss function based on the first training sample, and updates the model parameters of the user behavior sequence model based on the mutual information loss value until the updated model parameters maximize the mutual information between the current user expression and the user behavior sequence. This solution uses the maximum mutual information between the current user expression and the user behavior sequence as the training goal of the user behavior sequence model, and implements user behavior sequence modeling through an unsupervised learning method based on mutual information maximization, eliminating the need for manual labeling costs and the need to build a complex end-to-end model, thereby reducing the training time and cost of the user behavior sequence model. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following introduction is made to the drawings of the embodiments of the present application or the related technical solutions in the prior art. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without any creative work.

[0031] Figure 1 A schematic diagram of an implementation environment for the user behavior training method according to an embodiment of the present application;

[0032] Figure 2 This is a flowchart of the steps of a user behavior model training method according to an embodiment of the present application;

[0033] Figure 3 This is a schematic diagram of the implementation process of converting user click article logs into user behavior sequences in an embodiment of the present application;

[0034] Figure 4 This is a schematic diagram of the implementation principle of the embodiment of the present application using the transformer model to obtain the current user expression;

[0035] Figure 5 Schematic diagram of the process of constructing the first training sample and determining the first mutual information loss value in an embodiment of the present application;

[0036] Figure 6 Schematic diagram of the process of constructing the second training sample and determining the second mutual information loss value in an embodiment of the present application;

[0037] Figure 7 This is a flowchart for implementing a specific application scenario of the model training method according to an embodiment of the present application;

[0038] Figure 8 This is a flowchart of the steps of a user recommendation method according to an embodiment of the present application;

[0039] Figure 9 This is a flowchart of the steps of a user classification method according to an embodiment of the present application;

[0040] Figure 10 This is a structural diagram of a model training device according to an embodiment of the present application;

[0041] Figure 11 This is a structural diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.

[0043] It is understandable that in the specific implementation of this application, it involves retrieving data related to user behavior sequences, user characteristics, etc. When the above embodiments of this application are applied to specific products or technologies, user permission or consent must be obtained, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards.

[0044] The terms "first," "second," "third," and "fourth," etc., in the specification and claims of this application and the accompanying drawings are used to distinguish between different objects, rather than to describe a specific order. In addition, the terms "including," "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements, but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.

[0045] References herein to "embodiments" mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0046] First, the relevant terms involved in the embodiments of this application are introduced and explained:

[0047] Artificial Intelligence (AI): The theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive field of computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also studies the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making. AI technology is an interdisciplinary discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0048] Machine learning (ML) is a multidisciplinary field that encompasses probability theory, statistics, approximation theory, convex analysis, and algorithmic complexity theory. It specifically studies how computers can simulate or implement human learning behaviors to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is at the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications span all areas of AI. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and self-learning.

[0049] Natural Language Processing (NLP): This technology is a key branch of modern computer science and artificial intelligence, integrating linguistics, mathematics, and computer science. Research in this field involves natural language, the language we use in our daily lives. However, NLP is not simply the study of natural language in general; rather, it aims to develop computer systems that can effectively communicate in natural language. Key applications include lexical analysis, word vector representation, word meaning similarity, short text similarity, and sentiment analysis.

[0050] Term frequency–inverse document frequency (TF-IDF): A commonly used weighting technique in information retrieval and data mining, TF-IDF is used to assess the importance of a word to a document set or document within a corpus. TF stands for term frequency, and IDF stands for inverse document frequency.

[0051] With the development of the internet, the number of users of products like e-commerce and social media has grown exponentially. To improve the user experience and attract more users, better understanding and modeling users has become a hot topic in academia and industry. Furthermore, user modeling can help increase click-through rates (CTRs) and product purchase rates, thereby increasing business revenue. Therefore, better user modeling and data mining benefit both businesses and users. In the field of user modeling, user behavior is a key characteristic that distinguishes different users, and user behavior is time-series. Therefore, modeling user behavior sequences that change over time is a crucial research topic.

[0052] In related technologies, supervised learning methods are usually used to model user behavior. This requires manual data labeling to construct a complex end-to-end model. The input of this end-to-end model is the user's behavior data, and the output target is the manually labeled label. By training this end-to-end model, a model that meets business needs can be obtained. However, this method requires high manual labeling costs, and in order to obtain better model performance, it is often necessary to construct a complex end-to-end model. For actual application scenarios, the resource cost and time cost of training are very high. Moreover, this method requires the reconstruction and training of a new model for each different task, resulting in its failure to fully utilize the commonalities between the model and the data, resulting in a waste of resources.

[0053] To this end, the embodiment of the present application is based on the theory of mutual information maximization, and takes the maximum mutual information between the current user expression and the user behavior sequence as the goal of user behavior sequence model training. The model pre-training of user behavior sequence modeling is achieved through an unsupervised learning method based on mutual information maximization. There is no need for manual labeling costs, and there is no need to build a complex end-to-end model, which reduces the training time and cost of the user behavior sequence model and also achieves better model performance.

[0054] The technical solutions provided in the embodiments of this application relate to machine learning / deep learning technologies of artificial intelligence, which are specifically illustrated by the following embodiments.

[0055] The embodiment of the present application provides a model training method for user behavior, which uses an unsupervised learning method based on the mutual information maximization theory to realize model pre-training of classification tasks such as user attribute classification prediction and downstream tasks such as user recommendation tasks, and can be applied to a terminal, or to a server, or to a system composed of a terminal and a server. In addition, the model training method can also be software running in a terminal or a server, such as an application with a model training function. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.

[0056] Figure 1 This is a schematic diagram of an implementation environment provided by this application, such as Figure 1 As shown, the implementation environment may include: a computer device 101, which may have functions such as model pre-training and supervised adjustment of model pre-training parameters to adapt to downstream task requirements. The computer device 101 can pre-train various user behavior sequence models based on the input user behavior sequence. The pre-trained user behavior sequence model can be directly applied to downstream tasks such as user classification prediction (such as user attribute classification prediction) and user recommendation (such as shopping recommendation, game recommendation), and can further be supervised to adjust the pre-trained model parameters through transfer learning methods such as fine-tuning according to the needs of downstream tasks to improve the performance and effect of the model. The computer device 101 can be a terminal, a server, or a combination of a terminal and a server. Figure 1 In the figure, the smart phone 1011, the tablet computer 1012, and the desktop computer 1013 are all exemplary embodiments of terminals; and 1014 is a server.

[0057] Figure 1 In the process, the terminal and the server can communicate with each other through the network. The network can be a wired network or a wireless network. Exemplarily, the server can obtain user behavior sequence data from the terminal, and then perform the following processing to obtain a pre-trained user behavior sequence model: a. Input the user behavior sequence data into the user behavior sequence model corresponding to the current model parameters of the server (the initial current model parameters can be given in advance or randomly selected) to obtain the output current user expression; b. Construct a training sample based on the current user expression and the user behavior sequence; c. Use the loss function to obtain the current loss value based on the training sample, and judge whether the current loss value meets the convergence requirements. If so, use the current model parameters as the trained user behavior sequence model and end the training process; otherwise, update the current model parameters and return to step a to continue training. In one possible implementation, the current model parameters can be updated using the gradient descent method: reduce the gradient of the model parameters to obtain new model parameters as the current model parameters. Gradient descent methods can include stochastic gradient descent (SGD), batch gradient descent (BGD), and adaptive moment estimation (ADAM) optimization algorithms. It is understood that the current model parameters can also be updated using evolutionary algorithms, such as population-based genetic algorithms. The server can send a pre-trained user behavior sequence model to the terminal, which then performs supervised adjustments to the pre-trained model parameters through transfer learning methods such as fine-tuning. Downstream tasks such as user classification and recommendation are then performed based on the adjusted model parameters.

[0058] This model training method can be applied in various scenarios.

[0059] For example, in the binary classification scenario of user attributes:

[0060] The user behavior sequence is sent to the server through the terminal of the computer device 101. The server uses the aforementioned method to obtain a pre-trained user behavior sequence model and sends it to the terminal of the computer device 101. The terminal then performs supervised adjustment on the pre-trained model parameters based on a portion of labeled user attribute sample data through transfer learning methods such as fine-tuning to obtain a user attribute binary classification model. In this way, the terminal can use the user attribute binary classification model to perform binary classification prediction of user age, gender, etc. on the newly input user behavior sequence data.

[0061] For example, in the user recommendation scenario:

[0062] The user behavior sequence is sent to the server through the terminal of the computer device 101. The server uses the above method to obtain a pre-trained user behavior sequence model and sends it to the terminal of the computer device 101. The terminal then uses a transfer learning method such as fine-tuning to perform supervised adjustment on the pre-trained model parameters based on a portion of labeled user recommendation sample data to obtain a user recommendation model. In this way, the terminal can use the user recommendation model to provide users with recommendation services such as game item purchase recommendations, user browsing page layout recommendations, or reading content recommendations.

[0063] It should be understood that the above application scenarios serve only as examples. In actual applications, in addition to using the server to pre-train the user behavior sequence model, other devices with model training capabilities, such as terminals, can also be used to pre-train the user behavior sequence model; in addition, other devices other than terminal devices can also be used to carry the pre-trained user behavior sequence model. No limitation is imposed on the application scenarios of the model training method provided in the embodiments of the present application.

[0064] based on Figure 1 The implementation environment description of this application proposes a user behavior model training method, which can be Figure 1 The computer device shown is used to execute. Figure 2 As shown, the method may include the following steps S201-S205:

[0065] S201: Obtain user behavior sequence.

[0066] In the embodiment of the present application, the user behavior sequence can be obtained by the server by reading the user behavior log, collecting the user behavior in real time, crawling from the Internet, etc.

[0067] Taking the method of obtaining information by reading user behavior logs on the server as an example, in actual applications, various Internet applications (such as applications) or platforms will have log records of user behavior, such as user product click records, article click, collection, and forwarding records. In order to construct an input suitable for the training method of the embodiment of the present application, it is necessary to convert the user behavior log into a user behavior sequence in chronological order. Optionally, the user behavior at each moment can be encoded according to the type of behavior, the type of operation object, etc.

[0068] For example, Figure 3 The implementation process of converting user click article logs into user behavior sequences is shown.

[0069] Figure 3In the example, User_id represents the user, item_id represents the article clicked by the user, topic_id represents the topic of the article, and time is the timestamp of the click on the article.

[0070] Figure 3 The implementation process of converting user click article logs into user behavior sequences is as follows:

[0071] First, convert the user behaviors recorded in the user log into a user behavior sequence by user and sorting by time.

[0072] Next, we encode different types of user behaviors and vectorize these user behavior sequences. For example, if a user clicks on 50,000 different items, we can randomly initialize 512-dimensional vectors to represent these 50,000 items. Topic information can also be vectorized using the same method.

[0073] S202: Input the user behavior sequence into the user behavior sequence model under the current model parameters to obtain the current user expression.

[0074] In the embodiments of the present application, the user behavior sequence model can be a feature extraction model used to extract user features (such as user interest features, the number of times a user repeats an operation, and so on), or it can be a classification recognition model directly used for downstream tasks such as user classification and user recommendation. If the user behavior sequence model is a feature extraction model, it can be further combined with supervised adjustment to obtain a classification recognition model; if the user behavior sequence model is a classification recognition model, the classification recognition model can be directly used for downstream tasks such as user recommendation or user classification.

[0075] Alternatively, the user behavior sequence model can adopt the transformer model. The transformer model uses the self-attention mechanism and executes a fixed number of steps (selected based on experience). It requires less training computing power, is more suitable for modern machine learning hardware, and greatly improves the training speed.

[0076] It is understandable that the user behavior sequence model can also adopt a neural network model such as a recurrent neural network model, a temporal convolutional network model, or other network models including a convolutional layer.

[0077] As mentioned above, in order to save training time and samples and improve the efficiency of model training, the embodiment of the present application adopts an unsupervised learning method to pre-train the model. The output (i.e., user expression) corresponding to the training samples and the current model parameters will be updated as the model parameters are updated.

[0078] If the user behavior sequence model adopts the transformer model, step S202 can be further divided into the following steps S2021-S2023:

[0079] S2021. Vectorize the user behavior sequence to obtain a vectorized user behavior sequence.

[0080] As mentioned above, the vectorization method in step S201 can be used to make the input meet the input requirements of the user behavior sequence model.

[0081] S2022. Input the vectorized user behavior sequence into the user behavior sequence model under the current model parameters to extract a plurality of first features.

[0082] like Figure 4 As shown, the vectorized user behavior sequence includes the observed user behavior sequence s1, s2...s M and fake behavioral sequence The subscript M represents the total number of sequences, where M is a positive integer. The fake user behavior sequence is another user behavior sequence randomly sampled from the same batch as the observed user behavior sequence. In other words, the fake user behavior sequence refers to the user behavior sequence after excluding the observed user behavior sequence. For example, the input user sequence includes the user behavior sequence of observed user A, as well as the user behavior sequences of users B, C, and D, and user B and observed user A belong to the same batch. Then, the fake user behavior sequence corresponding to observed user A is the user behavior sequence of user B. After the observed user behavior sequence and the fake user behavior sequence are input into the Transformer model, the position-vectorized observed user behavior sequence x1, x2…x is obtained through token vectorization. M and position vectorized fake user behavior sequence The observed user behavior sequence x1, x2...x after position vectorization M After sequence modeling, the extracted features y1, y2...y M As the first feature.

[0083] S2023: Aggregate the first features to obtain the current user expression.

[0084] like Figure 4 As shown, the first feature y1, y2...y M The current user expression y can be aggregated and generated through an aggregator using methods such as mean pooling, max pooling, and attention.

[0085] The goal of user behavior sequence modeling is to obtain the user expression y corresponding to the observed user behavior sequence, and the false user behavior sequence is to guide how the model y should learn. Therefore, the embodiment of the present application vectorizes the observed user behavior sequence x1, x2...x M Just perform sequence modeling and aggregation processing.

[0086] S203: Obtain a first training sample based on the current user expression and user behavior sequence.

[0087] In the embodiment of the present application, a vector obtained by concatenating the current user expression and the user behavior sequence can be used as a first training sample. The first training sample includes a first positive sample and a first negative sample. Then, step S203 can further include the following steps S2031 and S2032:

[0088] S2031. Concatenate the current user expression and the user behavior sequence to generate a vector as a first positive sample;

[0089] S2032: Use a vector generated by concatenating the current user expression and the fake user behavior sequence as a first negative sample, where the fake user behavior sequence and the user behavior sequence belong to the same batch.

[0090] like Figure 5 As shown, the current user expression y is respectively Figure 4 User behavior sequence x1, x2...x after position vectorization M Concatenate the generated vectors As the first positive sample, is a splicing symbol; the current user expression y is respectively combined with Figure 4 Fake user behavior sequence after position vectorization Concatenate the generated vectors as the first negative sample.

[0091] S204 : Determine a mutual information loss value using a mutual information loss function according to the first training sample, and update model parameters of the user behavior sequence model according to the mutual information loss value.

[0092] In order to accelerate the convergence speed of the user behavior sequence model and improve the model effect, the model training method of the embodiment of the present application can also introduce other user characteristics (such as interest characteristics) as auxiliary information. Figure 2 The model training method shown may further include the following steps S206:

[0093] S206: Obtain user features, wherein the user features and the current user expression belong to the same user, and the user features are used to assist in updating model parameters of the user behavior sequence model.

[0094] Specifically, step S206 can obtain user features in any of the following three ways:

[0095] Use NLP technology to process natural language of articles read by users and obtain user interest features as user features;

[0096] Alternatively, statistical features (such as age, gender, education level, etc.) are constructed based on user attributes as user features;

[0097] Alternatively, feature extraction is performed on the user behavior sequence to obtain user features. For example, TF-iDF features of the user behavior sequence can be counted based on the user behavior sequence.

[0098] Optionally, user features can be adjusted based on downstream tasks. The more relevant they are to the downstream tasks, the better the user representation learned by the model parameter update.

[0099] After obtaining the user features in step S206 , the preset conditions (ie, convergence conditions) are correspondingly changed to: the mutual information between the current user expression and the user behavior sequence is maximum and the mutual information between the user features and the current user expression is maximum.

[0100] Accordingly, step S204 may further include the following steps S2041-S2045:

[0101] S2041. Determine a first mutual information loss value using a first mutual information loss function according to the first training sample.

[0102] To maximize the mutual information between the current user's expression and the user's behavior sequence, a first mutual information loss function can be introduced. This first mutual information loss function can be any of the following: KL divergence (Kullback–Leibler divergence, also known as relative entropy), JS divergence (Jensen–Shannon divergence), or noise-contrastive estimation (NCE) loss functions.

[0103] Specifically, step S2041 may further include the following steps S20411 and S20412:

[0104] S20411. Input the first training sample into a first multi-layer perceptron for scoring to obtain a first scoring result;

[0105] S20412. According to the first scoring result, a first mutual information loss function is used to obtain a first mutual information loss value.

[0106] In the embodiment of the present application, the first positive sample and the first negative sample of the first training sample can be input into a multi-layer perceptron (i.e., the first multi-layer perceptron) respectively. The first multi-layer perceptron is used to fit the first mutual information loss function for calculating mutual information. Optionally, the number of layers of the first multi-layer perceptron can be selected according to actual needs. For example, the first multi-layer perceptron is selected to be a 3-layer perceptron. Figure 5 As shown, the first positive sample 501 and the first negative sample 502 constructed in steps S2031 and S2032 are respectively input into the first multi-layer perceptron (Score function T w ) to obtain the corresponding first positive sample score (Real score) and first negative sample score (Fake score). The score represents the size of the mutual information. Then, the first positive sample score and the first negative sample score can be used to maximize the mutual information between the user expression and the user behavior sequence for training.

[0107] For example, JS divergence (Jensen–Shannon divergence) is used as the first mutual information loss function, then the first mutual information loss value is The calculation formula is:

[0108]

[0109] In formula (1), JSD represents JS divergence, X is the input user behavior sequence, is a set of other user behavior sequences randomly sampled from the same batch, x and X and The elements in, f function is the sequence modeling model, sp is the softplus function, T w is the first multi-layer perceptron, T w (x,f θ (x)) is the score given by the first multi-layer perceptron to the first positive sample, is the score assigned by the first multilayer perceptron to the first negative sample. θ and w are the model parameters that need to be updated and optimized. The smaller the first mutual information loss value, the greater the mutual information between the current user expression and the user behavior sequence.

[0110] S2042. Determine a second training sample based on the user characteristics and the current user expression;

[0111] Similar to step S203, in this embodiment of the present application, a vector obtained by concatenating the current user expression and the user feature can be used as a second training sample. The second training sample includes a third positive sample and a fourth negative sample. Then, step S2042 can further include the following steps S20421 and S20422:

[0112] S20421. Concatenate the current user expression and the user features to generate a vector as a third positive sample;

[0113] S20422. Concatenate the current user expression and the fake user features to generate a vector as a fourth negative sample, where the fake user features and the user features are processed in the same batch.

[0114] like Figure 6 As shown, Figure 4 Similar to the fake user behavior sequence of , fake user features are other user features randomly sampled from the same batch as the acquired user features. In other words, fake user features refer to user features after excluding the current user features. For example, if the input user features include the user features of the current user A, as well as the user features of users B, C, and D, and user B and observed user A are from the same batch, then the fake user features corresponding to observed user A are user features of user B.

[0115] like Figure 6 As shown, the current user expression y is respectively compared with the obtained user feature c u Concatenate the generated vectors As the third positive sample, is the splicing symbol; the current user expression y is respectively combined with the sampled false user features Concatenate the generated vectors as the fourth negative sample.

[0116] S2043. Determine a second mutual information loss value using a second mutual information loss function according to the second training sample.

[0117] Similar to the first mutual information loss function, the second mutual information loss function can be any of the following: KL divergence (Kullback–Leibler divergence, also called relative entropy), JS divergence (Jensen–Shannon divergence), noise-contrastive estimation (NCE) loss function, etc.

[0118] Specifically, step S2043 may further include the following steps S20431 and S20432:

[0119] S20431. Input the second training sample into a second multilayer perceptron for scoring to obtain a second scoring result;

[0120] S20432. According to the second scoring result, a second mutual information loss function is used to obtain a second mutual information loss value.

[0121] In this embodiment of the present application, the third positive sample and the fourth negative sample of the second training sample can be A multilayer perceptron (i.e., the second multilayer perceptron) is input respectively. The second multilayer perceptron is used to fit the second mutual information loss function for calculating mutual information. Optionally, the number of layers of the second multilayer perceptron can be selected according to actual needs. For example, the second multilayer perceptron is selected to be a 3-layer perceptron. Figure 6 As shown, the third positive sample constructed in steps S20421 and S20422 and the fourth negative sample Input the second multi-layer perceptron (Score function T w′ ) to obtain the corresponding third positive sample score (Real score) and fourth negative sample score (Fake score). The score represents the size of the mutual information. Then, the third positive sample score and the fourth negative sample score can be used to maximize the mutual information between user expression and user features for training.

[0122] For example, JS divergence (Jensen–Shannon divergence) is used as the second mutual information loss function, then the second mutual information loss value is The calculation formula is:

[0123]

[0124] In formula (2), JSD represents JS divergence, C is the input user feature, is a set of other user features randomly sampled from the same batch, for The elements in, f function is the sequence modeling model, sp is the soft plus function, T w′ is the second multi-layer perceptron, T w′ (c,f θ (x))) is the score given by the second multi-layer perceptron for the third positive sample, is the score assigned by the second multilayer perceptron for the fourth negative sample. θ and w are the model parameters that need to be updated and optimized. The smaller the second mutual information loss value, the greater the mutual information between the current user expression and the user's features.

[0125] S2044: Determine a mutual information loss value according to the first mutual information loss value and the second mutual information loss value.

[0126] Specifically, the total mutual information loss value may be obtained according to the weighted sum of the first mutual information loss value and the second mutual information loss value.

[0127] For example, steps S2041 and S2043 use JS divergence (Jensen–Shannon divergence) to calculate the first mutual information loss value and the second mutual information loss value After that, the total mutual information loss value L(θ,w,w′) can be calculated as:

[0128]

[0129] Among them, α is the ratio between the first mutual information loss value and the second mutual information loss value.

[0130] S2045. Update the model parameters of the user behavior sequence model according to the mutual information loss value.

[0131] In an embodiment of the present application, the model parameters of the user behavior sequence model can be updated by the gradient descent method, and the new model parameters are obtained as the current model parameters by reducing the gradient of the model parameters. The gradient descent method can be a stochastic gradient descent (SGD) descent algorithm, a batch gradient descent (BGD) descent algorithm, an adaptive moment estimation (ADAM) optimization algorithm, etc. It is understandable that the current model parameters can also be updated using an evolutionary algorithm, etc., and the evolutionary algorithm includes a population-based genetic algorithm, etc.

[0132] S205: Use the updated model parameters as current model parameters and return to step S202 until the current model parameters meet the preset conditions.

[0133] In the embodiment of the present application, the preset condition (convergence condition) is that the mutual information takes the maximum value. The mutual information can be maximized when the mutual information between the current user expression and the user behavior sequence is maximized (without introducing user features), or when the mutual information between the current user expression and the user behavior sequence is maximized and the mutual information between the current user expression and the user features is maximized (after introducing user features).

[0134] In step S205 of the embodiment of the present application, before the preset conditions (i.e., convergence conditions) are met, steps S202-S204 are repeatedly executed to iteratively update the model parameters of the user behavior sequence, so that model parameters that meet the preset conditions can be obtained as pre-trained model parameters.

[0135] Optionally, Figure 2 The model training method shown may further include the following steps S207:

[0136] S207: Use the supervised data to adjust the parameters of the user behavior sequence model.

[0137] After obtaining the pre-trained user behavior sequence model through step S206, supervised learning can be performed using a smaller amount of supervised data based on actual downstream tasks, such as user attribute inference, next-moment user reading prediction, and recommendation tasks of the recommendation system, thereby obtaining a model suitable for downstream tasks through transfer learning methods such as fine-tuning.

[0138] It's understandable that transfer learning can also use a convolutional network as a fixed feature extractor. Take a pretrained convolutional network, remove the fully connected layers, and use the remaining layers as a feature extractor. Then, through the AlexNet network, a 4096-dimensional feature vector, called CNN codes, is calculated. Using these feature vectors, a linear classifier is trained to achieve transfer learning of model parameters.

[0139] In summary, the user behavior model training scheme of the embodiment of the present application introduces the loss target of mutual information maximization into the field of user behavior sequence modeling, and realizes model pre-training of user behavior sequence modeling through an unsupervised learning method based on mutual information maximization. It does not require manual labeling costs, and does not require the construction of complex end-to-end models, thereby reducing the training time and cost of user behavior sequence models, and can obtain the effect of supervised learning end-to-end models on multiple specific downstream tasks, while having the advantages of unsupervised learning models. In addition, the scheme improves the quality of learning expression by introducing user features related to downstream tasks as auxiliary information for model parameter updates, and can make full use of user feature information existing in the actual system to improve the effect and performance of user behavior sequence modeling. The scheme has broad application prospects in the fields of user recommendation, user classification, user big data analysis and mining, etc.

[0140] Taking the extraction of user features from user behavior sequences, the mutual information loss function adopts JS divergence (Jensen–Shannon divergence), the first multi-layer perceptron and the second multi-layer perceptron are 3-layer perceptrons, and the transfer learning method adopts Fine-tuning for parameter adjustment as an example, the model training method of the embodiment of the present application is applied to obtain Figure 7 An application scenario embodiment is shown in FIG. Figure 7 As shown, the training method for this application scenario mainly includes the following steps: Step 1, Step 2, and Step 3:

[0141] Step 1: Data preprocessing: Perform data preprocessing on the input user behavior logs and other user feature information to achieve feature construction and preliminary extraction.

[0142] Specifically, step 1 can use the method of steps S201 and S2021 above to obtain the vectorized user behavior sequence as the input of the model, which will not be repeated here. Step 1 can also use the TF-iDF features extracted in step S206 as user features, which are also used as the input of the model.

[0143] Step 2: Pre-training modeling: Input the vectorized user behavior sequence and user features, and pre-train the model with the goal of maximizing mutual information.

[0144] Specifically, step 2 can use the transformer model in the aforementioned step S202 to extract the current user expression, and then construct the first positive sample and the first negative sample according to the method of the aforementioned steps S2031 and S2032, and at the same time construct the third positive sample and the fourth negative sample according to the aforementioned steps S20421 and S20422; then, use formula (1) and formula (2) to respectively calculate the first mutual information loss value and the second mutual information loss value Then, the total mutual information loss value is calculated according to formula (3); finally, the model parameters are iteratively updated and trained according to the total mutual information loss value until the current model parameters meet the preset conditions, thereby obtaining a pre-trained user behavior sequence model.

[0145] Step 3: Fine-tuning based on downstream tasks: Based on the actual downstream tasks, fine-tuning the pre-trained model using supervised data.

[0146] During the fine-tuning phase, subtle model modifications may be necessary depending on the downstream task. For classification tasks like user attribute inference, one can add one or two fully connected neural network layers to the pre-trained model, aligning the dimensions of the final output layer with the desired number of categories. A soft max function can then be added. The model can then be fine-tuned based on a smaller amount of labeled supervised data. The model loss can be calculated using commonly used loss functions for classification tasks, such as cross entropy.

[0147] Because the pre-trained user behavior sequence model obtained in step 2 has been fully trained, minor parameter adjustments are now required based on the downstream task. The newly added classification neural network is randomly initialized and requires further training and optimization using optimization learning methods such as the Adam algorithm. Therefore, this embodiment allows for varying the learning rates of the two components based on actual needs. For example, the initial learning rate of the newly added classification neural network can be set to 10 times the initial learning rate of the pre-trained user behavior sequence model.

[0148] Reference Figure 8 , the embodiment of the present application also provides a recommendation method, comprising the following steps:

[0149] S801, through Figure 2 The user behavior model training method shown obtains a pre-trained user behavior sequence model;

[0150] S802: Use the recommended supervision data to adjust the parameters of the user behavior sequence model to obtain a user recommendation model;

[0151] S803: Make recommendations based on the user recommendation model.

[0152] In the embodiment of the present application, recommendation supervision data refers to data with labels (i.e., annotations) and related to downstream tasks such as user recommendations. The recommendation supervision data can come from various business scenarios related to user recommendations. For example, in the user recommendation scenario of a game, the recommendation supervision data can be a historical purchase record of a certain user or a certain type of user for purchasing virtual props or virtual items in the game. The basic information associated with the user's purchase behavior is recorded in the historical purchase record, such as the user's game ID, purchase time, etc., then the corresponding label can be set to "purchased virtual props or virtual items" or "did not purchase virtual props or virtual items." In this way, through the embodiment of the present application Figure 2 The model training method shown pre-trains a user behavior sequence model (such as a feature extraction model of user purchase preferences), that is, the user behavior sequence model can be combined with the recommendation supervision data to fine-tune the parameters, thereby obtaining a game item (including virtual props or virtual items) recommendation model, so as to recommend the game items preferred by the user or the type of user to the actual user, thereby increasing the success rate of the user or the type of user accepting the recommendation and purchasing the game item. The above embodiment is only an application embodiment of a business scenario related to user recommendation. It can be understood by those skilled in the art that this solution is also applicable to user recommendation scenarios such as news subscription recommendations, novel subscription recommendations, video subscription recommendations, browsing page layout recommendations or browsing style recommendations, etc., which are not listed one by one here.

[0153] And, understandably, Figure 2 The contents of the model training method embodiment shown in the figure are applicable to the embodiment of the recommended method. The functions specifically implemented in the pre-training process of the user behavior sequence model in the embodiment of the recommended method are the same as those in the embodiment of the model training method shown in the figure. Figure 2 The model training method embodiment shown is the same as that of Figure 2 The beneficial effects achieved by the model training method embodiment shown are also the same.

[0154] In addition, the user recommendation method of the embodiment of the present application has also been successfully applied in a domestic game platform with a large number of users. The use of this recommendation method increased the user registration rate of a game on the game platform by 1.11%, which well demonstrates the performance and effect of this user recommendation method.

[0155] Reference Figure 9 , the embodiment of the present application also provides a classification method, comprising the following steps:

[0156] S901. Obtain a pre-trained user behavior sequence model through a model training method;

[0157] S902: Use the classification supervision data to adjust the parameters of the user behavior sequence model to obtain a user classification model;

[0158] S903: Classify according to the user classification model.

[0159] In the embodiment of the present application, the classification supervision data refers to data with labels (i.e., annotations) and related to downstream tasks such as user classification. The classification supervision data can come from various business scenarios related to user classification. For example, in the user's basic attribute classification scenario, the classification supervision data can be the historical record data of users who have performed a certain behavior (such as reading an article, etc.), and the historical record data records the basic attribute information of the user who has performed the behavior, such as the user's gender, the user's age group, and the time when the behavior occurred, etc. Taking the user's basic attribute as the user's age group as an example, the corresponding label can be set to "the user is over the age group (such as 30 years old)" or "the user is not older than the age group (such as 30 years old)". In this way, through the embodiment of the present application Figure 2 The model training method shown pre-trains a user behavior sequence model (such as a feature extraction model of the user's basic attributes), that is, the user behavior sequence model can be fine-tuned in combination with the recommendation supervision data to obtain a user attribute classification model, thereby laying the foundation for mining user information such as user preferences. The above embodiment is only an application embodiment of a business scenario related to user classification. It can be understood by those skilled in the art that this solution is also applicable to user classification scenarios such as tenant user management classification, application platform registration user classification, etc., which will not be listed one by one here.

[0160] And, understandably, Figure 2 The contents of the model training method embodiment shown in the figure are applicable to the classification method embodiment. The functions specifically implemented in the classification method embodiment during the pre-training of the user behavior sequence model are the same as those in the Figure 2 The model training method embodiment shown is the same as that of Figure 2 The beneficial effects achieved by the model training method embodiment shown are also the same.

[0161] In addition, the embodiment of the present application also selected the public account reading data of a certain city as the training sample data, and used gender binary classification (predicting whether it is male or female) and age binary classification (predicting whether it is over 30 years old) as specific application scenarios. The supervised learning method and the model pre-training + fine-tuning method of the embodiment of the present application were used to perform user binary classification. The evaluation index results of various machine learning models are shown in Table 1 below.

[0162] Table 1

[0163]

[0164] In Table 1, the words "supervised learning" are supervised learning methods, and the words "fine-tuning" are model pre-training + fine-tuning methods of the embodiment of the present application. As can be seen from Table 1, the values ​​of the three indicators of Accuracy, Precision, and F1-score (the higher the value, the better the performance) of the method of the embodiment of the present application are higher than the results of the supervised learning method, while the value of the indicator Recall is lower than the result of the supervised learning method, which proves that the classification method of the embodiment of the present application can improve the training speed and efficiency of the classification model while also having better model performance and effect.

[0165] Reference Figure 10 , the embodiment of the present application also provides a model training device, including:

[0166] User behavior sequence acquisition module 1001, used to acquire user behavior sequence;

[0167] The user expression determination module 1002 is used to input the user behavior sequence into the user behavior sequence model under the current model parameters to obtain the current user expression;

[0168] A first training sample construction module 1003 is configured to obtain a first training sample based on the current user expression and user behavior sequence;

[0169] A model updating module 1004 is configured to determine a mutual information loss value using a mutual information loss function according to the first training sample, and update model parameters of the user behavior sequence model according to the mutual information loss value;

[0170] The return module 1005 is used to use the updated model parameters as the current model parameters and return to the user expression determination module 1002 for execution until the current model parameters meet the preset conditions, wherein the preset condition is that the mutual information between the current user expression and the user behavior sequence is the maximum value.

[0171] Figure 2 The contents of the model training method embodiment shown in the figure are applicable to the embodiment of the model training device. The functions specifically implemented by the embodiment of the model training device are the same as those in the embodiment of the model training method shown in the figure. Figure 2 The model training method embodiment shown is the same as that of Figure 2 The beneficial effects achieved by the model training method embodiment shown are also the same.

[0172] Reference Figure 11 , an embodiment of the present application further provides a computer device, including:

[0173] Processor 1101;

[0174] Memory 1102, used for storing programs;

[0175] The processor is used to execute the program stored in the memory 1102 Figure 2 The model training method shown, Figure 8 The user recommendation method shown or Figure 9 User classification method shown.

[0176] Figure 2 The model training method embodiment shown, Figure 8 The user recommendation method embodiment shown or Figure 9 The contents of the user classification method embodiment shown in the figure are applicable to the computer device embodiment. The functions specifically implemented by the computer device embodiment are the same as those in the embodiment shown in the figure. Figure 2 The model training method embodiment shown, Figure 8 The user recommendation method embodiment shown or Figure 9 The user classification method embodiment shown is the same as that shown in FIG. Figure 2 The model training method embodiment shown, Figure 8 The user recommendation method embodiment shown or Figure 9 The beneficial effects achieved by the user classification method embodiment shown are also the same.

[0177] The present invention also provides a storage medium that stores a program, which is executed by a processor. Figure 2 The model training method shown, Figure 8 The user recommendation method shown or Figure 9 User classification method shown.

[0178] Figure 2 The model training method embodiment shown, Figure 8 The user recommendation method embodiment shown or Figure 9 The contents of the user classification method embodiment shown in the figure are applicable to the embodiment of this storage medium. The functions specifically implemented by this storage medium embodiment are the same as those in the embodiment of the user classification method shown in the figure. Figure 2 The model training method embodiment shown, Figure 8 The user recommendation method embodiment shown or Figure 9 The user classification method embodiment shown is the same as that shown in FIG. Figure 2 The model training method embodiment shown, Figure 8 The user recommendation method embodiment shown or Figure 9 The beneficial effects achieved by the user classification method embodiment shown are also the same.

[0179] The present application also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs Figure 2 、 Figure 8 or Figure 9 The method shown.

[0180] It is understood that all or some steps, systems in the disclosed method above can be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components can be implemented as software by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application specific integrated circuit. Such software can be distributed on a computer-readable medium, and the computer-readable medium can include computer storage media (or non-transitory media) and communication media (or temporary media). As known to those of ordinary skill in the art, the term computer storage medium is included in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data) and is volatile and non-volatile, removable and non-removable media. Computer storage media includes but is not limited to RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassette, magnetic tape, disk storage or other magnetic storage device, or can be used to store desired information and any other medium that can be accessed by a computer. Furthermore, as is well known to those skilled in the art, communication media typically embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0181] The embodiments of the present application are described in detail above in conjunction with the accompanying drawings, but the present application is not limited to the above embodiments. Various changes can be made within the scope of knowledge possessed by ordinary technicians in the technical field without departing from the purpose of the present application.

Claims

1. A user behavior model training method, characterized in that: The following steps are involved: Get user behavior sequence; Vectorizing the user behavior sequence to obtain the vectorized user behavior sequence, inputting the vectorized user behavior sequence into a user behavior sequence model under current model parameters, extracting a plurality of first features, and aggregating each of the first features to obtain a current user expression; Obtaining a first training sample according to the current user expression and the user behavior sequence; Determining a mutual information loss value using a mutual information loss function according to the first training sample, and updating model parameters of the user behavior sequence model according to the mutual information loss value; Using the updated model parameters as the current model parameters, returning to execute vectorization of the user behavior sequence to obtain the vectorized user behavior sequence, inputting the vectorized user behavior sequence into the user behavior sequence model under the current model parameters, extracting a plurality of first features, aggregating each of the first features, and obtaining the current user expression step, until the current model parameters meet a preset condition, wherein the preset condition is that the mutual information between the current user expression and the user behavior sequence is maximum.

2. A user behavior model training method according to claim 1, characterized in that: The model training method further includes: Obtain user features, where the user features and the current user expression belong to the same user, and the user features are used to assist in updating model parameters of the user behavior sequence model.

3. A user behavior model training method according to claim 2, characterized in that: The preset condition is that the mutual information between the current user expression and the user behavior sequence is a maximum value and the mutual information between the user feature and the current user expression is a maximum value.

4. A user behavior model training method according to claim 2, characterized in that: The mutual information loss function includes a first mutual information loss function and a second mutual information loss function, and determining a mutual information loss value using the mutual information loss function according to the first training sample, and updating the model parameters of the user behavior sequence model according to the mutual information loss value, including: Determine a first mutual information loss value using the first mutual information loss function according to the first training sample; Determining a second training sample based on the user characteristics and the current user expression; Determine a second mutual information loss value using the second mutual information loss function according to the second training sample; Determining the mutual information loss value according to the first mutual information loss value and the second mutual information loss value; The model parameters of the user behavior sequence model are updated according to the mutual information loss value.

5. The user behavior model training method according to claim 2, characterized in that: The acquiring of user characteristics includes one of the following: Performing natural language processing on the article read by the user to obtain the user's interest features as the user features; Alternatively, constructing statistical features based on user attributes as the user features; Alternatively, feature extraction is performed on the user behavior sequence to obtain the user feature.

6. A user behavior model training method according to claim 1, characterized in that: The first training sample includes a first positive sample and a first negative sample, and obtaining the first training sample according to the current user expression and the user behavior sequence includes: Taking a vector generated by concatenating the current user expression and the user behavior sequence as the first positive sample; A vector generated by concatenating the current user expression and a fake user behavior sequence is used as the first negative sample, where the fake user behavior sequence and the user behavior sequence belong to the same batch processing.

7. A user behavior model training method according to claim 4, characterized in that: The second training sample includes a third positive sample and a fourth negative sample, and determining the second training sample according to the user characteristics and the current user expression includes: Taking a vector generated by concatenating the current user expression and the user feature as the third positive sample; A vector generated by concatenating the current user expression and the false user features is used as the fourth negative sample, and the false user features and the user features belong to the same batch processing.

8. The user behavior model training method according to claim 4, characterized in that: Determining a first mutual information loss value by using the first mutual information loss function according to the first training sample includes: Inputting the first training sample into a first multi-layer perceptron for scoring to obtain a first scoring result; Obtaining the first mutual information loss value using the first mutual information loss function according to the first scoring result; Determining a second mutual information loss value using the second mutual information loss function according to the second training sample includes: Inputting the second training sample into a second multilayer perceptron for scoring to obtain a second scoring result; According to the second scoring result, the second mutual information loss value is obtained using the second mutual information loss function.

9. The user behavior model training method according to claim 1, characterized in that: The model training method further includes: The supervised data is used to adjust the parameters of the user behavior sequence model.

10. A recommendation method, characterized in that: The following steps are involved: Obtaining a pre-trained user behavior sequence model by the model training method according to any one of claims 1 to 9; Using the recommended supervision data to adjust the parameters of the user behavior sequence model to obtain a user recommendation model; Recommendations are made according to the user recommendation model.

11. A model training device, characterized in that: include: User behavior sequence acquisition module, used to obtain user behavior sequence; A user expression determination module is configured to vectorize the user behavior sequence to obtain the vectorized user behavior sequence, input the vectorized user behavior sequence into a user behavior sequence model under current model parameters, extract a plurality of first features, and aggregate each of the first features to obtain a current user expression; A first training sample construction module, configured to obtain a first training sample based on the current user expression and the user behavior sequence; a model updating module, configured to determine a mutual information loss value using a mutual information loss function according to the first training sample, and update model parameters of the user behavior sequence model according to the mutual information loss value; A return module is used to use the updated model parameters as the current model parameters and return to the user expression determination module until the current model parameters meet a preset condition, wherein the preset condition is that the mutual information between the current user expression and the user behavior sequence is maximum.

12. A computer device, characterized in that: including a processor and a memory; The memory is used to store programs; The processor is configured to execute the method according to any one of claims 1 to 10 according to the program.

13. A storage medium, characterized in that: The storage medium stores a program, and the program is executed by a processor to complete the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Information processing method, recommendation method and related equipment

    CN110851713A

  • Article recommendation method and device

    CN110992127A