Training method of recommendation model, method and device for predicting selection probability
By jointly training a location bias model and a recommendation model, and utilizing sample user behavior logs and location information, the problem of the influence of location information in the recommendation model is solved, and more accurate prediction of user selection probability is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2019-09-11
- Publication Date
- 2026-06-02
AI Technical Summary
Existing recommendation models suffer from low accuracy during training because the implicit feedback data from users is influenced by the location of the recommendations, resulting in a failure to accurately reflect user interests.
By jointly training the location bias model and the recommendation model, and utilizing sample user behavior logs and location information, the influence of location information on the recommendation model is eliminated, thereby improving the model accuracy.
By eliminating the influence of location information, the accuracy of the recommendation model is improved, making the predicted probability of user selection more consistent with the user's true interests and preferences.
Smart Images

Figure CN112487278B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence, and more specifically, to a method for training a recommendation model, a method for predicting selection probabilities, and an apparatus. Background Technology
[0002] Selection rate prediction refers to predicting the probability of a user selecting a particular item under specific circumstances. For example, selection rate prediction plays a crucial role in recommendation systems for applications such as app stores and online advertising. By predicting selection rate, businesses can maximize profits and improve user satisfaction. Recommendation systems need to consider both the user's selection rate and the item's bid price. The selection rate is predicted by the recommendation system based on the user's historical behavior, while the item's bid price represents the system's revenue after the item is selected / downloaded. For instance, a function can be constructed that calculates a value based on the predicted user selection rate and the item's bid price. The recommendation system then sorts the items in descending order according to this function value.
[0003] In recommender systems, recommendation models are learned based on user-item interaction information (i.e., implicit user feedback data). However, implicit user feedback data is influenced by the display position of recommended items (e.g., recommended products). For example, the selection rate of a recommended product ranked first in the recommendation list differs from that of a recommended product ranked fifth. In other words, a user's choice of a recommended product stems from two factors: firstly, the user likes the recommended product; and secondly, the recommended product is placed in a position that makes it more easily noticed. Therefore, the implicit user feedback data used to train model parameters cannot truly reflect user interests; it contains biases introduced by location information, meaning it is affected by the recommendation position. Consequently, training model parameters directly based on implicit user feedback data results in a less accurate selection rate prediction model.
[0004] Therefore, improving the accuracy of recommendation models has become an urgent problem to be solved. Summary of the Invention
[0005] This application provides a method for training a recommendation model, a method for predicting selection probabilities, and an apparatus that can eliminate the influence of location information on recommendations and improve the accuracy of the recommendation model.
[0006] Firstly, a method for training a recommendation model is provided, comprising: acquiring training samples, the training samples including sample user behavior logs, location information of sample recommendation objects, and sample labels, the sample labels being used to indicate whether a user selects the sample recommendation object; jointly training a location bias model and a recommendation model by using the sample user behavior logs and the location information of the sample recommendation objects as input data and the sample labels as target output values to obtain a trained recommendation model, wherein the location bias model is used to predict the probability that a user will notice the target recommendation object when the target recommendation object is in different locations, and the recommendation model is used to predict the probability that a user will select the target recommendation object when the user notices the target recommendation object.
[0007] It should be understood that the probability of a user selecting a target recommendation can refer to the probability of a user clicking on the target object, such as the probability of a user downloading the target object, or the probability of a user browsing the target object; the probability of a user selecting a target object can also refer to the probability of a user performing a user action on the target object.
[0008] The recommended object can be a recommended application in the application market of a terminal device; or, in a browser, the recommended object can be a recommended website or recommended news. In the embodiments of this application, the recommended object can be information recommended to the user by the recommendation system, and this application does not limit the specific implementation of the recommended object.
[0009] In this embodiment, the probability of a user noticing a target recommended object in different locations can be predicted using a location bias model. The probability of a user selecting a target recommended object when it has already been seen can also be predicted using a recommendation model, i.e., the probability of a user selecting a target recommended object based on their own interests. By jointly training the location bias model and the recommendation model using sample user behavior logs and sample recommended object location information as input data, and sample labels as the target output value, the influence of location information on the recommendation model is eliminated, resulting in a recommendation model based on user interests, thereby improving the accuracy of the recommendation model.
[0010] In one possible implementation, the joint training refers to training the model parameters of the location bias model and the recommendation model based on the difference between the sample labels and the joint predicted selection probability, wherein the joint predicted selection probability is obtained based on the output data of the location bias model and the recommendation model.
[0011] In this embodiment, the sample labels in the training samples can be fitted by the output data of the location bias model and the recommendation model; the parameters of the location bias model and the user's real recommendation model can be jointly trained by the difference between the sample labels and the joint predicted selection probability, thereby eliminating the influence of location information on the recommendation model and obtaining a recommendation model based on user interests.
[0012] In one possible implementation, the joint predicted selection probability can be obtained by multiplying the output data of the location bias model with the output data of the recommendation model.
[0013] In another possible implementation, the joint predicted selection probability can be obtained by weighting the output data of the position bias model and the output data of the recommendation model.
[0014] Optionally, joint training can be multi-task learning, where multiple training data simultaneously learn multiple sub-task models using a shared representation. The basic assumption of multi-task learning is that multiple tasks are correlated, thus enabling them to mutually reinforce each other.
[0015] Optionally, the model parameters of the position bias model and the recommendation model can be obtained through multiple iterations of the backpropagation algorithm based on the difference between the sample labels and the joint predicted selection probability.
[0016] In one possible implementation, the training method further includes: inputting the location information of the sample recommended object into the location bias model to obtain the probability that the user pays attention to the target recommended object; inputting the sample user behavior log into the recommendation model to obtain the probability that the user selects the target recommended object; and multiplying the probability that the user pays attention to the target recommended object by the probability that the user selects the target recommended object to obtain the joint predicted selection probability.
[0017] In the embodiments of this application, the location information of the sample recommended object can be input into the location bias model to obtain the predicted probability that the user pays attention to the target recommended object; the sample user behavior log can be input into the recommendation model to obtain the predicted probability that the user selects the target recommended object; the predicted probability that the user pays attention to the target recommended object and the predicted probability that the user selects the target recommended object are fitted to obtain the joint predicted selection probability; and the model parameters of the location bias model and the recommendation model can be continuously trained by the difference between the sample label and the joint predicted selection probability.
[0018] In one possible implementation, the sample user behavior log includes one or more of the following: sample user profile information, feature information of the sample recommended object, and sample context information.
[0019] Alternatively, user profile information, also known as audience profiling, refers to a tagged profile abstracted from user demographic information, social relationships, preferences, and consumption behavior. For example, user profile information may include user download history and user interests.
[0020] Optionally, the feature information of the recommended object can refer to the category of the recommended object, or it can refer to the identifier of the recommended object, such as the ID of the recommended object.
[0021] Optionally, the sample context information may include historical download time information or historical download location information, etc.
[0022] In one possible implementation, the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different types of historical recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in the same type of historical recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different lists of historical recommendation objects.
[0023] Optionally, the location information of the sample recommended object can refer to the recommendation location information of the sample recommended object in different types of recommended objects. That is, the recommendation ranking can include multiple different types of objects. In other words, the location information can be the recommendation location information of object X in multiple different types of recommended objects.
[0024] Optionally, the location information of the sample recommended object mentioned above refers to the recommended location information of the sample recommended object among recommended objects of the same category. In other words, the location information of recommended object X can be the recommended position of recommended object X among recommended objects of its own category.
[0025] Optionally, the location information of the sample recommended object mentioned above refers to the recommendation location information of the sample recommended object in the recommended objects of different lists.
[0026] For example, different lists can refer to user rating lists, today's lists, this week's lists, nearby lists, local lists, national lists, etc.
[0027] Secondly, a method for predicting selection probability is provided, comprising: acquiring user feature information, context information, and a candidate set of recommendation objects for a user to be processed; inputting the user feature information, the context information, and the candidate set of recommendation objects into a pre-trained recommendation model to obtain the probability that the user to be processed will select a candidate recommendation object from the candidate set of recommendation objects, wherein the pre-trained recommendation model is used to predict the probability that the user will select the target recommendation object when the user pays attention to the target recommendation object; and obtaining the recommendation result of the candidate recommendation object based on the probability, wherein the model parameters of the pre-trained recommendation model are obtained by jointly training a location bias model and the recommendation model with sample user behavior logs and sample recommendation object location information as input data and sample labels as target output values, wherein the location bias model is used to predict the probability that the user will pay attention to the target recommendation object in different locations, and the sample labels are used to indicate whether the user selects the sample recommendation object.
[0028] In the embodiments of this application, the probability of the user selecting a candidate recommendation object from the candidate recommendation object set can be predicted by inputting the user's feature information, current context information, and candidate recommendation object set into a pre-trained recommendation model. The pre-trained recommendation model can be used to predict online the probability of a user selecting a recommendation object based on their interests. This pre-trained model avoids the problem of insufficient location information in the prediction stage caused by training the recommendation model using location bias information as a general feature. It solves the computational complexity of traversing all locations and the instability caused by selecting a default location. In this application, the pre-trained recommendation model is jointly trained with the location bias model using training data, thereby eliminating the influence of location information on the recommendation model and obtaining a recommendation model based on user interests, thus improving the accuracy of the predicted selection probability.
[0029] In one possible implementation, the context information may include the current download time or the current download location.
[0030] Optionally, the candidate recommendation objects can be sorted according to the predicted true selection probability of the candidate recommendation objects in the candidate recommendation object set to obtain the recommendation result of the candidate recommendation objects.
[0031] Optionally, the candidate set of recommended objects may include feature information of the candidate recommended objects.
[0032] For example, the feature information of the candidate recommendation object can refer to the category of the candidate recommendation object, or it can refer to the identifier of the candidate recommendation object, such as the ID of the product.
[0033] In one possible implementation, the joint training refers to training the parameters of the location bias model and the recommendation model based on the difference between the sample true labels containing location information and the joint predicted selection probability, wherein the joint predicted selection probability is obtained by multiplying the output data of the location bias model and the recommendation model.
[0034] In this embodiment, the output data of the location bias model and the recommendation model can be multiplied to fit the predicted selection probability containing location information in the training data; the location bias model and the recommendation model can be jointly trained by the difference between the sample's true label and the joint predicted selection probability, thereby eliminating the influence of location information on the recommendation effect and obtaining a model that predicts the user's selection probability based on user interests.
[0035] Optionally, joint training can be multi-task learning, where multiple training data simultaneously learn multiple sub-task models using a shared representation. The basic assumption of multi-task learning is that multiple tasks are correlated, thus enabling them to mutually reinforce each other.
[0036] Optionally, the parameters of the location bias model and the recommendation model can be obtained by iterating through backpropagation multiple times based on the difference between the true label of the sample containing location information and the predicted selection probability containing location information.
[0037] Optionally, the joint prediction selection probability is obtained by multiplying the probability that the user pays attention to the target recommended object by the probability that the user selects the target recommended object, wherein the probability that the user pays attention to the target recommended object is obtained based on the location information of the sample recommended object and the location bias model, and the probability that the user selects the target recommended object is obtained based on the sample user behavior and the recommendation model.
[0038] The sample user behavior log includes one or more of the following: sample user profile information, feature information of the sample recommended object, and sample context information.
[0039] Alternatively, user profile information, also known as audience profiling, refers to a tagged profile abstracted from user demographic information, social relationships, preferences, and consumption behavior. For example, user profile information may include user download history and user interests.
[0040] Optionally, the feature information of the recommended object can refer to the category of the product or the identifier of the product, such as the product ID.
[0041] Optionally, the sample context information may include historical download time information or historical download location information, etc.
[0042] Optionally, the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different types of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in the same type of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different lists of recommendation objects.
[0043] Thirdly, a training apparatus for a recommendation model is provided, including modules / units for implementing the training method in the first aspect and any implementation thereof.
[0044] Fourthly, an apparatus for predicting selection probabilities is provided, comprising modules / units for implementing the methods of the second aspect and any implementation thereof.
[0045] Fifthly, a training apparatus for a recommendation model is provided, including an input / output interface, a processor, and a memory. The processor controls the input / output interface to send and receive information, the memory stores a computer program, and the processor retrieves and runs the computer program from the memory, causing the training apparatus to execute the training method described in the first aspect and any implementation thereof.
[0046] Optionally, the training device can be a terminal device / server or a chip within the terminal device / server.
[0047] Alternatively, the aforementioned memory can be located inside the processor, for example, it can be a cache memory within the processor. The aforementioned memory can also be located outside the processor, thus independent of the processor, for example, the internal memory of the training device.
[0048] A sixth aspect provides an apparatus for predicting selection probabilities, comprising an input / output interface, a processor, and a memory. The processor controls the input / output interface to send and receive information, the memory stores a computer program, and the processor retrieves and runs the computer program from the memory, causing the apparatus to perform the methods described in the second aspect and any implementation thereof.
[0049] Optionally, the aforementioned device may be a terminal device / server, or a chip within the terminal device / server.
[0050] Optionally, the aforementioned memory can be located inside the processor, for example, it can be a cache memory within the processor. Alternatively, the aforementioned memory can be located outside the processor, thus independent of the processor, for example, the device's internal memory.
[0051] In a seventh aspect, a computer program product is provided, the computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the methods described in the preceding aspects.
[0052] It should be noted that the above-mentioned computer program code can be stored in whole or in part on the first storage medium. The first storage medium can be packaged together with the processor or packaged separately from the processor. This application embodiment does not make specific limitations on this.
[0053] Eighthly, a computer-readable medium is provided that stores program code, which, when run on a computer, causes the computer to perform the methods described in the preceding aspects. Attached Figure Description
[0054] Figure 1 This is a schematic diagram of the recommendation system provided in the embodiments of this application;
[0055] Figure 2 This is a schematic diagram of the system architecture provided in the embodiments of this application;
[0056] Figure 3 This is a schematic diagram of the hardware structure of a chip provided in an embodiment of this application;
[0057] Figure 4 This is a schematic diagram of a system architecture provided in an embodiment of this application;
[0058] Figure 5 This is a schematic flowchart of the training method for the recommendation model provided in the embodiments of this application;
[0059] Figure 6 This is a schematic diagram of the selection probability prediction framework that notices location information provided in the embodiments of this application;
[0060] Figure 7 This is a schematic diagram of the online prediction stage of the trained recommendation model provided in the embodiments of this application;
[0061] Figure 8 This is a schematic flowchart of the method for predicting selection probability provided in the embodiments of this application;
[0062] Figure 9 This is a schematic diagram of recommended objects in the application market provided in the embodiments of this application;
[0063] Figure 10 This is a schematic block diagram of the training apparatus for the recommendation model provided in the embodiments of this application;
[0064] Figure 11This is a schematic block diagram of the apparatus for predicting selection probabilities provided in the embodiments of this application;
[0065] Figure 12 This is a schematic block diagram of the training apparatus for the recommendation model provided in the embodiments of this application;
[0066] Figure 13 This is a schematic block diagram of an apparatus for predicting selection probabilities provided in an embodiment of this application. Detailed Implementation
[0067] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0068] First, a brief explanation of the concepts involved in the embodiments of this application will be given.
[0069] 1. Click-through rate (CTR)
[0070] Click probability, also known as click-through rate, refers to the ratio of the number of clicks to the number of impressions of recommended information (e.g., recommended products) on a website or application. Click-through rate is usually an important metric for evaluating recommendation systems.
[0071] 2. Personalized Recommendation System
[0072] A personalized recommendation system is a system that uses machine learning algorithms to analyze users' historical data and then uses this data to predict new requests and provide personalized recommendations.
[0073] 3. Offline training
[0074] Offline training refers to the module in a personalized recommendation system that iteratively updates the parameters of the recommendation model using machine learning algorithms based on the user's historical data until the set requirements are met.
[0075] 4. Online inference
[0076] Online prediction refers to using an offline-trained model to predict a user's preference for recommended products in the current context, based on the characteristics of the user, the product, and the context, and to predict the probability that the user will choose the recommended product.
[0077] For example, Figure 1 This is a schematic diagram of the recommendation system provided in an embodiment of this application. For example... Figure 1 As shown, when a user enters the system, a recommendation request is triggered. The recommendation system inputs this request and its related information into the prediction model, then predicts the user's selection rate for items within the system. Further, based on the predicted selection rate or a function based on that selection rate, the items are sorted in descending order. In other words, the recommendation system can display items in different positions sequentially as recommendations to the user. The user browses items in different positions and performs user actions, such as browsing, selecting, and downloading. Simultaneously, the user's actual behavior is stored in a log as training data. The parameters of the prediction model are continuously updated through an offline training module, improving the model's predictive performance.
[0078] For example, a user opening the app store on a smart device (e.g., a mobile phone) triggers the app store's recommendation system. The app store's recommendation system predicts the probability of the user downloading various candidate applications (apps) based on the user's historical behavior logs, such as historical download records and user selection records, as well as the app store's own characteristics, such as environmental features like time and location. Based on the calculation results, the app store's recommendation system can display candidate apps in descending order of predicted probability values, thereby increasing the download probability of candidate apps.
[0079] For example, apps with a predicted high user selection rate can be displayed in the top recommendation positions, while apps with a predicted low user selection rate can be displayed in the bottom recommendation positions.
[0080] The recommendation model and online prediction model in the offline training described above can be neural network models. The following is an introduction to the relevant terms and concepts of neural networks that may be involved in the embodiments of this application.
[0081] 5. Neural Networks
[0082] Neural networks can be composed of neural units, which can refer to units represented by x. s The arithmetic unit that takes an intercept of 1 as input can output the following:
[0083]
[0084] Where s = 1, 2, ..., n, n is a natural number greater than 1, W s For x sThe weights are denoted by b, where b is the bias of the neural unit. f is the activation function of the neural unit, used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into an output signal. The output signal of this activation function can be used as the input of the next convolutional layer; the activation function can be the sigmoid function. A neural network is a network formed by connecting multiple of the above-mentioned individual neural units together; that is, the output of one neural unit can be the input of another neural unit. The input of each neural unit can be connected to the local receptive field of the previous layer to extract the features of the local receptive field, which can be a region composed of several neural units.
[0085] 6. Deep Neural Networks
[0086] A deep neural network (DNN), also known as a multilayer neural network, can be understood as a neural network with multiple hidden layers. Based on the position of the layers, the internal neural network of a DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally, the first layer is the input layer, the last layer is the output layer, and the layers in between are hidden layers. The layers are fully connected, meaning that any neuron in the i-th layer is connected to any neuron in the (i+1)-th layer.
[0087] Although DNNs seem complex, the operation of each layer is actually not complicated. Simply put, it involves the following linear relationship expression: in, It is the input vector. It is the output vector. α is the offset vector, W is the weight matrix (also called coefficients), and α() is the activation function. Each layer is simply an adjustment of the input vector. The output vector is obtained through such a simple operation. Because DNNs have many layers, the coefficients W and the offset vector... The number of these parameters is also relatively large. The definitions of these parameters in DNNs are as follows: Taking the coefficient W as an example: Assuming a three-layer DNN, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as... The superscript 3 represents the layer number where coefficient W is located, while the subscript corresponds to the third layer index 2 of the output and the second layer index 4 of the input.
[0088] In summary, the coefficient from the k-th neuron in layer L-1 to the j-th neuron in layer L is defined as...
[0089] It's important to note that the input layer does not have a W parameter. In deep neural networks, more hidden layers allow the network to better represent complex real-world situations. Theoretically, the more parameters a model has, the higher its complexity and "capacity," meaning it can perform more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrix, with the ultimate goal of obtaining the weight matrix of all layers in the trained deep neural network (a weight matrix formed by the vectors W from many layers).
[0090] 7. Loss Function
[0091] In training a deep neural network, to ensure the output closely approximates the desired predicted value, we compare the network's prediction with the target value. Based on the difference, we update the weight vector of each layer (usually pre-configuring parameters before the initial update). For example, if the prediction is too high, the weight vector is adjusted to predict a lower value. This adjustment continues until the deep neural network predicts the target value or a value very close to it. Therefore, we need to predefine "how to compare the difference between the predicted and target values," which is the loss function or objective function. These are important equations used to measure the difference between the predicted and target values. Taking the loss function as an example, a higher output value (loss) indicates a greater difference, and training the deep neural network becomes a process of minimizing this loss.
[0092] 8. Backpropagation Algorithm
[0093] Neural networks can employ backpropagation (BP) to correct the parameters of the initial neural network model during training, thereby reducing the reconstruction error loss. Specifically, forward propagation of the input signal to the output generates error loss; this error loss information is then propagated back to update the parameters of the initial neural network model, leading to convergence of the error loss. The backpropagation algorithm is an error-loss-driven backpropagation process aimed at obtaining the optimal parameters of the neural network model, such as the weight matrix.
[0094] Figure 2 An embodiment of the present application provides a system architecture 100.
[0095] exist Figure 2In this embodiment, the data acquisition device 160 is used to collect training data. Regarding the training method of the recommendation model in this application, the recommendation model can be further trained using training samples; that is, the training data collected by the data acquisition device 160 can be training samples.
[0096] For example, in embodiments of this application, training samples may include sample user behavior logs, location information of sample recommended objects, and sample tags, which can be used to indicate whether a user selects a sample recommended object.
[0097] After collecting the training data, the data acquisition device 160 stores the training data in the database 130, and the training device 120 trains the target model / rule 101 based on the training data maintained in the database 130.
[0098] The following describes how the training device 120 obtains the target model / rule 101 based on the training data. The training device 120 processes the input original image and compares the output image with the original image until the difference between the output image of the training device 120 and the original image is less than a certain threshold, thereby completing the training of the target model / rule 101.
[0099] For example, in the embodiments of this application, the training device 120 can jointly train the location bias model and the recommendation model based on the training samples. For instance, it can jointly train the location bias model and the recommendation model by using the sample user behavior logs and the location information of the sample recommended objects as input data and the sample labels as the target output values; thereby obtaining the trained recommendation model, that is, the trained recommendation model can be the target model / rule 101.
[0100] The aforementioned target model / rule 101 can be used to predict the probability of a user selecting the target recommended object when the user has noticed it. Specifically, the target model / rule 101 in this embodiment can be a deep neural network, logistic regression model, etc.
[0101] It should be noted that in practical applications, the training data maintained in the database 130 may not all come from the data acquisition device 160; it may also be received from other devices. Furthermore, it should be noted that the training device 120 may not necessarily train the target model / rule 101 entirely based on the training data maintained in the database 130; it may also obtain training data from the cloud or other sources for model training. The above description should not be construed as limiting the embodiments of this application.
[0102] The target model / rule 101 trained using training device 120 can be applied to different systems or devices, such as... Figure 2The execution device 110 shown can be a terminal, such as a mobile phone terminal, tablet computer, laptop computer, augmented reality (AR) / virtual reality (VR) device, in-vehicle terminal, etc., or it can be a server, or the cloud, etc. Figure 2 In the embodiment of this application, the execution device 110 is configured with an input / output (I / O) interface 112 for data interaction with external devices. Users can input data to the I / O interface 112 through the client device 140. The input data may include training samples input by the client device.
[0103] The preprocessing module 113 and the preprocessing module 114 are used to preprocess the input data received by the I / O interface 112. In this embodiment, the preprocessing module 113 and the preprocessing module 114 may be omitted (or only one of them may be used), and the calculation module 111 may be used directly to process the input data.
[0104] During the preprocessing of input data by the execution device 110, or during the calculation module 111 of the execution device 110 performing calculations and other related processes, the execution device 110 can call data, code, etc. in the data storage system 150 for corresponding processing, or store the data, instructions, etc. obtained from the corresponding processing into the data storage system 150.
[0105] Finally, the I / O interface 112 will process the results, such as the trained recommendation model, which can be used by the recommendation system to predict the probability of the user selecting a candidate recommendation object from the candidate recommendation object set online. Based on the probability of the user selecting a candidate recommendation object, the recommendation result of the candidate recommendation object can be returned to the client device 140, thereby providing it to the user.
[0106] For example, in an embodiment of this application, the above recommendation result may be a recommendation ranking of candidate recommendation objects obtained based on the probability that the user to be processed selects a candidate recommendation object.
[0107] It is worth noting that the training device 120 can generate corresponding target models / rules 101 based on different training data for different objectives or tasks. The corresponding target models / rules 101 can be used to achieve the above objectives or complete the above tasks, thereby providing the user with the required results.
[0108] exist Figure 2 In the scenario shown, in one case, the user can manually provide input data, which can be done through the interface provided by I / O interface 112.
[0109] In another scenario, client device 140 can automatically send input data to I / O interface 112. If user authorization is required for client device 140 to automatically send input data, the user can set the corresponding permissions in client device 140. The user can view the output results of execution device 110 on client device 140, which can be presented in various forms such as display, sound, or animation. Client device 140 can also act as a data acquisition terminal, collecting the input data from input I / O interface 212 and the output results from output I / O interface 112 as new sample data and storing them in database 130. Alternatively, data can be collected directly from I / O interface 112 without going through client device 140, using the input data from input I / O interface 112 and the output results from output I / O interface 112 as new sample data and storing them in database 130.
[0110] It is worth noting that, Figure 2 This is merely a schematic diagram of a system architecture provided in an embodiment of this application. The positional relationships between the devices, components, modules, etc., shown in the diagram do not constitute any limitation. For example, in Figure 2 In this context, the data storage system 150 is an external memory relative to the execution device 110. In other cases, the data storage system 150 may also be placed within the execution device 110.
[0111] For example, the recommendation model in this application may be a fully convolutional network (FCN).
[0112] For example, the recommendation model in the embodiments of this application can also be a logistic regression model, which is a machine learning method used to solve classification problems and can be used to estimate the probability of something.
[0113] For example, the recommendation model can be a deep factorization machine (DFM) model, or it can be a wide & deep model.
[0114] Figure 3 This application provides a hardware structure for a chip, which includes a neural network processor 200. This chip can be configured as follows: Figure 2 The execution device 110 shown is used to perform the calculations of the calculation module 111. This chip can also be located in, for example... Figure 2 The training device 120 shown is used to complete the training work of the training device 120 and output the target model / rule 101.
[0115] The neural network processing unit (NPU) 200 is mounted as a coprocessor on the main central processing unit (CPU), and tasks are assigned by the main CPU. The core of the NPU 200 is the arithmetic circuit 203, and the controller 204 controls the arithmetic circuit 203 to retrieve data from the memory (weight memory or input memory) and perform calculations.
[0116] In some implementations, the arithmetic circuit 203 internally includes multiple process engines (PEs). In some implementations, the arithmetic circuit 203 is a two-dimensional pulsating array. The arithmetic circuit 203 can also be a one-dimensional pulsating array or other electronic circuits capable of performing mathematical operations such as multiplication and addition. In some implementations, the arithmetic circuit 203 is a general-purpose matrix processor.
[0117] For example, suppose we have an input matrix A, a weight matrix B, and an output matrix C. The arithmetic circuit 203 retrieves the corresponding data for matrix B from the weight memory 202 and caches it in each PE (Engineer Component) of the arithmetic circuit 203. The arithmetic circuit 203 retrieves the data for matrix A from the input memory 201 and performs matrix operations with matrix B. The partial or final result of the obtained matrix is stored in the accumulator 208.
[0118] The vector calculation unit 207 can further process the output of the arithmetic circuit 203, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc.
[0119] For example, the vector computation unit 207 can be used for network computation in non-convolutional / non-FC layers of a neural network, such as pooling, batch normalization, and local response normalization.
[0120] In some implementations, the vector computation unit 207 can store the processed output vector into the unified memory 206. For example, the vector computation unit 207 can apply a nonlinear function to the output of the arithmetic circuit 203, such as a vector of accumulated values, to generate activation values. In some implementations, the vector computation unit 207 generates normalized values, merged values, or both.
[0121] In some implementations, the vector of processed output can be used as an activation input to the computation circuit 203, for example, for use in subsequent layers of the neural network.
[0122] The unified memory 206 can be used to store input data and output data. Weight data is directly stored in the input memory 201 and / or the unified memory 206 through the direct memory access controller 205 (DMAC), the weight data in the external memory is stored in the weight memory 202, and the data in the unified memory 206 is stored in the external memory.
[0123] The bus interface unit (BIU) 210 is used to enable interaction between the main CPU, DMAC and instruction fetch memory 209 via the bus.
[0124] The instruction fetch buffer 209, which is connected to the controller 204, is used to store the instructions used by the controller 204.
[0125] The controller 204 is used to call the instructions cached in the instruction fetch memory 209 to control the operation of the computing accelerator.
[0126] Generally, the unified memory 206, input memory 201, weight memory 202, and instruction fetch memory 209 can all be on-chip memories. External memory is memory outside the NPU, which can be double data rate synchronous dynamic random access memory (DDR SDRAM), high bandwidth memory (HBM), or other readable and writable memory.
[0127] It should be noted that the above Figure 2 The operations of each layer in the convolutional neural network shown can be performed by the operation circuit 203 or the vector calculation unit 207.
[0128] Currently, to eliminate the influence of location information on recommendation models, methods such as weighted processing of training data or modeling using location information as a feature are commonly used. However, the weighted processing method uses fixed weights and doesn't consider dynamic adjustments based on users or different product categories, leading to inaccurate predictions of actual user choices. Modeling using location information as a feature involves training model parameters using location information during training. However, this method faces the problem of not being able to obtain the input location features when predicting selection probabilities. Two solutions exist: traversing all locations and selecting a default location. Traversing all locations has high time complexity, which doesn't meet the low latency requirements of recommendation systems. Selecting a default location solves the high time complexity problem of traversing all locations, but different default locations affect the recommendation ranking, thus impacting the recommendation performance.
[0129] In view of this, this application provides a method for training a recommendation model, a method for predicting selection probabilities, and an apparatus. In the embodiments of this application, a location bias model and a recommendation model can be jointly trained using the sample user behavior logs and the location information of the sample recommendation objects as input data, and the sample labels as the target output value, to obtain a trained recommendation model. The location bias model is used to predict the probability that users will notice the recommendation objects in different locations. Furthermore, when users notice the recommendation objects, it can predict the probability that users will choose the recommendation objects based on their own interests, thereby eliminating the influence of location information on the recommendation model and improving the accuracy of the recommendation model.
[0130] Figure 4 This is a system architecture for training a recommendation model and predicting selection probabilities using embodiments of this application. The system architecture 300 may include a local device 320, a local device 330, an execution device 310, and a data storage system 350, wherein the local devices 320 and 330 are connected to the execution device 310 via a communication network.
[0131] The execution device 310 can be implemented by one or more servers. Optionally, the execution device 310 can be used in conjunction with other computing devices, such as data storage devices, routers, load balancers, etc. The execution device 310 can be deployed on a single physical site or distributed across multiple physical sites. The execution device 310 can use data in the data storage system 350 or call program code in the data storage system 350 to implement the training method of the recommendation model and the method of predicting selection probabilities of this application embodiment.
[0132] For example, the data storage system 350 can be deployed in local device 320 or local device 330. For instance, the data storage system 350 can be used to store user behavior logs.
[0133] It should be noted that the aforementioned execution device 310 can also be called a cloud device, in which case the execution device 310 can be deployed in the cloud.
[0134] Specifically, the execution device 310 can perform the following process: acquiring training samples, the training samples including sample user behavior logs, location information of sample recommended objects, and sample tags; jointly training a location bias model and a recommendation model by using the sample user behavior logs and the location information of the sample recommended objects as input data and the sample tags as the target output value, to obtain a trained recommendation model, wherein the location bias model is used to predict the probability that a user will notice the target recommended object when the target recommended object is in different locations, and the recommendation model is used to predict the probability that a user will select the target recommended object when the user notices the target recommended object.
[0135] Through the above process, the device 310 can obtain a user authenticity recommendation model through training. This recommendation model can eliminate the influence of recommendation location on users and predict the probability that users will choose the recommended object based on their own interests.
[0136] In one possible implementation, the training method described above for the execution device 310 can be an offline training method executed in the cloud.
[0137] Users can operate their respective user devices (e.g., local device 320 and local device 330) and store the operation logs in the data storage system 350. Execution device 310 can then access the data in the data storage system 350 to complete the training process of the recommendation model. Each local device can represent any computing device, such as a personal computer, computer workstation, smartphone, tablet, smart camera, smart car, or other types of cellular phone, media consumption device, wearable device, set-top box, game console, etc.
[0138] Each user's local device can interact with the execution device 310 through a communication network of any communication mechanism / standard. The communication network can be a wide area network, a local area network, a point-to-point connection, or any combination thereof.
[0139] In one implementation, local devices 320 and 730 can obtain relevant parameters of a pre-trained recommendation model from execution device 310, and use the recommendation model on local devices 320 and 730 to predict the probability of a user selecting a recommended object.
[0140] In another implementation, a pre-trained recommendation model can be directly deployed on the execution device 310. The execution device 310 obtains the user behavior logs of the user to be processed from the local devices 320 and 330, and obtains the probability of the user selecting a candidate recommendation object from the candidate set of recommendation objects based on the pre-trained recommendation model.
[0141] For example, the data storage system 350 may be deployed in local device 320 or local device 330 for storing user behavior logs of the local device.
[0142] For example, the data storage system 350 can be deployed independently on the storage device, separate from the local device 320 or the local device 330. The storage device can interact with the local device to obtain user behavior logs from the local device and store them in the storage device.
[0143] Let's combine the following... Figure 5 The training method of the recommendation model in the embodiments of this application is described in detail. Figure 5 The method 400 shown includes steps 410 to 420, which are described in detail below.
[0144] Step 410: Obtain training samples, which include sample user behavior logs, information on the location of sample recommended objects, and sample tags. The sample tags are used to indicate whether the user selects the sample recommended object.
[0145] Among them, training samples can be in, for example Figure 4 Data obtained from the data storage system 350 shown.
[0146] Optionally, the sample user behavior log may include one or more of the following: user profile information, feature information of the recommended object (e.g., recommended product), and sample context information.
[0147] For example, user profile information, also known as audience profiling, refers to a tagged profile abstracted from user demographic information, social relationships, preferences, habits, and consumption behavior. For instance, user profile information may include user download history and user interests.
[0148] For example, the feature information of a recommended object can refer to the category of the recommended object, or it can refer to the identifier of the recommended object, such as the ID of a historical recommended object.
[0149] For example, sample context information could refer to the sample user's historical download time information or historical download location information, etc.
[0150] For example, a training sample data may include contextual information (e.g., time), location information, user information, and product information.
[0151] For example, at 10:00 AM, user A selects / does not select product X at position 1. Here, position 1 can refer to the position information of the recommended product in the recommendation ranking, and the sample label can be 1 to indicate that product X is selected and 0 to indicate that product X is not selected; or, the sample label can also be other numerical indicators to indicate whether product X is selected or not selected.
[0152] In one possible implementation, the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different types of historical recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in the same type of historical recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in the historical recommendation objects of different lists.
[0153] For example, the recommendation ranking includes position 1 - product X (category A), position 2 - product Y (category B), and position 3 - product Z (category C); for example, position 1 - first APP (category: shopping), position 2 - second APP (category: video player), and position 3 - third APP (category: browser).
[0154] In one possible implementation, the location information recommended by the above sample refers to the recommended location information based on the same type of recommended products; that is, the location information of product X can be the recommended position of product X among products of its own category.
[0155] For example, the recommended ranking includes position 1 - first app (category: shopping), position 2 - second app (category: shopping), and position 3 - third app (category: shopping).
[0156] In one possible implementation, the location information of the sample recommended objects refers to the recommended location information of recommended products based on different lists.
[0157] For example, different lists can refer to user rating lists, today's lists, this week's lists, nearby lists, local lists, national lists, etc.
[0158] Step 420: By using the sample user behavior logs and the location information of the sample recommended object as input data, and the sample label as the target output value, the location bias model and the recommendation model are jointly trained to obtain the trained recommendation model. The location bias model is used to predict the probability that the user will notice the target recommended object when the target recommended object is in different locations. The recommendation model is used to predict the probability that the user will select the target recommended object when the user notices the target recommended object.
[0159] It should be understood that the probability of a user selecting a target recommendation can refer to the probability of a user clicking on the target object, such as the probability of a user downloading the target object, or the probability of a user browsing the target object; the probability of a user selecting a target object can also refer to the probability of a user performing a user action on the target object.
[0160] The recommended object can be a recommended application in the application market of a terminal device; or, in a browser, the recommended object can be a recommended website or recommended news. In the embodiments of this application, the recommended object can be information recommended to the user by the recommendation system, and this application does not limit the specific implementation of the recommended object.
[0161] It should be noted that the above joint training can be multi-task learning, where multiple training data use a shared representation to simultaneously learn multiple sub-task models. The basic assumption of multi-task learning is that multiple tasks are correlated, thus enabling them to mutually promote each other.
[0162] For example, in this application, obtaining sample tags is influenced by two factors: whether the user likes the recommended product and whether the recommended product is placed in an easily accessible position. In other words, sample tags refer to whether the user chooses or does not choose a recommended product based on their own interests, given that the user has seen the recommended product. That is, the probability of a user choosing a recommended product can be seen as the probability that the user chooses a recommended product based on their own interests, given that the user has seen the recommended product.
[0163] Optionally, the aforementioned joint training can refer to training the parameters of the location bias model and the user's actual recommendation model based on the difference between the sample's true label containing location information and the joint predicted selection probability. The joint predicted selection probability is obtained by multiplying the output data of the location bias model and the recommendation model. For example, the model parameters of the location bias model and the recommendation model can be obtained through multiple iterations of the backpropagation algorithm using the difference between the sample label and the joint predicted selection probability. The joint predicted selection probability can be obtained from the output data of the location bias model and the recommendation model.
[0164] It should be understood that in the embodiments of this application, the sample label may refer to the label of the user's selected sample object containing location information, and the joint predicted selection probability may refer to the predicted probability of the user selecting the sample object containing location information. For example, the joint predicted selection probability may be used to represent the probability that the user pays attention to the recommended object and selects the recommended object according to their own interests.
[0165] For example, the location information of the sample recommended object can be input into the location bias model to obtain the probability that the user pays attention to the target recommended object; the sample user behavior log can be input into the recommendation model to obtain the probability that the user selects the target recommended object; the joint predicted selection probability is obtained by multiplying the probability that the user pays attention to the target recommended object with the probability that the user selects the target recommended product.
[0166] The probability that a user notices the target recommended item can be represented by the predicted selection probability at different locations, which indicates the probability that a user notices the recommended item at that location. The probability of a user noticing a recommended item can vary depending on the location. The probability that a user selects the target recommended item can refer to the user's actual selection probability, i.e., the probability that the user selects the recommended item based on their own interests. The joint predicted selection probability is obtained by multiplying the predicted selection probability at different locations by the predicted actual selection probability of the user. This joint predicted selection probability can be used to represent the probability that a user notices the recommended item and selects it based on their own interests.
[0167] It should be noted that the sample labels included in the training samples depend on two conditions: condition one, the probability that the recommended product is seen by the user; and condition two, the probability that the user selects the recommended product if it has already been seen by the user.
[0168] For example, a user's selection of recommended products depends on two conditions:
[0169] p(y=1|x,pos)=p(seen|x,pos)p(y=1|x,pos,seen);
[0170] Assume that the probability of a recommended product being seen depends only on its display location; once a recommended product has been seen by a user, the probability of it being selected is independent of its location, i.e.:
[0171] p(y=1|x,pos)=p(seen|pos)p(y=1|x,seen);
[0172] Where p(y=1│x,pos) represents the probability that a user selects a recommended product, x represents the user behavior log, and pos represents the location information; p(seen│pos) represents the probability that a user notices a recommended product in different locations; p(y=1│x,seen) represents the probability that a recommended product is selected when it has already been seen by the user, that is, the probability that a user selects a recommended product based on their own interests when the recommended product has been seen by the user.
[0173] In this embodiment, the probability of a user noticing a target recommended object in different locations can be predicted using a location bias model. The probability of a user selecting a target recommended object when it has already been seen can also be predicted using a recommendation model, i.e., the probability of a user selecting a target recommended object based on their own interests. By jointly training the location bias model and the recommendation model using sample user behavior logs and sample recommended object location information as input data, and sample labels as the target output value, the influence of location information on the recommendation model is eliminated, resulting in a recommendation model based on user interests, thereby improving the accuracy of the recommendation model.
[0174] Figure 6 This is a selection rate (also known as selection probability) prediction framework for attention location information provided in the embodiments of this application. For example... Figure 6 As shown, the selection rate prediction framework 500 includes a position bias fitting module 501, a user's true selection rate fitting module 502, and a user selection rate fitting module 503 with position bias. Within the selection rate prediction framework 500, the position bias fitting module 501 and the user's true selection rate fitting module 502 can respectively fit the position bias and the user's true selection rate, accurately modeling the acquired user behavior data, thereby eliminating the influence of position bias, and ultimately obtaining an accurate user's true selection rate fitting module 503.
[0175] It should be noted that the position offset fitting module 501 can correspond to Figure 5 The position bias model described above, the user's true selection rate fitting module 502 can correspond to Figure 5 The recommendation model described herein. For example, the position bias fitting module 501 can be used to predict the probability that a user will notice the target recommendation object when it is in different positions, and the user's true selection rate fitting module 502 can be used to predict the probability that a user will select the target recommendation object, i.e., the user's true selection rate, when the user notices the target recommendation object.
[0176] like Figure 6The inputs in the framework 500 shown include general features and location bias information. The general features may include user features, product features, and environmental features. The outputs can be divided into intermediate outputs and final outputs. For example, the outputs of modules 501 and 502 can be regarded as intermediate outputs, and the output of module 503 can be regarded as the final output.
[0177] It should be understood that the position offset fitting module 501 can be as described above. Figure 4 The position bias model shown, the user's true selection rate fitting module 502 can be the one described above. Figure 4 The recommended model shown.
[0178] Specifically, module 501 outputs the selection rate based on location information, module 502 outputs the actual user selection rate, and module 503 outputs the predicted probability of frame 500 for biased user selection behavior. The higher the predicted value output by module 503, the higher the predicted selection probability under that condition; conversely, the lower the predicted selection probability under that condition.
[0179] It should be understood that the aforementioned joint prediction selection probability may refer to the biased prediction probability of user selection behavior output by module 503.
[0180] The following is a detailed description of each module in the framework 500.
[0181] The location bias fitting module 501 can be used to predict the probability that a user will notice a recommended object (e.g., a recommended product) in different locations.
[0182] For example, module 501 takes positional offset information as input and outputs a prediction of the probability that the item will be selected under that positional offset condition.
[0183] Among them, position offset information can refer to position information, such as the position information of the recommended product in the recommendation ranking.
[0184] For example, positional bias can refer to the recommended product's position information among different categories of recommended products, or positional bias can refer to the recommended product's position information among the same category of recommended products, or positional bias can refer to the recommended product's position information among different lists.
[0185] The user true selection rate fitting module 502 is used to predict the probability that a user will select a recommended object (e.g., a recommended product) based on their own interests. In other words, the user true selection rate fitting module 502 can be used to predict the probability that a user will select a recommended object based on their own interests when the user has paid attention to the recommended object.
[0186] For example, module 502 can predict the user's true selection rate using the aforementioned common features, namely, user features, product features, and environmental features. The user selection rate fitting module 503 with location bias is used to receive the output data from the location bias fitting module 501 and the user's true selection rate fitting module 502, and multiply the output data to obtain the user selection rate with location bias.
[0187] For example, the prediction selection rate framework 500 can be divided into two phases: an offline training phase and an online prediction phase. The offline training phase and the online prediction phase are described in detail below.
[0188] Offline training phase:
[0189] The user selection rate fitting module 503 with location bias calculates the user selection rate to be biased by acquiring the output data of modules 501 and 502, and fits the user behavior data using the following equation:
[0190]
[0191] Where, θ ps θ represents the parameter of module 501. pCTR This represents the parameters of module 502, where N is the number of training samples, and bCTR is the parameter. i This indicates that based on the output data of the i-th training sample module 503, ProbSeen i This indicates that pCTR is based on the output data of the i-th training sample module 501. i This indicates that based on the output data of the i-th training sample module 502, y i Let l be the label of the user behavior of the i-th training sample (1 for positive examples and 0 for negative examples), and l represent the loss function, i.e., Logloss.
[0192] For example, parameters can be updated using the sampling gradient descent method or the chain rule:
[0193]
[0194]
[0195] Where K represents the number of iterations for updating the model parameters, and η represents the learning rate for updating the model parameters.
[0196] After the model parameters are updated and converged, the position bias selection rate prediction module 501 and the user's actual selection rate module 502 can be obtained.
[0197] For example, depending on the complexity of the input positional bias information, the module 501 described above may employ a linear model or a deep model.
[0198] For example, the above module 502 can be a logistic regression model or a deep neural network model.
[0199] In the embodiments of this application, the probability of the user selecting a candidate recommended item from the candidate recommended item set can be predicted by inputting the user behavior logs of the user to be processed and the candidate recommended item set into a pre-trained recommendation model. The pre-trained recommendation model can be used to predict online the probability of a user selecting recommended items based on their interests. By using a pre-trained recommendation model, the problem of insufficient input location information in the prediction stage, which arises from training the recommendation model using location bias information as a general feature, can be avoided. This solves the computational complexity caused by traversing all locations and the instability caused by selecting a default location. In this application, the pre-trained recommendation model is trained by jointly training the location bias model and the recommendation model using training data, thereby eliminating the influence of location information on the recommendation model and obtaining a recommendation model based on user interests, thus improving the accuracy of the predicted selection probability.
[0200] Online prediction phase:
[0201] like Figure 7 As shown, when making online predictions, only module 502 needs to be deployed. The recommendation system constructs an input vector based on common features such as user features, product features, and contextual information. No location features need to be input. Module 502 can predict the user's true selection rate, that is, the probability that the user will choose the recommended product based on their own interests.
[0202] Figure 8 This is a schematic flowchart illustrating the method for predicting selection probabilities provided in the embodiments of this application. Figure 8 The method 600 shown includes steps 610 to 630, which are described in detail below.
[0203] Step 610: Obtain the user feature information, context information, and candidate set of recommendation objects for the user to be processed.
[0204] User behavior logs can be in, for example, Figure 4 Data obtained from the data storage system 350 shown.
[0205] Optionally, the candidate set of recommended objects may include feature information of the candidate recommended objects.
[0206] For example, the feature information of the candidate recommendation object can refer to the category of the candidate recommendation object, or it can refer to the identifier of the candidate recommendation object, such as the ID of the product.
[0207] Optionally, user behavior logs may include user profile information and contextual information. For example, user profile information, also known as audience profiling, refers to a tagged profile abstracted from user demographic information, social relationships, preferences, habits, and consumption behavior. For instance, user profile information may include user download history and user interests.
[0208] For example, contextual information could include the current download time or the current download location.
[0209] For example, a training sample data may include contextual information (e.g., time), location information, user information, and product information. For instance, at 10:00 AM, user B selects / does not select product X at position 2, where position 2 may refer to the position information of the recommended product in the recommendation ranking, selection can be represented by 1, and not selection can be represented by 0.
[0210] Step 620: Input the user feature information, the context information, and the candidate set of recommendation objects into the pre-trained recommendation model to obtain the probability that the user to be processed selects a candidate recommendation object in the candidate set of recommendation objects. The pre-trained recommendation model is used to predict the probability that the user selects the target recommendation object when the user pays attention to the target recommendation product. The sample label is used to indicate whether the user selects the sample recommendation object.
[0211] The pre-trained recommendation model can be, for example, as follows: Figure 6 or Figure 7 The user's true selection rate fitting module 502 is shown; the training method for the recommendation model can be as follows: Figure 5 The training method shown and Figure 7 The methods for the offline training phase shown are not elaborated here.
[0212] The model parameters of the aforementioned pre-trained recommendation model are obtained by jointly training the location bias model and the recommendation model with sample user behavior logs and sample recommendation object location information as input data and sample labels as target output values. The location bias model is used to predict the probability that the user will pay attention to the target recommendation object when the target recommendation object is in different locations.
[0213] Optionally, joint training can refer to training the model parameters of the location bias model and the recommendation model based on the difference between the sample labels and the joint predicted selection probability, wherein the joint predicted selection probability is obtained from the output data of the location bias model and the recommendation model.
[0214] For example, training samples can be obtained, which may include sample user behavior logs, sample recommended object location information, and sample tags; the sample recommended object location information is input into the location bias model to obtain the probability that the user pays attention to the target recommended object; the sample user behavior logs are input into the recommendation model to obtain the probability that the user selects the target recommended product; the joint predicted selection probability is obtained by multiplying the probability that the user pays attention to the target recommended object by the probability that the user selects the target recommended product.
[0215] Step 603: Obtain the recommendation result of the candidate recommendation object based on the probability that the user to be processed selects the candidate recommendation object.
[0216] Optionally, the candidate recommendation objects can be sorted according to the predicted probability that the user will select any candidate recommendation object from the candidate recommendation object set, thereby obtaining the recommendation result of the candidate recommendation objects.
[0217] For example, candidate recommendation objects can be sorted in descending order according to the predicted selection probability. For instance, candidate recommendation objects could be candidate recommendation apps.
[0218] like Figure 9 As shown, Figure 9 The image shows the "Recommended" page in an app store, which can contain multiple lists, such as featured apps and featured games. Taking featured apps as an example, the app store's recommendation system predicts the probability of a user selecting a candidate set of products based on user, candidate product, and contextual features. It then ranks the candidate products in descending order based on this probability, placing the most likely-to-be-downloaded app at the top.
[0219] For example, the recommended results in the featured apps section could be: App 5 in the first featured game section, App 6 in the second featured game section, App 7 in the third featured game section, and App 8 in the fourth featured game section. After seeing the app store's recommended results, users can choose to browse, select, or download based on their interests. These actions will be recorded in the user behavior log.
[0220] For example, Figure 9 The app market shown can use user behavior logs as training data to train recommendation models.
[0221] It should be understood that the above examples are provided to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments of this application to the specific values or scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of this application.
[0222] The above text combined Figures 1 to 9 This paper describes in detail the training method of the recommendation model and the method of predicting the selection probability in the embodiments of this application. The following will combine... Figures 10 to 13 The following describes in detail the device embodiments of this application.
[0223] It should be understood that the training device in the embodiments of this application can execute the training method of the recommendation model in the aforementioned embodiments of this application, and the device for predicting the selection probability can execute the method for predicting the selection probability in the aforementioned embodiments of this application. That is, the specific working process of the various products below can be referred to the corresponding process in the aforementioned method embodiments.
[0224] Figure 10 This is a schematic block diagram of a training apparatus for the recommended model provided in an embodiment of this application. It should be understood that the training apparatus 700 can perform... Figure 5 The training method for the recommended model is shown. The training apparatus 700 includes an acquisition unit 710 and a processing unit 720.
[0225] The acquisition unit 710 is used to acquire training samples, which include sample user behavior logs, location information of sample recommended objects, and sample tags. The sample tags are used to indicate whether a user selects the sample recommended object. The processing unit 720 is used to jointly train a location bias model and a recommendation model using the sample user behavior logs and the location information of the sample recommended objects as input data and the sample tags as the target output value, to obtain a trained recommendation model. The location bias model is used to predict the probability that a user will notice the target recommended object when it is in different locations. The recommendation model is used to predict the probability that a user will select the target recommended object when it is noticed.
[0226] Optionally, as an embodiment, the joint training refers to training the model parameters of the location bias model and the recommendation model based on the difference between the sample label and the joint predicted selection probability, wherein the joint predicted selection probability is obtained based on the output data of the location bias model and the recommendation model.
[0227] Optionally, as an embodiment, the processing unit 720 is further configured to input the location information of the sample recommended object into the location bias model to obtain the probability that the user pays attention to the target recommended object; input the sample user behavior log into the recommendation model to obtain the probability that the user selects the target recommended product; and multiply the probability that the user pays attention to the target recommended object by the probability that the user selects the target recommended product to obtain the joint predicted selection probability.
[0228] Optionally, as an embodiment, the sample user behavior log includes one or more of the sample user profile information, the feature information of the sample recommended object, and the sample context information.
[0229] Optionally, as an embodiment, the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different categories of historical recommended products, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in the same category of historical recommended products, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different lists of historical recommended products.
[0230] Figure 11 This is a schematic block diagram of an apparatus for predicting selection probabilities provided in an embodiment of this application. It should be understood that apparatus 800 can perform... Figure 8 The method for predicting selection probabilities is shown. The training device 800 includes an acquisition unit 810 and a processing unit 820.
[0231] The acquisition unit 810 is used to acquire user feature information, context information, and a candidate set of recommended products for the user to be processed. The processing unit 820 is used to input the user feature information, the context information, and the candidate set of recommended products into a pre-trained recommendation model to obtain the probability that the user to be processed will select a candidate recommended product from the candidate set. The pre-trained recommendation model is used to predict the probability that the user will select the target recommended product when the user pays attention to it. The recommendation result of the candidate recommended product is obtained based on the probability that the user to be processed will select the candidate recommended product. The model parameters of the pre-trained recommendation model are obtained by jointly training a location bias model and the recommendation model with sample user behavior logs and sample recommended product location information as input data and sample labels as the target output value. The location bias model is used to predict the probability that the user will pay attention to the target recommended product when the target recommended product is in different locations. The sample labels are used to indicate whether the user selects the sample recommended product.
[0232] Optionally, the candidate recommendation objects can be sorted according to the predicted probability that the user will select any candidate recommendation object from the candidate recommendation object set, thereby obtaining the recommendation result of the candidate recommendation objects.
[0233] Optionally, as an embodiment, the joint training refers to training the model parameters of the location bias model and the recommendation model based on the difference between the sample label and the joint predicted selection probability, wherein the joint predicted selection probability is obtained based on the output data of the location bias model and the recommendation model.
[0234] Optionally, as an embodiment, the joint prediction selection probability is obtained by multiplying the probability that the user pays attention to the target recommended object by the probability that the user selects the target recommended object, wherein the probability that the user pays attention to the target recommended object is obtained based on the location information of the sample recommended object and the location bias model, and the probability that the user selects the target recommended object is obtained based on the sample user behavior and the recommendation model.
[0235] Optionally, as an embodiment, the sample user behavior log includes one or more of the following: sample user profile information, feature information of the sample recommended object, and sample context information.
[0236] Optionally, as an embodiment, the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different types of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in the same type of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different lists of recommendation objects.
[0237] It should be noted that the training devices 700 and 800 described above are embodied in the form of functional units. The term "unit" here can be implemented in software and / or hardware, and there is no specific limitation on this.
[0238] For example, a "unit" can be a software program, a hardware circuit, or a combination of both that implements the above functions. The hardware circuit may include an application-specific integrated circuit (ASIC), electronic circuitry, a processor (e.g., a shared processor, a proprietary processor, or a group processor) and memory for executing one or more software or firmware programs, integrated logic circuitry, and / or other suitable components that support the described functions.
[0239] Therefore, the units of the various examples described in the embodiments of this application can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0240] Figure 12 This is a schematic diagram of the hardware structure of the training device for the recommended model provided in this application embodiment. Figure 12 The training device 900 shown (which may specifically be a computer device) includes a memory 901, a processor 902, a communication interface 903, and a bus 904. The memory 901, processor 902, and communication interface 903 are interconnected via the bus 904.
[0241] The memory 901 can be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 901 can store programs. When the program stored in the memory 901 is executed by the processor 902, the processor 902 executes various steps of the training method of the recommended model in this embodiment, for example, executing... Figure 5 The steps shown.
[0242] It should be understood that the training device shown in the embodiments of this application can be a server, for example, a server in the cloud, or a chip configured in a server in the cloud.
[0243] The processor 902 may be a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), graphics processing unit (GPU), or one or more integrated circuits, used to execute relevant programs to implement the training method of the recommended model in the method embodiment of this application.
[0244] The processor 902 can also be an integrated circuit chip with signal processing capabilities. In implementation, each step of the training method for the recommended model of this application can be completed through the integrated logic circuitry in the processor 902 or through software instructions.
[0245] The processor 902 described above can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 901, and processor 902 reads the information in memory 901 and, in conjunction with its hardware, completes the implementation of this application. Figure 10 The training apparatus shown includes units that are required to perform functions, or to perform the methods described in this application. Figure 5 The training method for the recommendation model is shown.
[0246] The communication interface 903 uses transceiver devices, such as, but not limited to, transceivers, to enable communication between the training device 900 and other devices or communication networks.
[0247] Bus 904 may include a pathway for transmitting information between various components of training device 900 (e.g., memory 901, processor 902, communication interface 903).
[0248] Figure 13 This is a schematic diagram of the hardware structure of the device for predicting selection probability provided in the embodiments of this application. Figure 13 The device 1000 shown (which may specifically be a computer device) includes a memory 1001, a processor 1002, a communication interface 1003, and a bus 1004. The memory 1001, the processor 1002, and the communication interface 1003 are interconnected via the bus 1004.
[0249] The memory 1001 may be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 1001 may store a program. When the program stored in the memory 1001 is executed by the processor 1002, the processor 1002 performs various steps of the method for predicting selection probabilities according to embodiments of this application, for example, executing... Figure 8The steps shown.
[0250] It should be understood that the device shown in the embodiments of this application may be a smart terminal, or it may be a chip configured in a smart terminal.
[0251] The processor 1002 may be a general-purpose central processing unit (CPU), microprocessor, application-specific integrated circuit (ASIC), graphics processing unit (GPU), or one or more integrated circuits, used to execute relevant programs to implement the method of predicting selection probability in the embodiments of this application.
[0252] The processor 1002 can also be an integrated circuit chip with signal processing capabilities. In implementation, each step of the method for predicting selection probabilities in this application can be accomplished through integrated logic circuits in the hardware of the processor 1002 or through software instructions.
[0253] The processor 1002 described above can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules can be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory 1001. The processor 1002 reads the information in memory 1001 and, in conjunction with its hardware, completes the implementation of this application. Figure 11 The apparatus shown includes units that are required to perform functions, or to perform the methods described in this application. Figure 8 The method shown is for predicting the probability of choice.
[0254] The communication interface 1003 uses a transceiver device, such as, but not limited to, a transceiver, to enable communication between the device 1000 and other devices or communication networks.
[0255] Bus 1004 may include a pathway for transmitting information between various components of device 1000 (e.g., memory 1001, processor 1002, communication interface 1003).
[0256] It should be noted that although only the memory, processor, and communication interface are shown in the above-described training devices 900 and 1000, those skilled in the art should understand that in specific implementations, training devices 900 and 1000 may also include other devices necessary for normal operation. Furthermore, depending on specific needs, those skilled in the art should understand that the above-described training devices 900 and 1000 may also include hardware devices for implementing other additional functions. In addition, those skilled in the art should understand that the above-described training devices 900 and 1000 may only include the devices necessary for implementing the embodiments of this application, and may not necessarily include... Figure 12 or Figure 13 All the devices shown.
[0257] It should also be understood that, in embodiments of this application, the memory may include read-only memory and random access memory, and provides instructions and data to the processor. A portion of the processor may also include non-volatile random access memory. For example, the processor may also store device type information.
[0258] It should be understood that the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0259] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply 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 this application.
[0260] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0261] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0262] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0263] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0264] In addition, the functional modules in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0265] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0266] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for training a recommendation model, characterized in that, include: Obtain training samples, which include sample user behavior logs, location information of sample recommended objects, and sample tags. The sample tags are used to indicate whether the user selects the sample recommended object. By using the sample user behavior logs and the location information of the sample recommended objects as input data, and the sample labels as the target output value, a joint training of the location bias model and the recommendation model is obtained. The location bias model is used to predict the probability that a user will notice the target recommended object when it is in different locations. The recommendation model is used to predict the probability that a user will select the target recommended object when it is noticed. The joint training refers to training the model parameters of the location bias model and the recommendation model based on the difference between the sample labels and the jointly predicted selection probability. The jointly predicted selection probability is obtained based on the output data of the location bias model and the recommendation model.
2. The training method as described in claim 1, characterized in that, Also includes: The location information of the sample recommended object is input into the location bias model to obtain the probability that the user pays attention to the target recommended object; The probability of a user selecting the target recommendation object is obtained by inputting the sample user behavior logs into the recommendation model. The joint predicted selection probability is obtained by multiplying the probability that the user pays attention to the target recommended object by the probability that the user selects the target recommended object.
3. The training method as described in claim 1 or 2, characterized in that, The sample user behavior log includes one or more of the following: sample user profile information, feature information of the sample recommended object, and sample context information.
4. The training method as described in claim 1, characterized in that, The location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different types of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in the same type of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different lists of recommendation objects.
5. A method for predicting selection probabilities, characterized in that, include: Obtain user feature information, context information, and a candidate set of recommendation objects for the user to be processed; The user feature information, the context information, and the candidate set of recommendation objects are input into a pre-trained recommendation model to obtain the probability that the user to be processed will select a candidate recommendation object from the candidate set of recommendation objects. The recommendation model is used to predict the probability that the user will select the target recommendation object when the user pays attention to the target recommendation object. The recommendation result of the candidate recommendation object is obtained based on the probability that the user to be processed selects the candidate recommendation object. The model parameters of the recommendation model are obtained by jointly training a location bias model and a recommendation model with sample user behavior logs and sample recommendation object location information as input data and sample labels as target output values. The location bias model is used to predict the probability that the user will pay attention to the target recommendation object when the target recommendation object is in different locations. The sample labels are used to indicate whether the user selects the sample recommendation object. The joint training refers to training the model parameters of the location bias model and the recommendation model based on the difference between the sample labels and the jointly predicted selection probability. The jointly predicted selection probability is obtained based on the output data of the location bias model and the recommendation model.
6. The method as described in claim 5, characterized in that, The joint prediction selection probability is obtained by multiplying the probability that the user pays attention to the target recommended object by the probability that the user selects the target recommended object. The probability that the user pays attention to the target recommended object is obtained based on the location information of the sample recommended object and the location bias model, and the probability that the user selects the target recommended object is obtained based on the sample user behavior and the recommendation model.
7. The method as described in claim 5 or 6, characterized in that, The sample user behavior log includes one or more of the following: sample user profile information, feature information of the sample recommended object, and sample context information.
8. The method as described in claim 5, characterized in that, The location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different types of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in the same type of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different lists of recommendation objects.
9. A training device for a recommendation model, characterized in that, include: The acquisition unit is used to acquire training samples, which include sample user behavior logs, location information of sample recommended objects, and sample tags. The sample tags are used to indicate whether the user selects the sample recommended object. The processing unit is configured to jointly train a location bias model and a recommendation model using the sample user behavior logs and the location information of the sample recommended object as input data, and the sample label as the target output value, to obtain a trained recommendation model. The location bias model is used to predict the probability that a user will notice the target recommended object when it is in different locations. The recommendation model is used to predict the probability that a user will select the target recommended object when it is noticed. The joint training refers to training the model parameters of the location bias model and the recommendation model based on the difference between the actual sample selection probability and the jointly predicted selection probability. The jointly predicted selection probability is obtained based on the output data of the location bias model and the recommendation model.
10. The training device as described in claim 9, characterized in that, The processing unit is also used for: The location information of the sample recommended object is input into the location bias model to obtain the probability that the user pays attention to the target recommended object; The probability of a user selecting the target recommendation object is obtained by inputting the sample user behavior logs into the recommendation model. The joint predicted selection probability is obtained by multiplying the probability that the user pays attention to the target recommended object by the probability that the user selects the target recommended object.
11. The training apparatus as described in claim 9 or 10, characterized in that, The sample user behavior log includes one or more of the following: sample user profile information, feature information of the sample recommended object, and sample context information.
12. The training device as described in claim 9, characterized in that, The location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different types of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in the same type of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different lists of recommendation objects.
13. An apparatus for predicting the probability of choice, characterized in that, include: The acquisition unit is used to acquire user feature information, context information, and a candidate set of recommendation objects for the user to be processed. The processing unit is configured to input the user feature information, the context information, and the candidate set of recommendation objects into a pre-trained recommendation model to obtain the probability that the user to be processed selects a candidate recommendation object from the candidate set. The recommendation model is used to predict the probability that the user selects the target recommendation object when the user pays attention to it. Based on the probability that the user to be processed selects the candidate recommendation object, the recommendation result of the candidate recommendation object is obtained. The model parameters of the recommendation model are obtained by jointly training a location bias model and a recommendation model using sample user behavior logs and sample recommendation object location information as input data and sample labels as the target output value. The location bias model is used to predict the probability that the user pays attention to the target recommendation object when it is in different locations. The sample labels are used to indicate whether the user selects the sample recommendation object. The joint training refers to training the parameters of the location bias model and the recommendation model based on the difference between the sample labels and the jointly predicted selection probability. The jointly predicted selection probability is obtained by multiplying the output data of the location bias model and the recommendation model.
14. The apparatus as claimed in claim 13, characterized in that, The joint prediction selection probability is obtained by multiplying the probability that the user pays attention to the target recommended object by the probability that the user selects the target recommended object. The probability that the user pays attention to the target recommended object is obtained based on the location information of the sample recommended object and the location bias model, and the probability that the user selects the target recommended object is obtained based on the sample user behavior and the recommendation model.
15. The apparatus as claimed in claim 13 or 14, characterized in that, The sample user behavior log includes one or more of the following: sample user profile information, feature information of the sample recommended object, and sample context information.
16. The apparatus as claimed in claim 13, characterized in that, The location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different types of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in the same type of recommendation objects, or the location information of the sample recommendation object refers to the recommendation location information of the sample recommendation object in different lists of recommendation objects.
17. A training device for a recommendation model, characterized in that, It includes at least one processor and a memory, the at least one processor being coupled to the memory for reading and executing instructions in the memory to perform the training method as described in any one of claims 1 to 4.
18. An apparatus for predicting the probability of choice, characterized in that, It includes at least one processor and a memory, the at least one processor being coupled to the memory for reading and executing instructions in the memory to perform the method as described in any one of claims 5 to 8.
19. A computer-readable medium, characterized in that, The computer-readable medium stores program code that, when run on a computer, causes the computer to perform the training method as described in any one of claims 1 to 4.
20. A computer-readable medium, characterized in that, The computer-readable medium stores program code that, when run on a computer, causes the computer to perform the method as described in any one of claims 5 to 8.