Model training method and device, recommendation method and device and related equipment
By obtaining the diversity data of users and objects, predicting the user behavior probability and training the model, the user behavior deviation problem caused by the single characteristics of prediction algorithms in the prior art is solved, and the accuracy of content recommendation is improved.
Patent Information
- Application Number
- CN202411046786.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-17
AI Technical Summary
The existing prediction algorithms have relatively single characteristics when predicting user preferences, resulting in deviations in user behavior probability prediction, which in turn affects the accuracy of content recommendations.
By obtaining the user's user attribute data, behavior data and object's attribute data as training samples, the user's behavior probability to the object is predicted, and the model is trained using the loss value to improve prediction accuracy.
It improves the model's understanding of the relationship between users and objects and enhances the accuracy of content recommendations.
Smart Images

Figure CN119150926A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a model training method and device, a recommendation method and device, and related equipment. Background Art
[0002] With the emergence of information overload, users are faced with more and more choices of products and services, and need an information screening mechanism that can accurately match user interests and needs.
[0003] The existing prediction algorithms use relatively simple features when predicting user preferences, and there is a certain deviation between the user preferences obtained by analysis and the user's actual preferences and interests. For example, the collaborative filtering algorithm mainly relies on the user's historical behavior and preferences, as well as the similarity between users for prediction. For another example, the content filtering algorithm mainly relies on the characteristics of the content and the user's interests for prediction. Therefore, when the collaborative filtering algorithm or the content filtering algorithm uses a relatively simple feature to predict user preferences, there is a certain deviation in the predicted user behavior probability, which easily leads to low accuracy of content recommendation based on the prediction algorithm. Summary of the invention
[0004] In view of the above, it is necessary to provide a model training method and device, a recommendation method and device, and related equipment to solve the problem that there is a certain deviation in the user behavior probability predicted by the relevant prediction algorithm, resulting in low accuracy of subsequent content recommendation based on the first model.
[0005] In a first aspect, an embodiment of the present application provides a model training method, the method comprising: determining a first training sample, the first training sample comprising first user attribute data of a first sample user, first behavior data of the first sample user on a first sample object, and first object attribute data of the first sample object; determining a first behavior label and a user click rate of the first sample user on the first sample object based on the first behavior data, and determining an object click rate of the first sample object based on the first object attribute data; predicting the first behavior probability of the first sample user on the first sample object based on the first user attribute data, the first behavior data, and the first object attribute data; determining a first loss value based on the first behavior label, the first behavior probability, the user click rate, and the object click rate; and training a first model based on the first loss value.
[0006] In a second aspect, an embodiment of the present application provides a recommendation method, which includes: obtaining target user attribute data of a target user, second behavior data of the target user towards a recommended object, and target object attribute data of the object to be recommended; predicting the probability of the target user's second behavior towards the object to be recommended based on the target user attribute data, the second behavior data, and the target object attribute data; and determining the target recommended object of the target user based on the second behavior probability.
[0007] In a third aspect, an embodiment of the present application provides a model training device, which includes: a determination module, used to determine a first training sample, the first training sample including first user attribute data of a first sample user, first behavior data of the first sample user on a first sample object, and first object attribute data of the first sample object; the determination module, also used to determine a first behavior label and a user click rate of the first sample user on the first sample object based on the first behavior data, and determine an object click rate of the first sample object based on the first object attribute data; a prediction module, used to predict the first behavior probability of the first sample user on the first sample object based on the first user attribute data, the first behavior data, and the first object attribute data; a calculation module, used to determine a first loss value based on the first behavior label, the first behavior probability, the user click rate, and the object click rate; a training module, used to train a first model based on the first loss value.
[0008] In a fourth aspect, an embodiment of the present application provides a recommendation device, comprising: an acquisition module, used to acquire target user attribute data of a target user, second behavior data of the target user towards the object to be recommended, and target object attribute data of the object to be recommended; a prediction module, used to predict the probability of the target user's second behavior towards the object to be recommended based on the target user attribute data, the second behavior data, and the target object attribute data; and a recommendation module, used to determine the target recommended object of the target user based on the second behavior probability.
[0009] In a fifth aspect, an embodiment of the present application provides a computer device, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the above-mentioned model training method or the above-mentioned recommendation method when executing the computer-readable instructions.
[0010] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the above-mentioned model training method or the above-mentioned recommendation method is implemented.
[0011] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the above-mentioned model training method or the above-mentioned recommendation method when executed by a processor.
[0012] In the model training method provided in the embodiment of the present application, by obtaining the first user attribute data of the first sample user, the first behavior data of the first sample user on the first sample object, and the first object attribute data of the first sample object as the first training sample, the diversity of the first training sample is enriched, which helps to improve the first model's ability to understand the relationship between different users and objects. By comprehensively considering the user click rate and content click rate corresponding to the sample content to calculate the first loss value of the first model, and using the first loss value for model training, the first model's ability to understand the relationship between the first sample user and the first sample object can be further improved, and the prediction accuracy of the first model can be improved, which is conducive to improving the accuracy of object recommendation using the first model. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0014] Figure 1 Schematic diagram of application scenarios of the model training method and recommendation method provided in the embodiments of the present application.
[0015] Figure 2 A flowchart for implementing the model training method provided in an embodiment of the present application.
[0016] Figure 3 This is an example diagram of the user interaction interface provided in an embodiment of the present application.
[0017] Figure 4 A flowchart for implementing the behavior probability prediction method provided in an embodiment of the present application.
[0018] Figure 5 A flowchart for implementing the recommended method provided in the embodiment of the present application.
[0019] Figure 6 A flowchart for implementing the method for determining a target recommendation object provided in an embodiment of the present application.
[0020] Figure 7 A flowchart for implementing the second model training method provided in an embodiment of the present application.
[0021] Figure 8A schematic diagram of the structure of a model training device provided in an embodiment of the present application.
[0022] Fig. 9 A schematic diagram of the structure of a recommended device provided in an embodiment of the present application.
[0023] Fig.10 A schematic diagram of the hardware structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0025] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.
[0026] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by technicians in the technical field in this application. The terms used in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. It should be understood that, unless otherwise specified in this application, " / " means or. For example, A / B can represent A or B. "And / or" in this application is only a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. "At least one" means one or more. "Multiple" means two or more than two. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, a, b and c seven situations.
[0027] See also Figure 1 , Figure 1 Schematic diagram of application scenarios of the model training method and recommendation method provided in the embodiment of the present application. Figure 1As shown, the computer device 100 is connected to the terminal device 200 through network communication.
[0028] In some embodiments, the computer device 100 may perform model training of the first model, and recommend a target recommended object to the target user, and send the target recommended object to the terminal device 200. The terminal device 200 may display the target recommended object in a preset interface for interacting with the target user.
[0029] In the process of implementing the model training of the first model, the computer device 100 can determine the first training sample, wherein the first training sample includes the first user attribute data of the first sample user, the first behavior data of the first sample user on the first sample object, and the first object attribute data of the first sample object. The computer device 100 can determine the first behavior label of the first sample user on the first sample object, the user click rate, and the object click rate of the first sample object determined according to the first object attribute data based on the first behavior data. In the process of training the first model using the first training sample, the computer device 100 predicts the first behavior probability of the first sample user on the first sample object based on the first user attribute data, the first behavior data, and the first object attribute data, and determines the first loss value based on the first behavior label, the first behavior probability, the user click rate, and the object click rate. Then, the computer device 100 trains the first model according to the first loss value. The use of this method can effectively improve the prediction accuracy of the first model.
[0030] In the process of implementing the recommendation for the user, the computer device 100 obtains the target user attribute data of the target user, the second behavior data of the target user towards the recommended object, and the target object attribute data of the to-be-recommended object, and predicts the second behavior probability of the target user towards the recommended object based on the target user attribute data, the second behavior data, and the target object attribute data. The computer device 100 determines the target recommended object of the target user based on the second behavior probability.
[0031] In some embodiments, the communication connection between the computer device 100 and the terminal device 200 includes, but is not limited to, wired communication connection and wireless communication connection. The wireless communication connection includes, but is not limited to, communication connection via Bluetooth, cellular network, Wireless Fidelity (Wi-Fi) technology, and the like.
[0032] In some embodiments, the computer device 100 may be an independent server, a computer or other device, or a server cluster or distributed system composed of multiple servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud storage, cloud computing, cloud functions, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), big data, and artificial intelligence platforms. The terminal device 200 may be any one or more of a mobile phone, a tablet computer, a laptop computer, a PDA, a wearable device, and other devices.
[0033] Figure 1 The scenarios shown are only illustrative examples, and the device control method provided in this application can also be applied in other scenarios. For example, in some scenarios, multiple computer devices 100 and multiple terminal devices 200 may be included; in some scenarios, computer devices 100 may be included, but terminal devices 200 are not included; in some scenarios, computer devices 100 and servers may also be included, but terminal devices 200 are not included; in some scenarios, other types of devices may also be included. The embodiments of this application do not limit the specific application scenarios of the preset model training method, the second model training method, and the recommendation method.
[0034] See also Figure 2 , Figure 2 This is a flowchart of the implementation of the model training method provided in the embodiment of the present application. The model training method is applied to a computer device. The embodiment of the present application uses the model training method to Figure 1 The computer device 100 in FIG. 1 is used as an example for explanation. The model training method includes the following steps.
[0035] S11: Determine a first training sample.
[0036] In some embodiments, the first training sample includes first user attribute data of a first sample user, first behavior data of the first sample user on a first sample object, and first object attribute data of the first sample object.
[0037] In some embodiments, the first training sample may include multiple first sample objects of the same type or different types. Among them, the first sample user is the data of the sample user used in the first model training process. For example, the first sample user can be represented by an account name, name, or other pre-set user identifiers. The first sample object is the data of the sample object used in the model training process. The first sample object may include information objects that can be viewed and read on the Internet. For example, the first sample object may include music, videos, e-books, online articles, news, information, advertisements, etc., and may also include related information such as products, goods, and services. The embodiment of the present application does not limit the form of expression of the first sample user and the specific type of the content of the first sample object.
[0038] In some embodiments, the first user attribute data includes data related to personal information of the first sample user. For example, the first user attribute data may include any one or more of the attribute data of the first sample user, such as gender, age, occupation, hobbies, and geographic location. The embodiment of the present application does not limit the type of the first user attribute data.
[0039] In some embodiments, the first object attribute data includes data related to attribute information of the first sample object. For example, the first object attribute data may include any one or more of the attribute data of the first sample object, such as the object category, label, author, and rating. The first object attribute data may also include data related to the statistical characteristics of the first sample object, such as the number of exposures of the first sample object, the number of clicks on the first sample object, etc. The embodiment of the present application does not limit the type of the first object attribute data.
[0040] In some embodiments, the first behavior data includes historical behavior data generated by the first sample user on the first sample object. For example, the first behavior data may be behavior data of the type of click or non-click, favorite or non-favorite, purchase or non-purchase, follow or non-follow, like or non-like. The first behavior data may also include the number of clicks of the first sample user on the first sample object, the user click rate, etc. The embodiment of the present application does not limit the specific type and specific content of the first behavior data.
[0041] As an example, in the first training sample, the first sample user is user A, and the first sample objects include: object 1, object 2, object 3, and object 4; the first user attribute data of user A includes: gender is female, age is 25, and geographical location is Guangzhou. The first object attribute data corresponding to object 1 includes: category is movie, label is science fiction, and score is 8.5. The first object attribute data corresponding to object 2 includes: category is e-book, label is novel, and score is 9.0. The first object attribute data corresponding to object 3 includes: category is music, label is popular, and score is 8.0. The first object attribute data corresponding to object 4 includes: category is video, label is education, and score is 9.5. The first behavior data of user A includes: user A clicks on object 1 and object 3, user A collects object 2, and user A does not have any behavior on object 4. The first behavior data of user A may also include: user A clicks on object 1 4 times, user A clicks on object 2 3 times, and user A clicks on object 1 5 times.
[0042] As another example, in the first training sample, the first sample user is user B; the first sample objects include: object 1, object 2, object 3, and object 4; the first user attribute data of user B include: gender is male, age is 30, and geographical location is Shanghai; the first object attribute data corresponding to object 1 include: category is movie, label is science fiction, and score is 8.5; the first object attribute data corresponding to object 2 include: category is e-book, label is novel, and score is 9.0; the first object attribute data corresponding to object 3 include: category is music, label is popular, and score is 8.0; the first object attribute data corresponding to object 4 include: category is video, label is education, and score is 9.5; the first behavior data of user B includes that user B likes object 1, clicks object 2, purchases object 3, and user B does not take any action on object 4.
[0043] In some embodiments, for any two groups of first training samples, the first sample users may be the same or different.
[0044] The embodiment of the present application enriches the diversity of the first training samples by obtaining first user attribute data, first behavior data and first object attribute data as the first training samples, which helps to improve the first model's ability to understand the relationship between different users and objects, thereby improving the accuracy of predicting the probability of a user's behavior towards an object through the first model.
[0045] In some embodiments, the method of obtaining the first training data can be customized. For example, the computer device can obtain the first training data by analyzing the user's log data, or can obtain the first training data through the application program interface of the relevant service or platform, or can obtain the first training data through a network tracker (cookies) and cache, a third-party data analysis tool (such as Hotjar, Mixpanel, etc.). The embodiment of the present application does not limit the method of obtaining the first training data.
[0046] In an embodiment of the present application, a computer device obtains first behavior data of a first sample user on a first sample object and first object attribute data of the first sample object as a first training sample. For a newly added object, the first model can also learn the interaction between the user and the newly added object, and consider the exposure of the newly added object, thereby alleviating the cold start problem of the newly added object.
[0047] In some embodiments, the original sample data in the first training sample obtained may contain a lot of redundant information and / or missing information, which affects the prediction accuracy of the first model. In order to solve this problem, the computer device can pre-process the original data in the first training sample after obtaining the first training sample. For example, the pre-processing may include checking the integrity, accuracy, consistency and relevance of the data in the first training sample, and performing data cleaning on the first training sample.
[0048] In some other embodiments, the computer device preprocessing the first training sample may further include data labeling, data division, data enhancement, etc. The embodiment of the present application does not limit the specific method of preprocessing.
[0049] S12: Determine a first behavior label and a user click rate of a first sample user for a first sample object according to the first behavior data, and determine an object click rate of the first sample object according to the first object attribute data.
[0050] In some embodiments, the user click rate reflects the interaction frequency between the first sample user and the first sample object. The computer device can obtain the user click rate of the first sample user on the first sample object by calculating the ratio of the number of clicks of the first sample user on the first sample object to the number of exposures of the first sample object. For example, in the first training sample, the first sample object includes object A, the number of clicks of the first sample user on object A is 50, and the number of exposures of object A is 1000, then the user click rate of the first sample user on object A is 0.05.
[0051] In some embodiments, the object click rate represents the interaction frequency between all users and the first sample object. The computer device can obtain the object click rate of the first sample object by calculating the ratio of the number of clicks on the first sample object (the number of clicks on the first sample object by all users) to the number of exposures of the first sample object. For example, in the first training sample, the first sample object includes object A, the number of clicks on object A is 100, and the number of exposures of object A is 1000, then the corresponding object click rate of object A is 0.1.
[0052] In some embodiments, the first behavior label represents the category of the interaction behavior between the first sample user and the first sample object. The first behavior label can be represented by a preset value, and the preset value can be customized. The embodiment of the present application does not limit the setting of the preset value. For example, if the interaction behavior between the first sample user and the first sample object is a positive feedback behavior, the first behavior label corresponding to the first sample object can be set to 1. If there is no interaction between the first sample user and the first sample object or the interaction behavior between the user and the first sample object is a negative feedback behavior, the corresponding first behavior label can be set to 0. The embodiment of the present application does not limit the setting method of the first behavior label.
[0053] In some embodiments, positive feedback behavior indicates that the user shows preference or interest in the object, while negative feedback behavior indicates that the user shows dislike or disinterest in the object.
[0054] In some embodiments, positive feedback and negative feedback can be customized. For example, positive feedback can include a user clicking, collecting, liking, or purchasing an object. Figure 3 As shown in the figure, when the object is a "picture", if the user clicks the follow button, favorite button, like button and other controls through the user interaction interface showing the "picture" content, it means that the user is interested in the "picture" content. At this time, the user's behavior of clicking the follow button, favorite button, like button and other controls is a positive feedback behavior. Negative feedback behavior can include the user giving a bad review to the object.
[0055] In other embodiments, positive feedback and negative feedback can also be determined based on the user's score or rating of the object. For example, if the user's score for the object is greater than or equal to a preset score, the interaction between the user and the object is determined to be positive feedback; if the user's score for the object is less than the preset score, the interaction between the user and the object is determined to be negative feedback. The embodiment of the present application does not limit the method for determining positive feedback and negative feedback.
[0056] In an embodiment of the present application, by comprehensively considering the user click rate of the first sample user on the first sample object and the object click rate corresponding to the first sample object for model training, the first model can better learn the association between the first sample user and the first sample object, thereby facilitating improving the accuracy of predicting the probability of the first behavior of the first sample user on the first sample object through the first model, and further facilitating improving the accuracy of object recommendation using the first model.
[0057] S13: Predicting the probability of a first behavior of the first sample user towards the first sample object based on the first user attribute data, the first behavior data and the first object attribute data.
[0058] In some embodiments, the probability of the first behavior of the first sample user on the first sample object may be the probability that the first sample user generates a specified behavior on the first sample object. The specified behavior may be a specific behavior such as clicking, collecting, purchasing, etc., or may be a positive feedback behavior or a negative feedback behavior. The first behavior probability may be used as a reference indicator for evaluating the interest of the first sample user in the first sample object.
[0059] In some embodiments, in the process of training the first model using the first training sample, the computer device can use the first user attribute data, the first behavior data, and the first object attribute data in the first training sample as inputs to the first model, use the first model to learn the association between the first sample user and the first sample object, and predict the probability of the first sample user's first behavior towards the first sample object.
[0060] In some embodiments, the first model may be a neural network model based on a cross-attention mechanism. The structure of the first model (e.g., the number of layers of the neural network, the number of neurons, etc.) may be designed based on the training task requirements and the data characteristics of the first training sample. The initial model parameters of the first model (e.g., weights, biases, and other parameters) may be randomly generated or custom set. During the model training process, the computer device uses the first training sample to iteratively train the first model according to a preset loss function and optimization algorithm, optimizes the model parameters and performance of the first model, and enables the first model to have better prediction and classification capabilities, thereby improving the prediction accuracy of the first model.
[0061] See also Figure 4 , Figure 4 FIG. 2 is a flowchart of the implementation of the behavior probability prediction method provided by the embodiment of the present application. Figure 4 As shown, the computer device predicts the probability of the first behavior of the first sample user towards the first sample object based on the first user attribute data, the first behavior data and the first object attribute data, including steps S21 to S26. The specific steps are as follows.
[0062] S21: Feature encoding is performed on the first user attribute data, the first behavior data, and the first object attribute data respectively to obtain user features, user behavior features, and object features of a first training sample.
[0063] In some embodiments, in the process of training the first model using the first training sample, in order to enable the first model to better capture the intrinsic correlation between the first user attribute data, the first behavior data, and the first object attribute data in the first training sample, while reducing the consumption of computing resources, the computer device can perform basic encoding on the first user attribute data, the first behavior data, and the first object attribute data, respectively, to convert high-dimensional, sparse or structured data into a low-dimensional dense vector representation.
[0064] In some embodiments, the first model includes an embedding layer. The computer device uses the first model to perform feature encoding on the first user attribute data, the first behavior data, and the first object attribute data, respectively, including using the embedding layer to perform feature encoding on the first user attribute data, the first behavior data, and the first object attribute data, respectively, to obtain user features, user behavior features, and object features of the first training sample.
[0065] In some embodiments, since the first user attribute data generally includes static information such as the user's age, gender, and geographic location, for the feature encoding of the first user attribute data, the computer device can map each feature value of the first user attribute data to a unique vector representation through the embedding layer of the first model.
[0066] In some embodiments, the first behavior data generally includes historical behavior data of the first sample user on the first sample object, such as click, purchase, comment and other behavior data. The first behavior data generally has a temporal relationship and has contextual information. Therefore, in the process of feature encoding the first behavior data, the computer device can classify and sort the first behavior data, convert the first behavior data into a form that can be processed by the model, and assign a unique embedding vector to each behavior type. Similar embedding processing can also be performed for other information in the first behavior data (such as the time when the behavior occurs, the target object of the behavior, etc.). Since user behavior generally has a temporal relationship, the computer device also needs to consider the temporal relationship of the first behavior data when performing feature encoding processing on the first behavior data. For example, the computer device can capture the temporal relationship of the first behavior data by using a Transformer network.
[0067] In some embodiments, the data type of the first object attribute data may include data in formats such as text, image, or video. In the process of feature encoding the first object attribute data, the computer device may select a suitable feature encoding method according to the data type of the first object attribute data. For example, for text, the computer device may map each word in the text to a vector representation through word embedding technology, such as Word2Vec technology, and use the mapped word vectors to construct an embedded representation of the entire text.
[0068] S22: Fusing user features, user behavior features, and object features to obtain sample fusion features.
[0069] In some embodiments, the method of fusing user features, user behavior features, and content features includes but is not limited to concatenating or adding user features, user behavior features, and content features. The embodiment of the present application does not limit the method of fusing user features, user behavior features, and content features.
[0070] In some embodiments, the sample fusion feature includes a feature sequence obtained by fusing user features, user behavior features, and content features through integration methods such as splicing or addition.
[0071] S23: performing sequence encoding on the sample fusion features to obtain a user behavior sequence, and determining a sample association degree between a first sample user and a first sample object according to the user behavior sequence.
[0072] In some embodiments, the computer device can perform sequence encoding on sample fusion features based on a deep learning network to obtain a user behavior sequence. The deep learning network includes but is not limited to a Transformer network, etc. The Transformer network is derived from a self-attention mechanism in natural language processing, which can achieve deep cross-features in the recommendation field and learn high-order representations of features. The embodiment of the present application takes the Transformer network as an example for explanation.
[0073] In some embodiments, the Transformer network includes an encoder and a decoder. The computer device can use the encoder in the Transformer network to perform sequence encoding on the sample fusion features, capture the relationship between different positions in the sample fusion features through a self-attention mechanism, obtain a user behavior sequence, and determine the sample association between the first sample user and the first sample object according to the user behavior sequence.
[0074] In some embodiments, the attention mechanism is usually used to improve the model's ability to focus on key information in the input sequence. Based on the attention mechanism, high-value information can be quickly filtered out from a large amount of information. The attention mechanism includes the self-attention mechanism and the cross-attention mechanism. The self-attention mechanism is mainly used to capture the correlation between different positions in the input sequence. The cross-attention mechanism mainly introduces additional input sequences and fuses information from different sources, thereby improving the modeling ability and accuracy of the model.
[0075] In an embodiment of the present application, the computer device can capture the association relationship between the first sample user and the first sample object by integrating the deep learning network and the cross-attention mechanism, thereby improving the first model's ability to understand the association relationship between the first sample user and the first sample object, thereby improving the degree of personalization of content recommendation using the first model.
[0076] S24: Based on the user behavior sequence and the positive feedback behavior features in the user behavior features, update the sample association degree.
[0077] In some embodiments, the interactive behavior generated by the first sample user on the first sample object includes positive feedback behavior and negative feedback behavior. Among them, the positive feedback behavior generated by the first sample user on the first sample object indicates that the first sample user prefers or is interested in the first sample object. The negative feedback behavior generated by the first sample user on the first sample object indicates that the first sample user does not like or is not interested in the first sample object.
[0078] In some embodiments, positive feedback and negative feedback behaviors can be customized. For example, the first sample user's positive feedback behavior on the first sample object may include the first sample user clicking, collecting, liking, or purchasing the first sample object. The first sample user's negative feedback behavior on the first sample object may include the first sample user giving a bad review to the first sample object. The embodiment of the present application does not limit the method for determining positive feedback and negative feedback behaviors.
[0079] Accordingly, the first behavior data generated by the first sample user on the first sample object includes positive feedback behavior data and negative feedback behavior data. The user behavior features obtained after feature encoding the first behavior data include positive feedback behavior features and negative feedback behavior features.
[0080] In some embodiments, in the process of using the Transformer network to sequence encode sample fusion features, the computer device can further use the cross-attention mechanism to capture the correlation between the user behavior sequence and the positive feedback behavior features in the user behavior features, update the sample correlation between the first sample user and the first sample object in the user behavior sequence, and improve the first model's ability to understand the correlation between the first sample user and the first sample object, thereby improving the degree of personalization of content recommendation using the prediction model.
[0081] In some embodiments of the present application, based on the user behavior sequence and the positive feedback behavior features in the user behavior features, the sample association is updated, including: determining the positive feedback object features of the positive feedback object according to the positive feedback behavior features, the positive feedback object being the first sample object that generates positive feedback behavior by the first sample user; calculating the sample correlation score between the user behavior sequence and the positive feedback object features; and updating the sample association according to the sample correlation score.
[0082] In some embodiments, if the first sample user generates positive feedback behavior on the first sample object, the computer device may use the first sample object as a positive feedback object, and use the object feature corresponding to the first sample object as a positive feedback object feature.
[0083] In the process of calculating the sample correlation score between the user behavior sequence and the positive feedback object feature, the computer device can use the positive feedback object feature as the query sequence, and the user behavior sequence as the key sequence and the value sequence, and determine the correlation score between the query sequence and the key sequence based on the query sequence and the key sequence. The correlation score is the sample correlation score between the user behavior sequence and the positive feedback object feature.
[0084] In some embodiments, based on the query sequence and the key sequence, the method for determining the correlation score between the query sequence and the key sequence can be customized. For example, the computer device can calculate the correlation score between the query sequence and the key sequence by a similarity measurement method such as dot product, cosine similarity, or a similarity function learned by a multi-layer perceptron (MLP) network.
[0085] The embodiment of the present application uses the positive feedback object features as the query sequence and the user behavior sequence as the key sequence and value sequence to calculate the sample correlation score between the user behavior sequence and the positive feedback object features. This can capture the potential correlation relationship between the user behavior sequence and the positive feedback objects corresponding to the positive feedback object features, help improve the first model's ability to understand the correlation relationship between the first sample user and the first sample object, and thus improve the degree of personalization of content recommendation using the prediction model.
[0086] In some embodiments, the sample correlation score between the user behavior sequence and the positive feedback object feature can reflect the sample association between the user behavior sequence and the positive feedback objects corresponding to the positive feedback object feature. Therefore, after determining the sample correlation score, the computer device can update the sample association between the first sample user and the first sample object in the user behavior sequence according to the sample correlation score.
[0087] S25: Adjust the user behavior sequence based on the updated sample association degree to obtain an adjusted user behavior sequence.
[0088] In some embodiments, the computer adjusts the user behavior sequence based on the updated sample association degree, updates the sample association degree between the first sample user and the first sample object, and obtains an adjusted user behavior sequence.
[0089] S26: Predict the adjusted user behavior sequence to obtain a first behavior probability.
[0090] In some embodiments, the adjusted user behavior sequence can reflect the association relationship between the first sample user and the first sample object in the first training sample, so that the first model can predict the first behavior probability of the first sample user on the first sample object based on the adjusted user behavior sequence.
[0091] S14: Determine a first loss value based on the first behavior label, the first behavior probability, the user click rate, and the object click rate.
[0092] In some embodiments, the first loss value can be used to measure the difference between the predicted value of the first model (e.g., the probability of the first behavior of the first sample user on the first sample object) and the true value (e.g., the first behavior label of the first sample user on the first sample object). The purpose of model training is to reduce the first loss value so that the first loss value is reduced to a preset threshold range, thereby allowing the model to converge. The preset threshold range can be customized according to actual training requirements.
[0093] In some embodiments of the present application, a first loss value is determined based on a first behavior label, a first behavior probability, a user click rate, and an object click rate, including: determining an object weight of the first sample object based on the user click rate and the object click rate; determining the first loss value based on the first behavior label, the first behavior probability, and the object weight.
[0094] In some embodiments, in order to improve the prediction accuracy of the first model, it is necessary to pay more attention to the association relationship or cross-features between the first sample user and the first sample object during the training of the first model. Based on this, in this embodiment, the computer device can use a weighted cross entropy loss function as the loss function in the training process of the first model. Among them, the object weight is introduced into the weighted cross entropy loss function, and the object weight is determined according to the user click rate of the first sample user on the first sample object and the object click rate of the first sample object. Since both the user click rate and the object click rate can reflect the association relationship between the first sample user and the first sample object, the object weight corresponding to the weighted cross entropy loss function is determined by comprehensively considering the user click rate and the object click rate, so that the first model can pay more attention to the association relationship between the first sample user and the first sample object during the training process based on the weighted cross entropy loss function.
[0095] In some embodiments, the weighted cross entropy loss function in the first model training process can be expressed as:
[0096]
[0097] Where, L recall represents the weighted cross entropy loss function; N represents the number of first training samples; C represents the category of the interaction behavior between the first sample user and the first sample object; y ij represents the first behavior label of the first sample user in the i-th first training sample for the first sample object of the j-th category; p ij represents the probability of the first behavior of the first sample user in the i-th first training sample to the first sample object of the j-th category; w ij Represents the object weight of the first sample object of the jth category in the i-th first training sample.
[0098] In some embodiments, w in the weighted cross entropy loss function is calculated as follows: ij .
[0099] w ij =α·w user,i +(1-α)·w item,j
[0100] In the formula, w ij W represents the object weight of the first sample object of the jth category in the i-th first training sample; user,i W represents the user click rate of the first sample user on the first sample object of the jth category in the i-th first training sample; item,jrepresents the object click rate of the first sample object of the jth category in the first training sample; α represents a hyperparameter for weighing the weight ratio of the first sample user and the first sample object, and the value range of α is greater than or equal to 0 and less than or equal to 1.
[0101] In some embodiments, in the process of determining the first loss value based on the first behavior label, the first behavior probability, the user click rate, and the object click rate, the computer device substitutes the user click rate and the object click rate corresponding to the first sample object in the first training sample into the calculation formula of the object weight, and the object weight corresponding to the first sample object in the first training sample can be determined. The computer device substitutes the first behavior probability, the first behavior label, and the object weight of the first training sample into the formula corresponding to the weighted cross entropy loss function, and the first loss value corresponding to the first training sample can be determined.
[0102] S15: Train the first model according to the first loss value.
[0103] In some embodiments, in the process of training the first model according to the first loss value, the computer device can set a first threshold range that the first loss value needs to meet when the model converges. If the first loss value is not within the first threshold range, the model parameters of the first model (such as the weights, biases and other parameters of the model) are adjusted, and the first model is iteratively trained to calculate the first loss value until the first loss value is within the first threshold range, and the first model training is completed. The first threshold range can be custom set.
[0104] In other embodiments, during the process of training the first model according to the first loss value, if the change trend of the first loss value becomes gentle and tends to be stable, the computer device can determine that the loss function of the first model has converged and the training of the first model is completed.
[0105] In some other embodiments, the computer device may also set a preset threshold, and when it is determined that the change in the first loss value is less than the preset threshold, it is determined that the loss function of the first model has converged.
[0106] In some other embodiments, the computer device may further set a maximum number of iterations. When the model training reaches the maximum number of iterations, it is determined that the loss function of the first model has converged regardless of whether the loss function is still decreasing.
[0107] In other embodiments, the computer device may determine whether the loss function of the first model converges by other means. The embodiment of the present application does not limit the method of determining whether the loss function converges or determining whether the first model converges.
[0108] In some embodiments, after the model training is completed, the computer device can predict the first behavior probability of the first sample user in the first training sample to the first sample object through the first model, and select user candidate objects from the first sample objects according to the first behavior probability.
[0109] In some embodiments, in the process of determining user candidate objects, the computer device may set a preset probability threshold, and if the first behavior probability is greater than the preset probability threshold, the first sample object corresponding to the first behavior probability is used as the user candidate object.
[0110] In the model training method provided in the embodiment of the present application, by obtaining the first user attribute data of the first sample user, the first behavior data of the first sample user on the first sample object, and the first object attribute data of the first sample object as the first training sample, the diversity of the first training sample is enriched, which helps to improve the first model's ability to understand the relationship between different users and objects. By comprehensively considering the user click rate and content click rate corresponding to the sample content to calculate the first loss value of the first model, and using the first loss value for model training, the first model's ability to understand the relationship between the first sample user and the first sample object can be further improved, and the prediction accuracy of the first model can be improved, which is conducive to improving the accuracy of object recommendation using the first model.
[0111] See also Figure 5 , Figure 5 The flowchart of the implementation of the recommended method provided in the embodiment of the present application is shown. The recommended method is applied to a computer device. Figure 1 The computer device 100 in FIG. 1 is used as an example for explanation. The recommended method includes the following steps.
[0112] S31: Acquire target user attribute data of the target user, the second behavior data of the target user towards the recommended object, and target object attribute data of the object to be recommended.
[0113] In some embodiments, the target user represents the user to whom the computer device recommends the object. The target sample user can be represented by an account name, name, or other pre-set user identification. The object to be recommended includes candidate object data for recommending the object to the target user. The object to be recommended may include information objects that can be viewed and read on the Internet. For example, the object to be recommended may include music, videos, e-books, online articles, news, information, advertisements, etc., and may also include relevant information such as products, goods, and services. The embodiment of the present application does not limit the specific type of the target user's form of expression and the content of the object to be recommended.
[0114] In some embodiments, the target user attribute data includes data related to the target user's personal information, etc. For example, the target user attribute data may include any one or more of the target user's gender, age, occupation, hobbies, geographic location, etc. The embodiment of the present application does not limit the type of the target user attribute data.
[0115] In some embodiments, the target object attribute data includes data related to attribute information of the object to be recommended. For example, the target object attribute data may include any one or more of the attribute data of the object to be recommended, such as the object category, label, author, and rating. The target object attribute data may also include data related to the statistical characteristics of the object to be recommended, such as the number of exposures of the object to be recommended, the number of clicks on the object to be recommended, etc. The embodiment of the present application does not limit the type of the target object attribute data.
[0116] In some embodiments, the second behavior data of the target user towards the recommended object includes the historical behavior data generated by the target user towards the recommended object. For example, the target behavior data can be behavior data of the type of click or no click, favorite or no favorite, purchase or no purchase, follow or no follow, like or no like. The target behavior data can also include the number of clicks of the target user on the recommended object, the user click rate, etc. The embodiments of the present application do not limit the specific type and specific content of the target behavior data.
[0117] S32: Predicting the probability of the target user's second behavior towards the recommended object based on the target user's attribute data, the second behavior data and the target object attribute data.
[0118] In some embodiments, the second behavior probability may be used as a reference indicator for evaluating the target user's interest in the recommended object.
[0119] In some embodiments, the computer device may use the first model to predict the probability of the target user's second behavior for the recommended object based on the target user attribute data, the second behavior data, and the target object attribute data. In this case, in order to ensure that the first model can accurately and reliably predict the probability of the second behavior corresponding to the recommended object, it is necessary to ensure that the target user attribute data, the second behavior data, and the target object attribute data input into the first model are consistent with the data format, data range, data distribution, data quality, data preprocessing, etc. of the first training sample in the first model training process.
[0120] In other embodiments, the computer device may also predict the probability of the target user's second behavior toward the recommended object in other ways.
[0121] In some embodiments of the present application, the target user's second behavior probability towards the recommended object is predicted based on the target user attribute data, the second behavior data and the target object attribute data, including: feature encoding the target user attribute data, the second behavior data and the target object attribute data respectively to obtain target user features, target user behavior features and target object features; fusing the target user features, the target user behavior features and the target object features to obtain target fusion features; sequence encoding the target fusion features to obtain a target user behavior sequence, and determining the target association between the target user and the object to be recommended based on the target user behavior sequence; updating the target association based on the target user behavior sequence and the target positive feedback behavior features in the target user behavior features; adjusting the target user behavior sequence based on the updated target association to obtain an adjusted target user behavior sequence; predicting the adjusted target user behavior sequence to obtain the second behavior probability.
[0122] In some embodiments of the present application, the target relevance is updated based on the target user behavior sequence and the target positive feedback behavior characteristics in the target user behavior characteristics, including: determining the target positive feedback object characteristics of the target positive feedback object according to the target positive feedback behavior characteristics, the target positive feedback object is the object to be recommended for the target user to generate positive feedback behavior; calculating the target relevance score between the target user behavior sequence and the target positive feedback object characteristics; and updating the target relevance according to the target relevance score.
[0123] In some embodiments, the process of predicting the probability of the target user's second behavior towards the recommended object based on the target user attribute data, the second behavior data and the target object attribute data can be referred to as Figure 4 In the corresponding embodiment, the process of predicting the probability of the first behavior of the first sample user towards the first sample object based on the first user attribute data, the first behavior data and the first object attribute data is implemented, which will not be repeated here.
[0124] S33: Determine a target recommendation object for the target user according to the second behavior probability.
[0125] In some embodiments, the target recommended object represents an object determined from objects to be recommended and recommended to the target user.
[0126] In some embodiments, the computer device implements a method for determining the target recommended object for the target user based on the second behavior probability of the target user toward the recommended object, which may include: determining the target recommended object for the target user from the objects to be recommended according to a preset screening method based on the second behavior probability of the target user toward the recommended object.
[0127] In some embodiments, the preset screening method can be set to a second behavior probability greater than a preset behavior probability threshold, and the preset behavior probability threshold can be custom set. In this case, if the target user's second behavior probability for the recommended object is greater than the preset behavior probability threshold, the object to be recommended is used as the target recommended object. For another example, the preset screening method can be set to recommend a specified number of target recommended objects. In this case, the computer device can sort the recommended objects according to the target user's second behavior probability for the recommended objects, and according to the sorting result, select a specified number of objects to be recommended as the target recommended objects in descending order of the second behavior probability. Among them, the specified number can be custom set. The specific settings of the preset screening method are not limited in the embodiments of the present application.
[0128] See also Figure 6 , Figure 6 FIG. 1 is a flowchart of a method for determining a target recommendation object provided in an embodiment of the present application. Figure 6 As shown, determining the target recommended object of the target user according to the second behavior probability may also include steps S41 to S44, and the specific steps are as follows.
[0129] S41: Determine candidate objects for the target user from the objects to be recommended according to the second behavior probability.
[0130] In some embodiments, the target user's second behavior probability towards the recommended object reflects the target user's interest in the recommended object. The following text uses the second behavior probability to characterize the probability that the target user will generate positive feedback behavior towards the recommended object as an example for explanation. In this case, the greater the target user's second behavior probability towards the recommended object, the greater the target user's interest in the object to be recommended and the greater the probability that the target user will generate positive feedback behavior towards the object to be recommended. Based on this, in the process of determining the target user's candidate objects from the objects to be recommended based on the second behavior probability, the computer device can determine the objects to be recommended that the target user has a greater interest in or a greater probability of generating positive feedback behavior as candidate objects based on the target user's second behavior probability towards the recommended object.
[0131] In some embodiments, the computer device can determine the candidate objects that meet the screening conditions from the objects to be recommended by setting the screening conditions according to the second behavior probability. For example, the screening condition can be set to that the second behavior probability is greater than a preset probability threshold, and the preset probability threshold can be custom set. In this case, if the target user's second behavior probability for the recommended object is greater than the preset probability threshold, the object to be recommended is used as a candidate object. For another example, the screening condition can be set to select a preset number of candidate objects. In this case, the computer device can sort the recommended objects according to the target user's second behavior probability for the recommended objects, and according to the sorting result, select a preset number of objects to be recommended as candidate objects in order from large to small according to the second behavior probability. The specific setting of the screening conditions is not limited in the embodiments of the present application.
[0132] S42: Predict the probability of the target user's third behavior towards the candidate object.
[0133] In some embodiments, the third behavior probability includes the behavior probability of each type of positive feedback behavior generated by the target user on the candidate object. For example, the positive feedback behavior generated by the target user on the candidate object includes click behavior, like behavior, and collection behavior. Then, the third behavior probability of the target user on the candidate object includes the behavior probability of the target user clicking on the candidate object, the behavior probability of the target user liking the candidate object, and the behavior probability of the target user collecting the candidate object.
[0134] In some embodiments, the candidate object represents an object to be recommended for which the target user may generate positive feedback behavior. However, the computer device may not be able to determine the specific type of positive feedback behavior generated by the target user on the candidate object. Therefore, in order to improve the accuracy of object recommendation for the target user, after the computer device determines the candidate object, it can further predict the third behavior probability of the target user on the candidate object and analyze the behavior probability of each type of positive feedback behavior generated by the target user on the candidate object.
[0135] In some embodiments of the present application, predicting the probability of the third behavior of the target user towards the candidate object includes: predicting the probability of the third behavior through a second model based on the target user attribute data, the third behavior data of the target user towards the candidate object, and the candidate object attribute data of the candidate object.
[0136] In some embodiments, the second model may be a multi-task model. The computer device predicts the behavior probability of each type of positive feedback behavior generated by the target user on the candidate object based on the target user attribute data, the third behavior data of the target user on the candidate object, and the candidate object attribute data of the candidate object through the multi-task model.
[0137] In some embodiments of the present application, before predicting the third behavior probability through the second model based on the target user attribute data, the target user's third behavior data on the candidate object and the candidate object attribute data of the candidate object, the computer device needs to train the second model.
[0138] See also Figure 7 , Figure 7 The second model training method provided in the embodiment of the present application is shown as a flowchart of the implementation. The method is applied to a computer device. The embodiment of the present application uses the second model training method to Figure 1 The computer device 100 in FIG. 1 is used as an example for explanation. The second model training method includes the following steps.
[0139] S51: Determine a second training sample.
[0140] In some embodiments, the second training sample includes second user attribute data of the second sample user, fourth behavior data of the second sample user on the second sample object, and second object attribute data of the second sample object.
[0141] In some embodiments, the second training sample may include multiple second sample objects of the same type or different types. Among them, the second sample user is the data of the sample user used in the second model training process. For example, the second sample user can be represented by an account name, name, or other pre-set user identifiers. The second sample object is the data of the sample object used in the model training process. The second sample object may include information objects that can be viewed and read on the Internet. For example, the second sample object may include music, videos, e-books, online articles, news, information, advertisements, etc., and may also include related information such as products, goods, and services. The embodiment of the present application does not limit the specific type of the expression form of the second sample user and the content of the second sample object. In the second training sample, the second sample object is a sample object that the second sample user is interested in, or a sample object for which the second sample user has had positive feedback behavior.
[0142] In some embodiments, the second user attribute data includes data related to personal information of the second sample user. For example, the second user attribute data may include any one or more of the attribute data of the second sample user, such as gender, age, occupation, hobbies, and geographic location. The embodiment of the present application does not limit the type of the second user attribute data.
[0143] In some embodiments, the second object attribute data includes data related to attribute information of the second sample object. For example, the second object attribute data may include any one or more of the attribute data of the second sample object, such as the object category, label, author, and rating. The second object attribute data may also include data related to the statistical characteristics of the second sample object, such as the number of exposures of the second sample object, the number of clicks on the second sample object, etc. The embodiment of the present application does not limit the type of the second object attribute data.
[0144] In some embodiments, the fourth behavior data includes historical behavior data generated by the second sample user on the second sample object. For example, the fourth behavior data may be behavior data of the type of click or non-click, favorite or non-favorite, purchase or non-purchase, follow or non-follow, like or non-like. The fourth behavior data may also include the number of clicks of the second sample user on the second sample object, the user click rate, etc. The embodiment of the present application does not limit the specific type and specific content of the fourth behavior data.
[0145] In some embodiments, the computer device can determine a user candidate object for the first sample user based on the first behavior probability of the first sample user with respect to the first sample object predicted by using the first model, and use the user candidate object as the second sample object and the first sample user as the second sample user. Thus, the computer device can determine the fourth behavior data of the second sample user with respect to the second sample object based on the first behavior data of the first sample user with respect to the user candidate object, and determine the second object attribute data of the second sample object based on the first object attribute data of the user candidate object.
[0146] In some embodiments, the computer device may determine user candidate objects based on the prediction results of the first model, and select objects recommended to the user from the user candidate objects based on the prediction results of the second model. Therefore, the computer device may help improve the accuracy of recommendations by associating the first model with the second model.
[0147] In other embodiments, the computer device may also obtain the second training sample in other ways. The embodiment of the present application does not limit the way of obtaining the second training sample.
[0148] S52: Determine a second behavior label of the second sample user for the second sample object according to the fourth behavior data.
[0149] In some embodiments, the types of interactive behaviors between the second sample user and the second sample object may include multiple types. For example, they may include click behaviors, collection behaviors, purchase behaviors, like behaviors, etc. The computer device may set a corresponding second behavior label for each type of interactive behavior. The second behavior label may be customized. For example, if there is a click behavior in the interactive behavior between the second sample user and the second sample object, the second behavior label corresponding to the click behavior is set to 1; if there is no click behavior in the interactive behavior between the second sample user and the second sample object, the second behavior label corresponding to the click behavior is set to 0. If there is a collection behavior in the interactive behavior between the second sample user and the second sample object, the second behavior label corresponding to the collection behavior is set to 1; if there is no collection behavior in the interactive behavior between the second sample user and the second sample object, the second behavior label corresponding to the collection behavior is set to 0. If there is a purchase behavior in the interactive behavior between the second sample user and the second sample object, the second behavior label corresponding to the purchase behavior is set to 1; if there is no purchase behavior in the interactive behavior between the second sample user and the second sample object, the second behavior label corresponding to the purchase behavior is set to 0.
[0150] In other embodiments, the computer device may also set the second behavior tag in other ways, and the embodiments of the present application do not limit the specific setting method of the second behavior tag.
[0151] In some embodiments, the second behavior label of the second sample user for the second sample object may include multiple ones. For example, as shown in Table 1 below, the second behavior label corresponding to the interactive behavior can be represented by 0 or 1. When the second behavior label corresponding to the interactive behavior is set to 1, it indicates that the second sample user has the interactive behavior with the second sample object; when the second behavior label corresponding to the interactive behavior is set to 0, it indicates that the second sample user does not have the interactive behavior with the second sample object. As shown in Table 1 below, the second sample user 1 clicked and purchased the second sample object A. The second sample user 1 collected the sample content B. The second sample user 2 clicked, collected, and purchased the second sample object C. The second sample user 2 clicked on the second sample object D.
[0152] Table 1
[0153]
[0154] S53: Predicting the fourth behavior probability of the second sample user towards the second sample object based on the second user attribute data, the fourth behavior data and the second object attribute data.
[0155] In some embodiments, the fourth behavior probability of the second sample user on the second sample object may be the probability that the second sample user generates a specified behavior on the second sample object, wherein the specified behavior may be a specific behavior such as click, favorite, purchase, etc.
[0156] In some embodiments, in the process of training the second model using the second training sample, the computer device can use the second user attribute data, second behavior data and second object attribute data in the second training sample as input to the second model, use the second model to learn the association between the second sample user and the second sample object, and predict the fourth behavior probability of the second sample user towards the second sample object.
[0157] In some embodiments, the second model can be a multi-task model. The structure of the second model (e.g., the number of layers of the neural network, the number of neurons, etc.) can be designed according to the training task requirements and the data characteristics of the second training sample. The initial model parameters of the second model (e.g., weights, biases, and other parameters) can be randomly generated or custom set. During the model training process, the computer device uses the second training sample to iteratively train the second model according to a preset loss function and optimization algorithm, optimizes the model parameters and performance of the second model, so that the second model has better prediction and classification capabilities, and improves the prediction accuracy of the second model.
[0158] In some embodiments, the network output layer of the second model adopts a multi-label classification structure, and each output node of the network output layer corresponds to a second behavior label. The computer device can use an activation function to map the output result of the network output layer to a probability space of [0, 1] to obtain the user behavior probability. By using the second model to predict the second training sample, the user behavior probability of each type of interaction behavior generated by the second sample user on the second sample object can be obtained.
[0159] S54: Determine a second loss value based on the second behavior label and the fourth behavior probability.
[0160] In some embodiments, the second loss value can be used to measure the difference between the predicted value of the second model (e.g., the probability of the fourth behavior of the second sample user for the second sample object) and the true value (e.g., the second behavior label of the second sample user for the second sample object). The purpose of the second model training is to reduce the second loss value so that the second loss value is reduced to a preset threshold range, thereby allowing the model to converge. The preset threshold range can be customized according to actual training requirements.
[0161] In some embodiments, the loss function for the second model training may be a cross entropy loss function.
[0162]
[0163] Where L(x, y) represents the cross entropy loss function, N represents the number of samples of the second training sample, K represents the number of labels in the second line, and yi k represents the kth second behavior label of the second sample user on the second sample object in the i-th second training sample; It represents the probability of the fourth behavior of the output corresponding to the k-th second behavior label in the i-th second training sample.
[0164] S55: Train a second model according to the second loss value.
[0165] In some embodiments, in the process of training the second model according to the second loss value, the computer device can set a second threshold range that the second loss value needs to meet when the model converges. If the second loss value is not within the second threshold range, the model parameters of the second model (such as the weights, biases and other parameters of the model) are adjusted, and the second model is iteratively trained to calculate the second loss value until the second loss value is within the second threshold range, and the second model training is completed. The second threshold range can be custom set.
[0166] In other embodiments, during the process of training the second model according to the second loss value, if the change trend of the second loss value becomes gentle and tends to be stable, the computer device can determine that the loss function of the second model has converged and the training of the second model is completed.
[0167] In other embodiments, the computer device may also set a preset convergence threshold, and when it is determined that the change in the second loss value is less than the preset convergence threshold, it is determined that the loss function of the second model has converged.
[0168] In some other embodiments, the computer device may further set an iteration number. When the model training reaches the iteration number, whether the loss function is still decreasing or not, it is determined that the loss function of the second model has converged.
[0169] In other embodiments, the computer device may determine whether the loss function of the second model converges by other means. The embodiment of the present application does not limit the method of determining whether the loss function converges or determining whether the second model converges.
[0170] In some embodiments, after the model training is completed, the computer device can predict the fourth behavior probability of the interaction behavior generated by the second sample user on the second sample object in the second training sample through the second model, and sort the second sample objects according to the fourth behavior probability corresponding to each interaction behavior.
[0171] S43: Sort the candidate objects according to the third behavior probability.
[0172] In some embodiments, the method of sorting the candidate objects according to the probability of the third behavior of the target user for the candidate objects can be customized. For example, the computer device can sort the candidate objects according to the size of the third behavior probability in a preset sorting method. Among them, the preset sorting method can be customized, for example, the preset sorting method can be a sequence from large to small or from small to large, etc.
[0173] S44: Determine a target recommended object from the candidate objects according to the ranking result.
[0174] In some embodiments, the target user's third behavior probability for the candidate object can further reflect the target user's interest in the candidate object. The greater the target user's third behavior probability for the candidate object, the greater the target user's interest in the candidate object and the greater the probability that the target user will generate a specified positive feedback behavior for the candidate object. Based on this, in the process of determining the target recommended object recommended to the target user from the candidate objects according to the third behavior probability, the computer device can determine the candidate object with a greater target user interest or a greater third behavior probability as the target recommended object according to the target user's third behavior probability for the candidate object.
[0175] In other embodiments, after recommending a target recommended object to a target user, the computer device may promptly collect the target user's feedback behavior data on the target recommended object (such as click behavior, purchase behavior, rating behavior, and other related data), and optimize the parameters and strategies of the first model and the second model based on the target user's feedback behavior data on the target recommended object, so as to more accurately evaluate the user's interest, thereby improving the accuracy of object recommendation.
[0176] In the recommendation method provided in the embodiment of the present application, by predicting the second behavior probability of the target user towards the object to be recommended and determining the target recommended object of the target user according to the second behavior probability, the efficiency and accuracy of object recommendation can be effectively improved.
[0177] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0178] See also Figure 8 , Figure 8 The structure diagram of the model training device 10 provided in the embodiment of the present application is shown, which can implement the details of the model training method in the above embodiment and achieve the same effect. Figure 8As shown, the model training device 10 can be applied to a computer device with a data processing function, and the model training device 10 includes: a determination module 11, a prediction module 12, a calculation module 13 and a training module 14. The functional modules are described in detail as follows: the determination module 11 is used to determine the first training sample, and the first training sample includes the first user attribute data of the first sample user, the first behavior data of the first sample user to the first sample object and the first object attribute data of the first sample object; the determination module 11 is also used to determine the first behavior label and user click rate of the first sample user to the first sample object according to the first behavior data, and determine the object click rate of the first sample object according to the first object attribute data; the prediction module 12 is used to predict the first behavior probability of the first sample user to the first sample object based on the first user attribute data, the first behavior data and the first object attribute data; the calculation module 13 is used to determine the first loss value based on the first behavior label, the first behavior probability, the user click rate and the object click rate; the training module 14 is used to train the first model according to the first loss value.
[0179] In some embodiments, the calculation module 13 is used to determine the object weight of the first sample object based on the user click rate and the object click rate; and determine the first loss value based on the first behavior label, the first behavior probability and the object weight.
[0180] In some embodiments, the prediction module 12 is used to perform feature encoding on the first user attribute data, the first behavior data and the first object attribute data respectively to obtain user features, user behavior features and object features of the first training sample; fuse the user features, user behavior features and object features to obtain sample fusion features; sequence encode the sample fusion features to obtain a user behavior sequence, and determine the sample correlation between the first sample user and the first sample object based on the user behavior sequence; update the sample correlation based on the user behavior sequence and the positive feedback behavior features in the user behavior features; adjust the user behavior sequence based on the updated sample correlation to obtain an adjusted user behavior sequence; predict the adjusted user behavior sequence to obtain a first behavior probability.
[0181] In some embodiments, the prediction module 12 implements updating the sample correlation based on the positive feedback behavior features in the user behavior sequence and the user behavior features, including: determining the positive feedback object features of the positive feedback object based on the positive feedback behavior features, the positive feedback object being the first sample object that generates positive feedback behavior by the first sample user; calculating the sample correlation score between the user behavior sequence and the positive feedback object features; and updating the sample correlation based on the sample correlation score.
[0182] See also Fig. 9 , Fig. 9The structure diagram of the recommendation device 20 provided in the embodiment of the present application is shown, which can implement the details of the recommendation method in the above embodiment and achieve the same effect. Fig. 9 As shown, the recommendation device 20 can be applied to a computer device with a data processing function, and the recommendation device 20 includes: an acquisition module 21, which is used to obtain target user attribute data of the target user, the second behavior data of the target user towards the recommended object, and the target object attribute data of the object to be recommended; a prediction module 22, which is used to predict the second behavior probability of the target user towards the recommended object based on the target user attribute data, the second behavior data and the target object attribute data; a recommendation module 23, which is used to determine the target recommended object of the target user based on the second behavior probability.
[0183] In some embodiments, the prediction module 22 predicts the target user's second behavior probability towards the recommended object based on the target user attribute data, the second behavior data and the target object attribute data, including: performing feature encoding on the target user attribute data, the second behavior data and the target object attribute data respectively to obtain target user features, target user behavior features and target object features; fusing the target user features, the target user behavior features and the target object features to obtain target fusion features; performing sequence encoding on the target fusion features to obtain a target user behavior sequence, and determining the target association between the target user and the recommended object based on the target user behavior sequence; updating the target association based on the target user behavior sequence and the target positive feedback behavior features in the target user behavior features; adjusting the target user behavior sequence based on the updated target association to obtain an adjusted target user behavior sequence; predicting the adjusted target user behavior sequence to obtain the second behavior probability.
[0184] In some embodiments, the prediction module 22 implements updating the target relevance based on the target user behavior sequence and the target positive feedback behavior characteristics in the target user behavior characteristics, including: determining the target positive feedback object characteristics of the target positive feedback object according to the target positive feedback behavior characteristics, the target positive feedback object is the object to be recommended for the target user to generate positive feedback behavior; calculating the target relevance score between the target user behavior sequence and the target positive feedback object characteristics; and updating the target relevance according to the target relevance score.
[0185] In some embodiments, the recommendation module 23 determines the target recommendation object of the target user based on the second behavior probability, including: determining the candidate object of the target user from the objects to be recommended based on the second behavior probability; predicting the third behavior probability of the target user for the candidate object; sorting the candidate objects based on the third behavior probability; and determining the target recommendation object from the candidate objects based on the sorting result.
[0186] In some embodiments, the prediction module 22 predicts the probability of the target user's third behavior towards the candidate object, including: predicting the probability of the third behavior based on the target user's attribute data, the target user's third behavior data towards the candidate object, and the candidate object attribute data of the candidate object through a second model.
[0187] In some embodiments, before predicting the third behavior probability through the second model based on the target user attribute data, the target user's third behavior data for the candidate object and the candidate object attribute data of the candidate object, a training module is also included, the training module is used to determine a second training sample, the second training sample includes the second user attribute data of the second sample user, the fourth behavior data of the second sample user for the second sample object and the second object attribute data of the second sample object; and based on the fourth behavior data, determine the second behavior label of the second sample user for the second sample object; based on the second user attribute data, the fourth behavior data and the second object attribute data, predict the fourth behavior probability of the second sample user for the second sample object; based on the second user attribute data, the fourth behavior data and the second object attribute data, determine the second loss value; based on the second behavior label and the fourth behavior probability, train the second model.
[0188] See also Fig.10 , Fig.10 The figure shows a hardware structure diagram of a computer device for implementing various embodiments of the present application. Fig.10 As shown, the computer device 100 includes but is not limited to: a radio frequency unit 101, a network module 102, an audio output unit 103, an input unit 104, a sensor 105, a display unit 106, a user input unit 107, an interface unit 108, a memory 109, a processor 110, and a power supply 111. Those skilled in the art will understand that Fig.10 The computer device structure shown in the does not constitute a limitation on the computer device, and the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. In the embodiment of the present application, the computer device 100 may be an independent server, a computer or other device, or a server cluster or distributed system composed of multiple servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud storage, cloud computing, cloud functions, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), big data, and artificial intelligence platforms.
[0189] Among them, the processor 110 is used to: determine a first training sample, the first training sample includes first user attribute data of a first sample user, first behavior data of the first sample user on a first sample object, and first object attribute data of the first sample object; determine a first behavior label and a user click rate of the first sample user on the first sample object according to the first behavior data, and determine an object click rate of the first sample object according to the first object attribute data; predict the first behavior probability of the first sample user on the first sample object based on the first user attribute data, the first behavior data, and the first object attribute data; determine a first loss value based on the first behavior label, the first behavior probability, the user click rate, and the object click rate; and train the first model according to the first loss value.
[0190] Alternatively, the processor 110 is used to: obtain target user attribute data of the target user, the target user's second behavior data towards the recommended object, and the target object attribute data of the object to be recommended; predict the target user's second behavior probability towards the recommended object based on the target user attribute data, the second behavior data, and the target object attribute data; and determine the target recommended object of the target user based on the second behavior probability.
[0191] The embodiment of the present application also has the same Figure 2 , Figure 5 The same beneficial technical effects as those of the illustrated embodiments are not described in detail here.
[0192] It should be understood that in the embodiment of the present application, the RF unit 101 can be used for receiving and sending signals during information transmission or calls. Specifically, after receiving downlink data from the base station, it is sent to the processor 110 for processing; in addition, uplink data is sent to the base station. Generally, the RF unit 101 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, etc. In addition, the RF unit 101 can also communicate with the network and other devices through a wireless communication system.
[0193] The computer device provides users with wireless broadband Internet access through the network module 102, such as helping users to send and receive emails, browse web pages, and access streaming media.
[0194] The audio output unit 103 can convert the audio data received by the RF unit 101 or the network module 102 or stored in the memory 109 into an audio signal and output it as sound. Moreover, the audio output unit 103 can also provide audio output related to a specific function performed by the computer device 100 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 103 includes a speaker, a buzzer, a receiver, etc.
[0195] The input unit 104 is used to receive audio or video signals. The input unit 104 may include a graphics processor (GPU) 1041 and a microphone 1042, and the graphics processor 1041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The processed image frame can be displayed on the display unit 106. The image frame processed by the graphics processor 1041 can be stored in the memory 109 (or other storage medium) or sent via the radio frequency unit 101 or the network module 102. The microphone 1042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format output that can be sent to a mobile communication base station via the radio frequency unit 101 in the case of a telephone call mode.
[0196] The computer device 100 also includes at least one sensor 105, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 1061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 1061 and / or the backlight when the computer device 100 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used to identify the posture of the computer device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 105 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.
[0197] The display unit 106 is used to display information input by the user or information provided to the user. The display unit 106 may include a display panel 1061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
[0198] The user input unit 107 can be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the computer device. Specifically, the user input unit 107 includes a touch panel 1071 and other input devices 1072. The touch panel 1071, also known as a touch screen, can collect the user's touch operation on or near it (such as the user's operation on the touch panel 1071 or near the touch panel 1071 using any suitable object or accessory such as a finger, stylus, etc.). The touch panel 1071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the contact point coordinates, and then sends it to the processor 110, receives the command sent by the processor 110 and executes it. In addition, the touch panel 1071 can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic waves. In addition to the touch panel 1071, the user input unit 107 may also include other input devices 1072. Specifically, other input devices 1072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail here.
[0199] Furthermore, the touch panel 1071 may be overlaid on the display panel 1061. When the touch panel 1071 detects a touch operation on or near it, it transmits the information to the processor 110 to determine the type of the touch event. Then, the processor 110 provides a corresponding visual output on the display panel 1061 according to the type of the touch event. Fig.10 In the embodiment, the touch panel 1071 and the display panel 1061 are used as two independent components to realize the input and output functions of the computer device. However, in some embodiments, the touch panel 1071 and the display panel 1061 can be integrated to realize the input and output functions of the computer device, which is not limited here.
[0200] The interface unit 108 is an interface for connecting an external device to the computer device 100. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 108 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the computer device 100 or may be used to transmit data between the computer device 100 and an external device.
[0201] The memory 109 can be used to store software programs and various data. The memory 109 can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the computer device (such as audio data, a phone book, etc.), etc. In addition, the memory 109 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0202] The processor 110 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 109 and calling data stored in the memory 109, it executes various functions of the computer device and processes data, thereby monitoring the computer device as a whole. The processor 110 may include one or more processing units; preferably, the processor 110 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 110.
[0203] The computer device 100 may also include a power supply 111 (such as a battery) for supplying power to various components. Preferably, the power supply 111 may be logically connected to the processor 110 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system.
[0204] In addition, the computer device 100 includes some functional modules not shown, which will not be described in detail here.
[0205] Preferably, an embodiment of the present application also provides a computer device, including a processor 110, a memory 109, and a computer program stored in the memory 109 and executable on the processor 110. When the computer program is executed by the processor 110, the various processes of the above-mentioned model training method embodiment or the various processes of the above-mentioned recommendation method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0206] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by the processor, each process of the above-mentioned model training method embodiment or each process of the above-mentioned recommended method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. Among them, the computer-readable storage medium, such as read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk, etc.
[0207] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0208] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0209] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A model training method, characterized in that: The method comprises: Determine a first training sample, where the first training sample includes first user attribute data of a first sample user, first behavior data of the first sample user on a first sample object, and first object attribute data of the first sample object; Determine a first behavior label and a user click rate of the first sample user on the first sample object according to the first behavior data, and determine an object click rate of the first sample object according to the first object attribute data; Predicting a first behavior probability of the first sample user towards the first sample object based on the first user attribute data, the first behavior data, and the first object attribute data; Determine a first loss value based on the first behavior label, the first behavior probability, the user click rate, and the object click rate; A first model is trained according to the first loss value.
2. The method according to claim 1, characterized in that The determining a first loss value based on the first behavior label, the first behavior probability, the user click rate, and the object click rate includes: Determining an object weight of the first sample object based on the user click rate and the object click rate; The first loss value is determined based on the first behavior label, the first behavior probability, and the object weight.
3. The method according to claim 1, characterized in that The predicting, based on the first user attribute data, the first behavior data, and the first object attribute data, a first behavior probability of the first sample user towards the first sample object includes: Performing feature encoding on the first user attribute data, the first behavior data, and the first object attribute data respectively to obtain user features, user behavior features, and object features of the first training sample; fusing the user features, the user behavior features, and the object features to obtain sample fusion features; Performing sequence encoding on the sample fusion features to obtain a user behavior sequence, and determining a sample association degree between the first sample user and the first sample object according to the user behavior sequence; Based on the user behavior sequence and the positive feedback behavior features in the user behavior features, updating the sample association degree; Adjusting the user behavior sequence based on the updated sample association degree to obtain an adjusted user behavior sequence; The adjusted user behavior sequence is predicted to obtain the first behavior probability.
4. The method according to claim 3, characterized in that The updating of the sample association degree based on the user behavior sequence and the positive feedback behavior feature in the user behavior feature includes: Determining, according to the positive feedback behavior characteristics, positive feedback object characteristics of a positive feedback object, wherein the positive feedback object is a first sample object that generates positive feedback behavior by the first sample user; Calculating a sample correlation score between the user behavior sequence and the positive feedback object feature; The sample relevance is updated according to the sample relevance score.
5. A recommendation method, characterized in that: The method comprises: Acquire target user attribute data of a target user, second behavior data of the target user towards a recommended object, and target object attribute data of the object to be recommended; Predicting the probability of the target user's second behavior towards the object to be recommended based on the target user attribute data, the second behavior data, and the target object attribute data; A target recommendation object for the target user is determined according to the second behavior probability.
6. The method according to claim 5, characterized in that The predicting, based on the target user attribute data, the second behavior data, and the target object attribute data, the second behavior probability of the target user towards the object to be recommended includes: Performing feature encoding on the target user attribute data, the second behavior data, and the target object attribute data respectively to obtain target user features, target user behavior features, and target object features; The target user features, the target user behavior features and the target object features are fused to obtain a target fusion feature; Performing sequence encoding on the target fusion features to obtain a target user behavior sequence, and determining a target correlation between the target user and the object to be recommended according to the target user behavior sequence; Based on the target user behavior sequence and the target positive feedback behavior feature in the target user behavior feature, updating the target relevance; Adjusting the target user behavior sequence based on the updated target relevance to obtain an adjusted target user behavior sequence; The adjusted target user behavior sequence is predicted to obtain the second behavior probability.
7. The method according to claim 6, characterized in that The updating of the target relevance based on the target user behavior sequence and the target positive feedback behavior feature in the target user behavior feature includes: Determine target positive feedback object characteristics of a target positive feedback object according to the target positive feedback behavior characteristics, wherein the target positive feedback object is an object to be recommended for which the target user generates positive feedback behavior; Calculating a target relevance score between the target user behavior sequence and the target positive feedback object feature; The target relevance is updated according to the target relevance score.
8. The method according to claim 5, characterized in that The determining, according to the second behavior probability, a target recommendation object for the target user includes: Determining a candidate object for the target user from the objects to be recommended according to the second behavior probability; Predicting a third behavior probability of the target user towards the candidate object; sorting the candidate objects according to the third behavior probability; According to the ranking result, the target recommended object is determined from the candidate objects.
9. The method according to claim 8, characterized in that The predicting the probability of the target user's third behavior towards the candidate object includes: The third behavior probability is predicted by a second model according to the target user attribute data, the third behavior data of the target user on the candidate object and the candidate object attribute data of the candidate object.
10. A model training device, characterized in that: The device comprises: A determination module, configured to determine a first training sample, wherein the first training sample includes first user attribute data of a first sample user, first behavior data of the first sample user on a first sample object, and first object attribute data of the first sample object; The determination module is further configured to determine a first behavior label and a user click rate of the first sample user on the first sample object according to the first behavior data, and determine an object click rate of the first sample object according to the first object attribute data; A prediction module, configured to predict a probability of a first behavior of the first sample user towards the first sample object based on the first user attribute data, the first behavior data and the first object attribute data; a calculation module, configured to determine a first loss value based on the first behavior label, the first behavior probability, the user click rate, and the object click rate; A training module is used to train a first model according to the first loss value.
11. A recommendation device, characterized in that: The device comprises: An acquisition module, used to acquire target user attribute data of a target user, second behavior data of the target user towards a recommended object, and target object attribute data of the object to be recommended; A prediction module, used for predicting the probability of the target user's second behavior towards the object to be recommended based on the target user attribute data, the second behavior data and the target object attribute data; A recommendation module is used to determine a target recommendation object for the target user according to the second behavior probability.
12. A computer device, characterized in that: It includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the computer-readable instructions, when executed by the processor, implement the model training method as described in any one of claims 1 to 4 or implement the recommendation method as described in any one of claims 5 to 9.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the model training method as described in any one of claims 1 to 4 or the recommendation method as described in any one of claims 5 to 9.
14. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the model training method as described in any one of claims 1 to 4 or the recommendation method as described in any one of claims 5 to 9.
Citation Information
Patent Citations
Information processing method, recommendation method and related equipment
CN110851713A
Prediction model training method and device
CN114792173A
Recommendation method and related equipment
CN116108267A
Model training method and device, content recommendation method and device and electronic equipment
CN116975442A
Recommended copywriting generation method and device, electronic equipment and readable storage medium
CN118211572A
Cited By
Model training method and device, content recommendation method and device, equipment and storage medium
CN121350306A
Model training method, content recommendation method, device, equipment and storage medium
CN121350306B
