Model training method, medium, device and computing equipment for removing position bias
By adding object location features and location influence values to model training, position bias is eliminated, solving the problem of position bias affecting user choices in the recommendation system, achieving more accurate object recommendations, and improving user satisfaction and conversion rate.
Patent Information
- Application Number
- CN202210004719.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-04
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2042-01-04
AI Technical Summary
When recommending objects, existing recommendation systems have position bias that affects user choices, making it difficult to meet user needs and resulting in poor recommendation results.
The object position features are added during the model training process, and the position influence value is obtained from the model to iteratively train the main model to eliminate the position bias and obtain the target main model.
By eliminating position bias, the recommendation system can more accurately recommend objects that users are truly interested in, thereby improving user satisfaction and recommendation conversion rate.
Smart Images

Figure CN114357304B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of information processing technology. More specifically, the embodiments of the present disclosure relate to a model training method, medium, apparatus, and computing device for removing position bias. Background Art
[0002] This section is intended to provide a background or context to the embodiments of the present disclosure that are recited in the claims. No statement herein is admitted to be prior art by virtue of its inclusion in this section.
[0003] With the continuous development of Internet products, recommendation systems have emerged in order to provide users with personalized recommendation services and achieve a personalized experience of "one thousand faces for one thousand people".
[0004] The core of a recommendation system is estimating the conversion probability of recommended items, recommending items that are believed to have a high conversion rate to users. For example, on streaming platforms such as music platforms, film and television drama platforms, and literary reading platforms, if the recommendation system can accurately recommend items that better meet user needs, such as songs, films and television dramas, or literary works, these items will be more efficiently consumed by users, thereby maximizing the benefits of the platform and users while ensuring a better user experience.
[0005] However, factors such as the position of the object in the recommendation page will affect the user's choice, and the current recommendation system usually makes recommendations based on user preferences, which makes it difficult for the objects recommended by the platform to meet user needs. Summary of the Invention
[0006] In this context, embodiments of the present disclosure are intended to provide a model training method, medium, apparatus, and computing device for removing position bias.
[0007] In a first aspect of the embodiments of the present disclosure, a model training method for removing position bias is provided, including: for any one of a click task or a completion task, obtaining a first user feature and an object feature of a sample object in the task, inputting the first user feature and the object feature into a main model, and obtaining a quasi-prediction value corresponding to the task; obtaining an object position feature and a second user feature of the sample object, inputting the object position feature and the second user feature into a first slave model, and obtaining a position influence value, which is used to characterize the influence of the display position of the object on the task; determining a first prediction value corresponding to the task based on the quasi-prediction value and the position influence value; iteratively training the main model and the first slave model based on the first prediction value, the first true label of the sample and the first loss function until the training exit condition is met to obtain a target main model.
[0008] In one embodiment of the present disclosure, the object position feature includes: a first position feature of the object in the first region and a second position feature of the first region in all regions;
[0009] Inputting the object position feature and the second user feature into the first slave model to obtain a position influence value, including: obtaining a first one-hot vector corresponding to the first position feature; finding a first dense vector corresponding to the first one-hot vector based on the first one-hot vector; obtaining a second one-hot vector corresponding to the second position feature; finding a second dense vector corresponding to the second one-hot vector based on the second one-hot vector; obtaining a first slave user vector corresponding to the second user feature; obtaining a third dense vector based on the first slave user vector and a preset dense matrix; inputting the first dense vector, the second dense vector and the third dense vector into the splicing layer of the first slave model for splicing to obtain a first splicing vector; inputting the first splicing vector into the fully connected layer of the first slave model, and obtaining the position influence value through a preset nonlinear function.
[0010] In one embodiment of the present disclosure, when the task is a completed broadcast task, the model training method further includes: inputting the object position feature into the second slave model to obtain a selection probability value, and the selection probability value is used to characterize the probability that the user actively selects the object; determining the second prediction value corresponding to the completed broadcast task based on the first prediction value and the selection probability value; and iteratively training the main model, the first slave model, and the second slave model based on the second prediction value, the second true label of the sample, and the second loss function until the training exit condition is met to obtain the target main model.
[0011] In one embodiment of the present disclosure, the object position feature is input into the second slave model to obtain a selection probability value, including: inputting the first dense vector and the second dense vector into the splicing layer of the second slave model for splicing to obtain a second splicing vector; inputting the second splicing vector into the fully connected layer of the second slave model, and obtaining the selection probability value through a preset nonlinear function.
[0012] In a second aspect of the embodiments of the present disclosure, an object recommendation method is provided, including: obtaining user features of a current user and object features of multiple candidate objects; inputting the user features and object features into a target main model to obtain a score output by the target main model, where the target main model is obtained according to the model training method provided in the first aspect; and recommending candidate objects to the current user based on the score, wherein the score is a click score and / or a completion score.
[0013] In one embodiment of the present disclosure, user features and object features are input into a target main model to obtain a score output by the target main model, including: obtaining a user vector based on the user features, and obtaining an object vector based on the object features; splicing the user vector and the object vector through a splicing layer of the target main model to obtain a third splicing vector; and obtaining a score based on the third splicing vector based on a preset nonlinear function through a fully connected layer of the target main model.
[0014] In one embodiment of the present disclosure, a user vector and an object vector are spliced together through a splicing layer of a target main model to obtain a third splicing vector, including: obtaining a cross vector based on the user vector and the object vector through an attention network of the target main model; and obtaining a score according to the third splicing vector based on a preset nonlinear function through a fully connected layer of the target main model, including: obtaining a score according to the cross vector based on a preset nonlinear function through the fully connected layer of the target main model.
[0015] In one embodiment of the present disclosure, the object recommendation method also includes: the object recommendation method also includes: obtaining a context feature vector corresponding to the context feature of the candidate object; splicing the context feature vector and the cross vector through the splicing layer of the target main model to obtain a fourth splicing vector; through the fully connected layer of the target main model, based on a preset nonlinear function, obtaining a score according to the cross vector, including: through the fully connected layer, based on a preset nonlinear function, obtaining a score according to the fourth splicing vector.
[0016] In one embodiment of the present disclosure, candidate objects are recommended to the current user based on the scores, including: determining the product of the click score and the completion score as the exposure completion score of the candidate object; sorting the candidate objects according to the completion score, screening the candidate objects according to the sorting result and a first preset number, and obtaining a first recommended object among the candidate objects; sorting the first recommended object according to the exposure completion score of the first recommended object, determining the second recommended object in the first recommended object to be displayed in the first area, and the display order of the second recommended object according to the sorting result and the second preset number; sorting the remaining objects in the first recommended object according to the completion score, and determining the display order of the remaining objects in other areas according to the sorting result; and displaying the corresponding recommended objects in the first area and the other areas.
[0017] In a third aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, a model training method for removing position bias as in the first aspect and / or an object recommendation method as in the second aspect are implemented.
[0018] In a fourth aspect of the embodiments of the present disclosure, a model training device for removing position bias is provided, comprising: a first acquisition module, configured to acquire, for either a click task or a completion task, first user features and object features of a sample object in the task, input the first user features and object features into a main model, and obtain a simulated prediction value corresponding to the task;
[0019] The second acquisition module is used to obtain the object position feature and the second user feature of the sample object, and input the object position feature and the second user feature into the first slave model to obtain the position influence value, which is used to characterize the influence of the display position of the object on the task; the determination module is used to determine the first prediction value corresponding to the task based on the proposed prediction value and the position influence value; the first processing module is used to iteratively train the master model and the first slave model according to the first prediction value, the first true label of the sample and the first loss function until the training exit condition is met to obtain the target master model.
[0020] In one embodiment of the present disclosure, the object position feature includes: a first position feature of the object in the first area and a second position feature of the first area in all areas; the second acquisition module is specifically used to: obtain a first one-hot vector corresponding to the first position feature; based on the first one-hot vector, find a first dense vector corresponding to the first one-hot vector; obtain a second one-hot vector corresponding to the second position feature; based on the second one-hot vector, find a second dense vector corresponding to the second one-hot vector; obtain a first slave user vector corresponding to the second user feature; obtain a third dense vector based on the first slave user vector and a preset dense matrix; input the first dense vector, the second dense vector and the third dense vector into the splicing layer of the first slave model for splicing to obtain a first splicing vector; input the first splicing vector into the fully connected layer of the first slave model, and obtain the position influence value through a preset nonlinear function.
[0021] In one embodiment of the present disclosure, when the task is a completed broadcast task, the model training device also includes a second processing module, which is used to input the object position feature into the second slave model to obtain a selection probability value, and the selection probability value is used to characterize the probability that the user actively selects the object; based on the first prediction value and the selection probability value, the second prediction value corresponding to the completed broadcast task is determined; based on the second prediction value, the second true label of the sample and the second loss function, the main model, the first slave model and the second slave model are iteratively trained until the training exit condition is met to obtain the target main model.
[0022] In one embodiment of the present disclosure, the second processing module is specifically used to: input the first dense vector and the second dense vector into the splicing layer of the second slave model for splicing to obtain a second splicing vector; input the second splicing vector into the fully connected layer of the second slave model, and obtain the selection probability value through a preset nonlinear function.
[0023] In a fifth aspect of the embodiments of the present disclosure, an object recommendation device is provided, comprising: an acquisition module for acquiring user features of a current user and object features of multiple candidate objects; a processing module for inputting user features and object features into a target main model to obtain scores output by the target main model, wherein the target main model is obtained according to the model training method provided in the first aspect; and a recommendation module for recommending candidate objects to the current user based on the scores, wherein the scores are click scores and / or completion scores.
[0024] In one embodiment of the present disclosure, the processing module is specifically used to: obtain a user vector based on user features, and obtain an object vector based on object features; splice the user vector and the object vector through the splicing layer of the target main model to obtain a third splicing vector; and obtain a score based on the third splicing vector based on a preset nonlinear function through the fully connected layer of the target main model.
[0025] In one embodiment of the present disclosure, the processing module is specifically used to: obtain a cross vector based on the user vector and the object vector through the attention network of the target main model; the processing module is specifically used to: obtain a score according to the cross vector based on a preset nonlinear function through the fully connected layer of the target main model.
[0026] In one embodiment of the present disclosure, the acquisition module is further configured to: obtain a context feature vector corresponding to the context feature of the candidate object; concatenate the context feature vector and the cross vector using a concatenation layer of the target main model to obtain a fourth concatenation vector; and the processing module is specifically configured to: obtain a score based on the fourth concatenation vector using a fully connected layer and a preset nonlinear function. The processing module is further configured to: input the fourth concatenation vector into the fully connected layer and obtain a score based on the preset nonlinear function.
[0027] In one embodiment of the present disclosure, the recommendation module is specifically used to: determine the product of the click score and the completion score as the exposure completion score of the candidate object; sort the candidate objects according to the completion score, and screen the candidate objects according to the sorting result and a first preset number to obtain a first recommended object among the candidate objects; sort the first recommended object according to the exposure completion score of the first recommended object, and determine the second recommended object in the first recommended object displayed in the first area, as well as the display order of the second recommended object, according to the sorting result and the second preset number; sort the remaining objects in the first recommended object according to the completion score, and determine the display order of the remaining objects in other areas according to the sorting result; and display the corresponding recommended objects in the first area and other areas.
[0028] In a sixth aspect of an embodiment of the present disclosure, a computing device is provided, comprising: at least one processor and a memory; the memory stores computer-executable instructions; at least one processor stores computer-executable instructions in at least one memory, so that at least one processor executes the model training method for removing position bias as in the first aspect, and / or the object recommendation method as in the second aspect.
[0029] The embodiments of the present disclosure provide a model training method, medium, apparatus and computing device for removing position bias. For any of the tasks in the click task or the completion task, the first user feature and object feature of the sample object in the task are obtained, and the first user feature and object feature are input into the main model to obtain a pseudo-prediction value corresponding to the task; the object position feature and the second user feature of the sample object are obtained, and the object position feature and the second user feature are input into the first slave model to obtain a position influence value; the first prediction value corresponding to the task is determined according to the pseudo-prediction value and the position influence value; the main model and the first slave model are iteratively trained according to the first prediction value, the first true label of the sample and the first loss function until the training exit condition is met to obtain the target main model. In the embodiments of the present disclosure, during the training process of the model, the object position feature of the sample object is added, and the model is iteratively trained using the obtained position influence value, so that the trained main model can remove the position bias, so that when the main model is used to recommend objects, the influence of the object's location on the recommendation result can be eliminated, and the objects that potential users are really interested in can be obtained, thereby improving user satisfaction and further improving the recommendation conversion rate of the platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The above and other objects, features and advantages of the exemplary embodiments of the present disclosure will become readily understood by reading the detailed description below with reference to the accompanying drawings, in which several embodiments of the present disclosure are shown by way of example and not limitation, wherein:
[0031] Figure 1 An example diagram of an application scenario provided for an embodiment of the present disclosure;
[0032] Figure 2 Schematic diagram of the process of the model training method provided in the embodiment of the present disclosure Figure 1 ;
[0033] Figure 3 Schematic diagram of the principle of the model training method provided in the embodiment of the present disclosure Figure 1 ;
[0034] Figure 4 An example diagram of a recommendation page provided in an embodiment of the present disclosure;
[0035] Figure 5 Schematic diagram of the principle of the model training method provided in the embodiment of the present disclosure Figure 2 ;
[0036] Figure 6 A flowchart of an object recommendation method provided in an embodiment of the present disclosure;
[0037] Figure 7 A schematic diagram of the structure of a storage medium provided in an embodiment of the present disclosure;
[0038] Figure 8 A schematic diagram of the structure of a model training device provided in an embodiment of the present disclosure;
[0039] Figure 9 A schematic diagram of the structure of an object recommendation device provided by an embodiment of the present disclosure;
[0040] Figure 10 A schematic diagram of the structure of a computing device provided in an embodiment of the present disclosure.
[0041] In the drawings, the same or corresponding reference numerals denote the same or corresponding parts. DETAILED DESCRIPTION
[0042] The principles and spirit of the present disclosure will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided solely to enable those skilled in the art to better understand and implement the present disclosure, and are not intended to limit the scope of the present disclosure in any way. Rather, these embodiments are provided to make the present disclosure more thorough and complete, and to fully convey the scope of the present disclosure to those skilled in the art.
[0043] Those skilled in the art will appreciate that the embodiments of the present disclosure may be implemented as a system, apparatus, device, method, or computer program product. Therefore, the present disclosure may be implemented in the following forms: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software. Furthermore, the data involved in the present disclosure may be authorized by the user or fully authorized by all parties.
[0044] According to an embodiment of the present disclosure, a model training method, medium, apparatus, and computing device for removing position bias are proposed.
[0045] In this document, the number of elements in any of the accompanying drawings is for illustrative purposes only and is not intended to be limiting, and any nomenclature is for distinction only and does not have any limiting meaning. The principles and spirit of the present disclosure will be explained in detail below with reference to several representative embodiments of the present disclosure. The collection, storage, use, processing, transmission, provision, and disclosure of user data and other information involved in the technical solutions of the present disclosure are all authorized by the user or fully authorized by all parties, and are in compliance with relevant laws and regulations and do not violate public order and good morals. SUMMARY OF THE INVENTION
[0047] The inventors have found that in some user-driven streaming media platforms, recommending related objects is a very common and important function. The recommendation module is usually located on the platform homepage and usually has multiple recommendation pages. The recommended objects on the homepage determine whether the user consumes the module. If the recommended objects on the homepage can attract users to click, there will be subsequent consumption of more objects. At the same time, it can also deepen the user's perception of the scene, thereby enhancing the user's willingness to click on the homepage and improving the recommendation conversion rate in the long run.
[0048] In addition, users are very sensitive to the position of the recommended object in the recommendation page. The closer the position is, the greater the advantage it has. Therefore, how to eliminate the impact of position on user perception is also one of the problems to be solved.
[0049] In view of this, the embodiments of the present disclosure provide a model training method, medium, apparatus and computing device for removing position bias. During the model training process, the object position features of the sample objects are added, and the model is iteratively trained using the obtained position influence values, so that the trained main model can remove the position bias. Therefore, when recommending objects through the main model, the influence of the object's location on the recommendation results can be eliminated, and objects that potential users are truly interested in can be obtained, thereby improving user satisfaction and further improving the recommendation conversion rate.
[0050] It should be noted that the embodiments of the present disclosure do not specifically limit the recommendation scenarios. After introducing the basic principles of the present disclosure, various non-limiting implementation methods of the present disclosure are specifically introduced below.
[0051] Application Scenario Overview
[0052] First reference Figure 1 , Figure 1 This is an example diagram of an application scenario provided by the embodiment of the present disclosure. Figure 1 As shown, the devices involved in this application scenario include: a terminal device 101 and a server 102.
[0053] Among them, the server 102 communicates with the terminal device 101 through the network. When the user enters the streaming platform through the terminal device 101, the server 102 will obtain the user characteristics of the current user and the object characteristics of the candidate objects corresponding to the current user, and obtain the score corresponding to each candidate object based on the user characteristics and object characteristics, thereby recommending candidate objects to the user based on the score.
[0054] Furthermore, the server 102 may send the result to the terminal device 101, so that the recommended objects are displayed on the recommendation page of the terminal device 101. Different streaming media platforms correspond to different recommended objects. Streaming media platforms include but are not limited to the following types: film and television drama platforms, music platforms, and reading platforms; accordingly, recommended objects include but are not limited to the following types: film and television dramas, songs, and literary works (e.g., novels).
[0055] It should be understood that the recommended number of objects, display method, etc. in the embodiments of the present disclosure depend on the display parameters of the current platform, and the embodiments of the present disclosure do not make specific limitations.
[0056] It should be noted that the terminal device 101 can be a personal digital assistant (PDA) device, a handheld device with wireless communication function (such as a smart phone, a tablet computer), a computing device (such as a personal computer (PC)), a vehicle-mounted device, a wearable device (such as a smart watch, a smart bracelet), a smart home device (such as a smart display device), etc. The terminal device 101 in the embodiment of the present disclosure is illustrated by a mobile phone as an example, but is not limited to this.
[0057] The server 102 may be a single server, a server cluster, a distributed server, a centralized server, or a cloud server, etc., which is not limited in the embodiments of the present disclosure.
[0058] Exemplary Methods
[0059] The following combination Figure 1 For application scenarios, refer to Figures 2 to 6 To describe the model training method and object recommendation method for removing position bias according to an exemplary embodiment of the present disclosure. It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principles of the present disclosure, and the embodiments of the present disclosure are not limited in this respect. On the contrary, the embodiments of the present disclosure can be applied to any applicable scenario. Among them, the execution device to which the embodiments of the present disclosure are applicable is a computing device, such as the above-mentioned server.
[0060] Figure 2 Schematic diagram of the process of the model training method provided in the embodiment of the present disclosure Figure 1 .like Figure 2 As shown, the model training method provided by the embodiment of the present disclosure may include the following steps:
[0061] S201. For any one of the click task and the completion task, obtain the first user feature and the object feature of the sample object in the task, input the first user feature and the object feature into the main model, and obtain the simulated prediction value corresponding to the task.
[0062] In some embodiments, since the distribution of samples of different tasks varies greatly, joint training cannot be performed. Therefore, different sample objects can be obtained from the user's behavior log for different training tasks.
[0063] On the one hand, for completion tasks, the prerequisite for an object to be completed is that it has been played (for literary works such as novels, completion means that the literary work has been viewed in its entirety by the user). Therefore, the sample objects corresponding to completion tasks are the objects in the user's playback log. The label of each sample object can be determined based on whether the object has been played in its entirety. Specifically, objects that have been played in their entirety in the playback log are marked as positive samples, while objects that have not been played in their entirety in the playback log are marked as negative samples.
[0064] On the other hand, for click tasks, whether an object is clicked depends on whether it has been exposed to the user on the recommendation page. Therefore, the sample objects corresponding to click tasks are the objects in the user's exposure log. Specifically, if an object in the exposure log has been clicked by the user, it is marked as a positive sample; if it has not been clicked by the user, it is marked as a negative sample.
[0065] The inventors found that for sample objects in the click task, the intention of the user clicking the first object on the first recommended page in the exposure log is often unclear. It may be a click due to the user's preference for the object, or it may be a click due to the user's preference for the recommended page. Therefore, as an optional embodiment, such objects in the exposure log can be discarded, thereby further improving the accuracy of the model.
[0066] Taking a song as an example, the first user feature of the sample object is the feature of the user who plays or exposes the sample object, wherein the first user feature includes at least one of the following: user profile features (e.g., user gender, age, city, user level, etc.), user device features (e.g., device manufacturer, device model, etc.), user song preference features (e.g., genre preference, language preference, song release year preference, artist preference, etc.);
[0067] Accordingly, the object features of the sample objects include at least one of the following: song profile features (e.g., song genre, language, artist, composer, lyricist, arranger, instrument, etc.), song popularity features (e.g., number of song comments, number of hearts, number of shares, number of downloads, etc.), and song behavior features (e.g., completion rate and heart rate within a preset time period). "Heart" refers to the mark placed by users on an object based on their level of liking for it.
[0068] It should be understood that other types of objects, such as film and television works, literary works, etc., have similar characteristics to songs and will not be described in detail here.
[0069] In this step, after obtaining the first user features and object features corresponding to each task, the first user features and object features are input into the main model, and the quasi-prediction value corresponding to the task is obtained through the main model.
[0070] In some embodiments, the above step S201 specifically includes the following steps:
[0071] (1) Obtaining a user vector based on the first user feature;
[0072] (2) Obtaining object vectors based on object features;
[0073] Specifically, the user vector is a dense vector corresponding to the first user feature, and the object vector is a dense vector corresponding to the object feature. The embodiment of the present disclosure does not limit the specific method of obtaining the dense vector. For example, the dense vector can be obtained by searching a dense dictionary.
[0074] In some embodiments, the dense vector corresponding to each feature can be obtained through the feature processing layer in the main model. Specifically, Figure 3 Schematic diagram of the principle of the model training method provided in the embodiment of the present disclosure Figure 1 .like Figure 3 As shown, the main model includes a feature processing layer, which is used to obtain an object vector corresponding to the object feature and a user vector corresponding to the first user feature.
[0075] Please continue to refer to Figure 3 , the main model also includes concatenation layers and fully connected layers. It should be understood that Figure 3 The number of fully connected layers in the example is two, but this is not limiting. For example, the number of fully connected layers can also be 3, 4, etc.
[0076] (3) Concatenate the user vector and the object vector to obtain a concatenated vector.
[0077] (4) Through the fully connected layer of the main model, based on the preset nonlinear function, the quasi-prediction value is obtained according to the splicing vector.
[0078] In the embodiment of the present disclosure, the user vector and the object vector are first input into the splicing layer to obtain a splicing vector, and then the splicing vector is continuously input into two fully connected layers. The splicing vector is processed by using the preset nonlinear function corresponding to the fully connected layer as the activation function, so as to output the quasi-prediction value through the fully connected layer.
[0079] In an optional implementation, the preset nonlinear function may be a PReLu function, which is used to map the input of the main model neuron to the output end, wherein the expression of the PReLu function is as follows:
[0080]
[0081] Among them, i is used to indicate the i-th layer of the fully connected layer, x i is the weighted summation result of the i-th layer of the fully connected layer, a i is the parameter corresponding to the i-th layer, PReLu(x i ) represents the preset nonlinear function of the i-th layer, and the quasi-predicted value is output through sigmoid in the last layer of the fully connected layer.
[0082] It should be noted that the preset nonlinear function of the middle layer of the fully connected layer can also be an activation function of the type of tanh function, and the specific type is not limited in the embodiment of the present application. In addition, the number of layers of the middle layer of the fully connected layer can be other numbers, for example, three layers, four layers, etc., and the embodiment of the present disclosure does not limit this. In some optional embodiments, such as Figure 3 As shown, the main model may also include an attention network. In this embodiment, the above step (3) is specifically as follows: inputting the user vector and the object vector into the attention network of the main model to obtain a cross vector.
[0083] The attention network can be a multi-head attention network, through which user features and object features can be effectively crossed, thereby better expressing the performance of the object in different user groups. Accordingly, the above step (4) is specifically as follows: the cross vector is input into the fully connected layer, and the quasi-predicted value is obtained through a preset nonlinear function.
[0084] In some embodiments, different quasi-predicted values are used for different tasks. For example, for a completion task, the quasi-predicted value indicates the completion probability of each sample object (i.e., the probability that the object is fully played) when the position effect is not eliminated. Correspondingly, for a click task, the quasi-predicted value indicates the click probability of each sample object (i.e., the probability that the object will be clicked by the user when it is exposed) when the position effect is not eliminated.
[0085] S202: Obtain an object position feature and a second user feature of a sample object, input the object position feature and the second user feature into a first slave model, and obtain a position influence value.
[0086] The second user feature is the user's basic attribute feature, including but not limited to: device model, user gender, user age, etc. In this step, an independent first slave model is used to construct a position influence bias to obtain the position influence value of the sample object. It should be understood that the object position feature is used to indicate the position feature of the sample object on the recommendation page, and the position influence value is used to represent the influence of the object's display position on the task.
[0087] In some embodiments, for different recommendation scenarios, the object position features are different. On the one hand, for a recommendation scenario with only one recommendation area, the object position features include: the first position features of the sample object in the recommendation area. On the other hand, for a recommendation scenario with multiple recommendation areas, the object position features include: the first position features of the object in the first area and the second position features of the first area in all areas. For example, please refer to Figure 4 , Figure 4 This is an example diagram of a recommendation page provided by an embodiment of the present disclosure. Figure 4 As shown, the recommendation page includes at least one recommendation area. Different recommendation areas recommend different objects to users. Users can switch to different recommendation areas by sliding left / right / up / down, etc., so that the recommended objects in the recommendation area are displayed to users.
[0088] For the same area, multiple recommended objects are displayed in the area, and the positions of different recommended objects are different. The first position feature is the position feature of the sample object in the recommended area.
[0089] For different areas, for example, the first area and the second area, the recommended objects in the first area are first displayed to the user, and the user can display the second area only after certain operations. Therefore, the position biases corresponding to the sample objects in the first area and the second area are different. The second position feature is the position feature of the first area where the sample object is located in all areas.
[0090] Next, the above step S202 is described in detail by taking the example that the object position feature includes the first position feature and the second position feature. Specifically, step S202 includes the following steps:
[0091] (1) Obtain the first one-hot vector corresponding to the first position feature.
[0092] (2) According to the first one-hot vector, find the first dense vector corresponding to the first one-hot vector.
[0093] (3) Obtain the second one-hot vector corresponding to the second position feature.
[0094] (4) According to the second one-hot vector, find the second dense vector corresponding to the second one-hot vector.
[0095] Specifically, different one-hot vectors correspond to different dense vectors. In this step, the dense vectors corresponding to the first one-hot vector and the second one-hot vector can be determined respectively through a dense dictionary. As for the determination method, the embodiment of the present disclosure does not make any specific limitation.
[0096] (5) Obtaining a slave user vector corresponding to the second user feature;
[0097] The slave user vector is a one-hot vector of the second user feature, wherein the second user feature includes but is not limited to basic features such as device model, user gender, and user age.
[0098] (6) Obtaining a third dense vector based on the user vector and the preset dense matrix;
[0099] Specifically, the user vector is multiplied by a preset dense matrix to obtain a third dense vector. It should be understood that the embodiment of the present disclosure does not specifically limit the preset dense matrix.
[0100] (7) The first dense vector, the second dense vector, and the third dense vector are input into the splicing layer of the first slave model for splicing to obtain a first splicing vector.
[0101] (8) The first concatenated vector is input into the fully connected layer of the first slave model, and the position influence value is obtained through a preset nonlinear function.
[0102] Please continue to refer to Figure 3 ,like Figure 3 As shown, the first slave model includes a concatenation layer and a fully connected layer. It should be noted that Figure 3 The fully connected layers in FIG are shown as two as an example, but are not limited thereto.
[0103] In the embodiment of the present disclosure, the obtained first dense vector, second dense vector and third dense vector are first input into the splicing layer, the first splicing vector is obtained through the splicing layer, and then the first splicing vector is continuously input into two fully connected layers, and the position influence value is obtained by using a preset nonlinear function as an activation function between the fully connected layers.
[0104] In an optional implementation, the preset nonlinear function may be a PReLu function.
[0105] S203: Determine a first predicted value corresponding to the task according to the proposed predicted value and the position influence value.
[0106] In some embodiments, first, a sum of a proposed prediction value and a position influence value is determined;
[0107] Furthermore, the sum of the proposed predicted value and the position influence value is processed by the sigmoid function to obtain a first predicted value. The first predicted value can be controlled between 0 and 1 through the processing of the sigmoid function.
[0108] The calculation formula of the sigmoid function is as follows:
[0109]
[0110] Where x is the sum of the proposed predicted value and the location influence value.
[0111] S204. Iteratively train the master model and the first slave model according to the first predicted value, the first true label of the sample, and the first loss function until a training exit condition is met to obtain a target master model.
[0112] It should be noted that in the embodiment of the present disclosure, there is no specific limitation on the function type of the first loss function. For example, the first loss function may be a cross entropy loss function.
[0113] Furthermore, based on the back-propagation algorithm, the gradient is calculated according to the loss function value, so that the model parameters of the model are updated during iterative training until the model converges, which means that the training exit conditions are currently met. The training is then terminated, and the main model corresponding to the current training process is determined to be the target main model.
[0114] In the embodiment of the present disclosure, a position influence bias is constructed through the first slave model to obtain the position influence value corresponding to the sample object, and during the training process, the main model is trained based on the position influence value obtained from the first slave model, so that the influence of the position bias on the recommendation results can be eliminated in the trained target main model, so that the target main model can obtain objects that potential users are really interested in, thereby recommending more reasonable objects to users, improving user satisfaction, and further improving the recommendation conversion rate of the recommendation platform.
[0115] In one embodiment, the model training method provided in the embodiment of the present disclosure may specifically include the following steps:
[0116] S501. For any one of the click task and the completion task, obtain the first user feature and the object feature of the sample object in the task, input the first user feature and the object feature into the main model, and obtain the simulated prediction value corresponding to the task.
[0117] S502: Obtain an object position feature and a second user feature of a sample object, input the object position feature and the second user feature into a first slave model, and obtain a position influence value.
[0118] Among them, the position influence value is used to represent the influence of the object's display position on the task.
[0119] S503: Determine a first predicted value corresponding to the task according to the proposed predicted value and the position influence value.
[0120] It should be understood that the principles and effects of steps S501 to S503 are similar to those of Figure 2 Steps S201 to S203 in the illustrated embodiment are similar and will not be described again here.
[0121] S504: Iteratively train the master model and the first slave model according to the first predicted value, the first true label of the sample, and the first loss function until a training exit condition is met to obtain a target master model.
[0122] In the embodiment of the present disclosure, according to the first prediction, the first true label of the sample object and the first loss function, Figure 3 The master model and the first slave model in the illustrated embodiment are trained iteratively.
[0123] On the one hand, for the click task, the loss function value CLR LOSS corresponding to each training in the click task is obtained by the following formula (1):
[0124]
[0125] Among them, N is the number of sample objects in the current round of training, y CLR_i is the click label of the sample object, p CLR_i is the first predicted value corresponding to the click task.
[0126] On the other hand, for the completed broadcast task, the loss function value EDR LOSS corresponding to each training in the completed broadcast task can be obtained by the following formula (2):
[0127]
[0128] Among them, N is the number of sample objects in the current round of training, y EDR_i is the completed label of the sample object, p EDR_i It is the first prediction value corresponding to the completed broadcast task.
[0129] Furthermore, for any of the click tasks and the completion tasks, the gradient is calculated based on the loss function value based on the back propagation algorithm, so that the model parameters of the main model and the first slave model are updated during the iterative training until the model converges, which means that the training exit conditions are currently met. The training is then terminated, and the main model corresponding to the current training process is determined to be the target main model.
[0130] The inventors have discovered that the sample objects (i.e., playback samples) corresponding to the completed broadcast task include the following two situations:
[0131] Case 1: Sample objects that are actively selected and played by the user;
[0132] Case 2: The user does not actively select a sample object, and the sample object is played through automatic playback or sequential playback. For example, in sequential playback mode, after the previous object is played, the subsequent objects are gradually consumed.
[0133] For the sample object in situation one, the user's behavioral feedback is the most authentic, which can fully express that the user actively chooses to play the object, and the object displayed at the front is more likely to be actively selected by the user. In view of this, in the embodiment of the present disclosure, for the completion task, the main model can be further trained based on the user's selection of the sample object, so as to further eliminate the influence of position bias on the recommendation results.
[0134] In an optional embodiment, for the completed broadcast task, after executing the above steps S501 to S503, the training process of the following steps S505 to S507 can be directly executed to obtain the target main model corresponding to the completed broadcast task; in another optional embodiment, for the completed broadcast task, after executing the above steps S501 to S504, the training process of the following steps S505 to S507 can be executed for the target main model obtained in step S504 to obtain the target main model corresponding to the completed broadcast task.
[0135] S505: Input the object position feature into the second slave model to obtain a selection probability value.
[0136] The selection probability value is used to represent the probability of the user actively selecting an object.
[0137] Figure 5 Schematic diagram of the principle of the model training method provided in the embodiment of the present disclosure Figure 2 .like Figure 5 As shown, for the completed broadcast task, the above step S505 specifically includes the following steps:
[0138] (1) Inputting the first dense vector corresponding to the first position feature and the second dense vector corresponding to the second position feature into the splicing layer of the second slave model for splicing to obtain a second splicing vector.
[0139] (2) Obtaining a selection probability value according to the second concatenated vector through the fully connected layer of the second slave model based on a preset nonlinear function.
[0140] It should be noted that the scheme and principle of the above steps (1) and (2) are the same as Figure 3 The first slave model in the illustrated embodiment is similar and will not be described again here.
[0141] S506: Determine a second prediction value corresponding to the completed broadcast task according to the first prediction value and the selection probability value.
[0142] In an optional implementation, the second prediction value corresponding to the completed broadcast task is the product of the first prediction value and the selection probability value.
[0143] S507. According to the second predicted value, the second true label of the sample and the second loss function, the master model, the first slave model and the second slave model are iteratively trained until the training exit condition is met to obtain the target master model.
[0144] Specifically, the loss function value EDRLOSS corresponding to each training in the completed broadcast task can be obtained by the following formula (3):
[0145]
[0146] Among them, N is the number of sample objects in the current round of training, y EDR_i is the completed label of the sample object, p EDR_i It is the second prediction value corresponding to the completed broadcast task.
[0147] Furthermore, based on the back-propagation algorithm, the gradient is calculated according to the loss function value, so that the model parameters of the master model, the first slave model and the second slave model are updated in the iterative training until the model converges, which means that the training exit condition is currently met. Then the training is terminated, and the master model corresponding to the current training process is determined to be the target master model.
[0148] It should be noted that, during the training process of the above-mentioned completion task and click task provided by the embodiment of the present disclosure, batch processing can be used for training. The embodiment of the present disclosure does not specifically limit the size of the batch data N, for example, it is 1024.
[0149] In an optional embodiment, any one of the click task and the completion task can be trained separately according to the above scheme. For example, any one of the click task or the completion task can be trained separately through steps S501 to S504, or the completion task can be trained separately through steps S501 to S507. By training different tasks separately, the flexibility of the target main model can be improved, so that the target main model can be applied to a variety of scenarios, for example, recommendation scenarios that pay more attention to user clicks, recommendation scenarios that pay more attention to object completions, etc.
[0150] In addition, the above steps can also be used to synchronously train the click task and the completion task, so as to eliminate the influence of position bias on the recommendation results while allowing the model to take into account the click situation and completion situation of the object, thereby making more reasonable recommendations to users.
[0151] Optionally, an alternating training method can be used to perform synchronous training for the click task and the completion task. Specifically, taking the click task as an example in the first round of iterative training, first obtain the first prediction value corresponding to the click task through steps S501 to S503, and then use the solution of S504 to perform the first round of training on the master model and the first slave model, so as to obtain the loss function value CLR LOSS of the first round according to the above formula (1). If CLR LOSS does not converge, the parameters of the current master model and the first slave model are adjusted to obtain the adjusted master model and the first slave model.
[0152] Furthermore, the processing result corresponding to the completed broadcast task is obtained through steps S501 to S503 (or S501 to S504), and then the scheme of S505 to S507 is used to perform a second round of training on the master model and the first slave model after the first round of adjustment, so as to obtain the loss function value EDR LOSS of the current round according to the above formula (3). If the loss function value EDR LOSS does not converge, the parameters of the current master model, the first slave model, and the second slave model are adjusted to obtain the adjusted master model, the first slave model, and the second slave model.
[0153] Accordingly, the click task and the completion task are trained alternately in the above manner until both the loss function value EDR LOSS and the loss function value CLR LOSS meet the training exit conditions, then the training is stopped, and the main model corresponding to the current training round is determined as the target main model.
[0154] Optionally, if the loss function value of one task has met the training exit condition, but the loss function value of another task has not yet met the training exit condition, then in subsequent training tasks, only the task that does not meet the training exit condition is trained until the task does not meet the training exit condition, and then the final target main model is output.
[0155] In the disclosed embodiment, on the one hand, the main model corresponding to the click task and the completion task can be the same main model, that is, the above training process is to alternately train the same main model through the click task and the completion task. Through this embodiment, the target main model obtained by training can take into account the click situation of the object and the completion situation of the object, while eliminating the influence of position bias on the recommendation results, improving the accuracy of the recommendation results, and training the same main model can improve training efficiency.
[0156] On the other hand, the main models corresponding to the click task and the completion task can be different main models. That is, the training architecture includes two different main models. During the training process, different main models are trained based on the click task and the completion task respectively, and the target main model focusing on the object click situation and the target main model focusing on the object completion situation are obtained respectively. In this embodiment, the structures of the two main models are the same. For the specific structure, please refer to Figure 3 or Figure 5 The master model shown is not described here. Through this solution, the target master model corresponding to each task can also eliminate the influence of position bias on the recommendation results. Moreover, by using different master models for training two tasks, the influence between different training tasks can be eliminated, making the obtained target master model more accurate.
[0157] On this basis, as an optional implementation method, the main model corresponding to the click task and the main model corresponding to the completion task can share the feature processing layer.
[0158] The inventors also discovered that the same user may have different preferences for objects in different locations, based on different recommendation topics or at different recommendation times. This means that factors such as the recommendation topic and recommendation time can also influence the user's choice of object. In light of this, as an optional embodiment, the model training process corresponding to the click task and / or the completion task in the disclosed embodiment further includes the following steps:
[0159] (1) Obtaining the context feature vector corresponding to the context feature of the sample object;
[0160] The context features include: the recommended topic features and the recommended time features corresponding to the sample object. Correspondingly, the context feature vector is a one-hot vector corresponding to the recommended topic features and the recommended time features.
[0161] When necessary, the context feature vector corresponding to the context feature can be obtained through the feature processing layer.
[0162] (2) The context feature vector and the cross vector are concatenated through the concatenation layer of the main model to obtain the target concatenation vector;
[0163] (3) Through the fully connected layer of the main model, based on the preset nonlinear function, the quasi-prediction value is obtained according to the target splicing vector.
[0164] In the embodiment of the present disclosure, by adding contextual information such as recommendation topics and recommendation time to train the main model, the trained target main model can eliminate the influence of recommendation topics and recommendation time on the recommendation results, and further improve the accuracy of the target main model.
[0165] Figure 6This is a flow chart of the object recommendation method provided by the embodiment of the present disclosure. Figure 6 As shown, the object recommendation method specifically includes the following steps:
[0166] S601: Acquire user features of a current user and object features of multiple candidate objects.
[0167] Among them, the current user is the user who logs in to the streaming platform through a terminal device, and the user characteristics include one or more of the following: user portrait characteristics (for example, gender, age, city, user level, etc.), user device characteristics (for example, device manufacturer, device model, etc.), user preference characteristics (taking songs as an example, such as style preference, language preference, song release year preference, artist preference, etc.).
[0168] In the embodiments of the present disclosure, there is no specific limitation on the method for determining candidate objects. For example, on the one hand, candidate objects can be determined based on the current user's behavior log. For example, the current user's play log or click record in a preset time period (for example, 1 week, 15 days, one month, etc.) can be obtained, and a preset number of objects in the click log or play log can be determined as candidate objects. On the other hand, candidate objects can also be determined based on the current recommendation theme. Taking songs as an example, a preset number of objects can be obtained from the music library based on the current recommendation theme as candidate objects, where the recommendation theme is, for example, "Chinese / European / Japanese and Korean songs", "Children's songs", "Classic songs", etc., which are not shown one by one here. In other aspects, a preset number of candidate objects can also be determined based on the user characteristics of the current user (for example, user age, gender, etc.).
[0169] It should be noted that the preset number of candidate objects is greater than the total number of recommended objects. The specific value of the preset number is not limited in the embodiment of the present disclosure. For example, the preset number may be 200.
[0170] In this step, after obtaining the candidate objects, the object features of each candidate object are obtained. Taking the candidate object as a song as an example, the object features include but are not limited to at least one of the following: song portrait features (for example, the song's style, language, artist, composer, lyricist, arranger, musical instrument, etc.), song popularity features (for example, the number of song comments, the number of red hearts, the number of shares, the number of downloads, etc.), song behavior features (for example, the completion rate and red heart rate in a preset time period, etc.).
[0171] S602: Input the user features and the object features into the target main model to obtain the score output by the main model.
[0172] Among them, the target main model is based on Figures 2 to 5 The model training method provided in the illustrated embodiment is used for the purpose of obtaining the model. As for the model training method, it will not be described in detail here.
[0173] It should be noted that the score is a click score and / or a completion score. If the target main model is a model obtained by training only based on the click task, the score is the click score; correspondingly, if the target main model is a model obtained by training only based on the completion task, the score is the completion score; in addition, if the target main model is a model obtained by alternating training based on the completion task and the click task, the output score includes the click score and the completion score.
[0174] S603: Recommend candidate objects to the current user based on the scores.
[0175] Correspondingly, based on the different types of scores, there are also the following ways to recommend objects:
[0176] Method 1: If the score is either the completion score or the click score of each candidate, the candidate is directly recommended to the user according to the ranking of the scores;
[0177] Method 2: If the score includes the click score and completion score of each candidate object, the comprehensive score of each candidate object is obtained based on the click score and completion score, and then the candidate objects are recommended to the user in order of the comprehensive score.
[0178] It should be noted that when recommending candidate objects to the current user, specifically: Figure 4 In the recommendation area of the recommendation page shown, the object identification of the recommended candidate object is displayed. Taking the object as a song as an example, the object identification includes but is not limited to at least one of the following: song name, singer, album, etc. As for the display method, it will be shown in subsequent embodiments.
[0179] In the disclosed embodiment, since the target main model eliminates the influence of location on sample objects during the training process, the score output by the target main model can more accurately reflect user preferences, and the recommendations based on the score are more reasonable, which can improve user satisfaction while improving the platform's conversion rate.
[0180] In some embodiments, the object recommendation method provided by the embodiments of the present application specifically includes the following steps:
[0181] S701: Acquire user features of a current user and object features of multiple candidate objects.
[0182] It should be noted that steps S701 and Figure 6 Step S601 in the illustrated embodiment is similar and will not be described again here.
[0183] S702: Input the user features and the object features into the target main model, and obtain the user vector according to the user features and the object vector according to the object features through the feature processing layer of the target main model.
[0184] Among them, the target main model is based on Figures 2 to 5 The embodiment shown is obtained through iterative training. The user vector is a dense vector corresponding to the user feature, and the object vector is a dense vector corresponding to the object feature. After iterative training of the target main model, the feature processing layer of the target main model can obtain accurate user vectors and object vectors, thereby improving the rationality of the recommendation results and enhancing the user experience.
[0185] S703 : Splice the user vector and the object vector through the splicing layer of the target main model to obtain a third splicing vector.
[0186] S704 : Obtain a score according to the third concatenated vector based on a preset nonlinear function through a fully connected layer of the target main model.
[0187] In an optional embodiment, when the target main model includes an attention network, a cross vector can be obtained based on the user vector and the object vector through the attention network of the target main model. Furthermore, a score is obtained based on the cross vector using a preset nonlinear function through the fully connected layer of the target main model.
[0188] On this basis, in another optional embodiment, after obtaining the cross vector, the context feature vector corresponding to the context feature of the candidate object can be obtained, and the context feature vector and the cross vector can be spliced through the splicing layer of the target main model to obtain a fourth splicing vector. Finally, the score is obtained according to the fourth splicing vector based on the fully connected layer of the target main model based on a preset nonlinear function.
[0189] S705: Recommend candidate objects to the current user based on the scores.
[0190] Wherein, the score is a click score and / or a completion score. It should be understood that if the score is either the completion score or the click score of each candidate object, the candidate objects are recommended to the user according to the ranking of the scores, specifically, the following steps are included:
[0191] (1) Based on the click score or completion score corresponding to each candidate object, the candidate objects are sorted from high to low according to the score to obtain a sorting result;
[0192] (2) According to the total number of recommendations, the candidate with the highest ranking in the ranking result is determined as the first recommended candidate;
[0193] (3) Determine the recommended objects to be displayed in each area based on the number of objects that can be displayed in each area and the score ranking result of the first recommended object, and display the corresponding recommended objects in the corresponding area.
[0194] Taking the example of a total of 12 recommendations and each area being able to display 3 objects, in this solution, the 12 candidate objects with the highest scores are determined from the candidate objects as the first recommended objects, and the candidate objects ranked 1 to 3 in the first recommended objects are determined as the recommended objects to be displayed in the first area, the candidate objects ranked 4 to 6 in the first recommended objects are determined as the recommended objects to be displayed in the second area, the candidate objects ranked 7 to 9 in the first recommended objects are determined as the recommended objects to be displayed in the third area, and the candidate objects ranked 10 to 12 in the first recommended objects are determined as the recommended objects to be displayed in the fourth area.
[0195] Accordingly, if the score includes a click score and a completion score, a recommendation may be made based on the following steps S7051 to S7055:
[0196] S7051. Determine the product of the click score and the completion score as the exposure completion score of the candidate object.
[0197] S7052: Sort the candidate objects according to the completion scores, and screen the candidate objects according to the sorting result and a first preset number to obtain a first recommended object among the candidate objects.
[0198] Specifically, taking the total number of recommendations as 12 as an example, the 12 candidate objects with the highest completion scores are determined from the candidate objects as the first recommended objects.
[0199] S7053. Sort the first recommended objects according to their exposure completion scores, and determine the second recommended objects to be displayed in the first area and the display order of the second recommended objects based on the sorting result and a second preset number.
[0200] The second preset number is the number of objects that can be displayed in each area, and the first area is the first area displayed to the user among all areas. Taking the second preset number of 3 as an example, in this step, the 12 first recommended objects are sorted from high to low based on their exposure completion scores. Based on the sorting results, the three second recommended objects with the highest exposure completion scores among the first recommended objects are determined. The second recommended objects are displayed in the order of their exposure completion scores.
[0201] S7054: Sort the remaining objects in the first recommended object according to their completion scores, and determine the display order of the remaining objects in other areas according to the sorting result.
[0202] As for the remaining 9 candidate objects in the first recommended object, these 9 candidate objects are sorted according to the completion score, and it is determined that among these 9 candidate objects, the candidate objects with completion scores ranked 1 to 3 are recommended objects in the second area, the candidate objects with completion scores ranked 4 to 6 are recommended objects in the third area, and the candidate objects with completion scores ranked 7 to 9 are recommended objects in the fourth area.
[0203] S7055. Display the corresponding recommended objects in the first area and other areas.
[0204] After determining the recommended objects for each region, the recommended objects in each region can be ranked by their scores and displayed accordingly. Furthermore, since objects in the same region are displayed to the user simultaneously, their locations have little influence on the user's selection. Therefore, in this embodiment of the disclosure, recommended objects in the same region can be displayed randomly.
[0205] In the disclosed embodiment, since the most critical factor in attracting users is the recommended objects in the first area, the first recommended objects are sorted based on their exposure and completion scores to obtain the recommended objects in the first area. The comprehensive scores of the click scores and completion scores of these recommended objects are high, and they are most likely to attract users. Through this secondary recommendation method, the conversion rate of the platform can be maximized.
[0206] In addition, if you want to consume recommended songs in other areas, the prerequisite is that the first area has attracted the current user. Therefore, the ranking of recommended objects in subsequent areas is mainly based on user experience. Sorting the recommended objects in other areas by completion scores can improve user satisfaction and thus improve the platform's conversion rate.
[0207] Exemplary media
[0208] After introducing the method of the exemplary embodiment of the present disclosure, next, reference is made to Figure 7 A storage medium according to an exemplary embodiment of the present disclosure is described.
[0209] Figure 7 A schematic diagram of the structure of the storage medium provided in the embodiment of the present disclosure. Figure 7 As shown, a program product 700 for implementing the above method according to an embodiment of the present disclosure is described, which can be a portable compact disk read-only memory (CD-ROM) and includes program code and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto.
[0210] The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples (a non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0211] A readable signal medium may include a data signal transmitted in baseband or as part of a carrier wave, which carries readable program code. Such a transmitted data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium.
[0212] Program code for performing the operations disclosed herein can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device via any type of network, including a local area network (LAN) or a wide area network (WAN).
[0213] Exemplary devices
[0214] After introducing the medium of the exemplary embodiment of the present disclosure, next, reference is made to Figure 8 and Figure 9 The model training device and object recommendation device of the exemplary embodiments of the present disclosure are described respectively. The model training device is used to implement the model training method for removing position bias in any of the above method embodiments, and the object recommendation device is used to implement the object recommendation method in any of the above method embodiments. The implementation principles and technical effects are similar and will not be repeated here.
[0215] Figure 8 This is a schematic diagram of the structure of the model training device provided in the embodiment of the present disclosure. Figure 8As shown, the model training device 800 includes: a first acquisition module 801, which is used to obtain user features and object features of sample objects in any one of the click tasks or the completion tasks, input the user features and object features into the main model, and obtain the quasi-prediction value corresponding to the task; a second acquisition module 802, which is used to obtain the object position features and user features of the sample objects, input the object position features and user features into the first slave model, and obtain the position influence value, which is used to characterize the influence of the display position of the object on the task; a determination module 803, which is used to determine the first prediction value corresponding to the task based on the quasi-prediction value and the position influence value; a first processing module 804, which is used to iteratively train the main model and the first slave model based on the first prediction value, the first true label of the sample and the first loss function until the training exit condition is met to obtain the target main model.
[0216] In one embodiment of the present disclosure, the object position feature includes: a first position feature of the object in the first area and a second position feature of the first area in all areas; the second acquisition module 802 is specifically used to: obtain a first one-hot vector corresponding to the first position feature; based on the first one-hot vector, find a first dense vector corresponding to the first one-hot vector; obtain a second one-hot vector corresponding to the second position feature; based on the second one-hot vector, find a second dense vector corresponding to the second one-hot vector; obtain a third dense vector based on user features and a preset dense matrix; input the first dense vector, the second dense vector and the third dense vector into the splicing layer of the first slave model for splicing to obtain a first splicing vector; input the first splicing vector into the fully connected layer of the first slave model, and obtain the position influence value through a preset nonlinear function.
[0217] In one embodiment of the present disclosure, when the task is a completed broadcast task, the model training device also includes a second processing module 805, which is used to input the object position feature into the second slave model to obtain a selection probability value, and the selection probability value is used to characterize the probability that the user actively selects the object; based on the first prediction value and the selection probability value, the second prediction value corresponding to the completed broadcast task is determined; based on the second prediction value, the second true label of the sample and the second loss function, the main model, the first slave model and the second slave model are iteratively trained until the training exit condition is met to obtain the target main model.
[0218] In one embodiment of the present disclosure, the second processing module 805 is specifically used to: input the first dense vector and the second dense vector into the splicing layer of the second slave model for splicing to obtain a second splicing vector; input the second splicing vector into the fully connected layer of the second slave model, and obtain the selection probability value through a preset nonlinear function.
[0219] The above-mentioned model training device 800 provided in the embodiment of the present disclosure can implement each process in the aforementioned embodiment of the model training method for removing position bias and achieve the same functions and effects, which will not be repeated here.
[0220] Figure 9 This is a schematic diagram of the structure of the object recommendation device provided by the embodiment of the present disclosure. Figure 9 As shown, the object recommendation device 900 includes: an acquisition module 901, which is used to obtain user features of the current user and object features of multiple candidate objects; a processing module 902, which is used to input user features and object features into a target main model to obtain scores output by the target main model, where the target main model is obtained according to the model training method provided in the above embodiment; a recommendation module 903, which is used to recommend candidate objects to the current user based on the scores, where the scores are click scores and / or completion scores.
[0221] In one embodiment of the present disclosure, the processing module 902 is specifically used to: obtain a user vector based on user features, and obtain an object vector based on object features; splice the user vector and the object vector through the splicing layer of the target main model to obtain a third splicing vector; and obtain a score based on the third splicing vector based on a preset nonlinear function through the fully connected layer of the target main model.
[0222] In one embodiment of the present disclosure, the processing module 902 is specifically used to: obtain a cross vector based on the user vector and the object vector through the attention network of the target main model; the processing module 902 is specifically used to: obtain a score according to the cross vector based on a preset nonlinear function through the fully connected layer of the target main model.
[0223] In one embodiment of the present disclosure, the acquisition module 901 is further configured to: obtain a context feature vector corresponding to the context feature of the candidate object; concatenate the context feature vector and the cross vector using a concatenation layer of the target main model to obtain a fourth concatenation vector; and the processing module 902 is specifically configured to: obtain a score based on the fourth concatenation vector using a fully connected layer and a preset nonlinear function. The processing module 902 is further configured to: input the fourth concatenation vector into the fully connected layer and obtain a score based on the preset nonlinear function.
[0224] In one embodiment of the present disclosure, the recommendation module 903 is specifically used to: determine the product of the click score and the completion score as the exposure completion score of the candidate object; sort the candidate objects according to the completion score, and screen the candidate objects according to the sorting result and a first preset number to obtain a first recommended object among the candidate objects; sort the first recommended object according to the exposure completion score of the first recommended object, and determine the second recommended object in the first recommended object displayed in the first area, as well as the display order of the second recommended object, according to the sorting result and the second preset number; sort the remaining objects in the first recommended object according to the completion score, and determine the display order of the remaining objects in other areas according to the sorting result; and display the corresponding recommended objects in the first area and other areas.
[0225] The object recommendation device 900 provided in the embodiment of the present disclosure can implement each process in the aforementioned object recommendation method embodiment and achieve the same functions and effects, which will not be described in detail here.
[0226] Exemplary computing devices
[0227] After introducing the method, medium and apparatus of the exemplary embodiments of the present disclosure, Figure 10 The computing device of the exemplary embodiment of the present disclosure is described. It should be understood that Figure 10 The computing device 1000 shown is only an example and should not limit the functionality and scope of use of the embodiments of the present disclosure.
[0228] Figure 10 This is a schematic diagram of the structure of the computing device provided in the embodiment of the present disclosure. Figure 10 As shown, computing device 1000 is implemented as a general-purpose computing device. Components of computing device 1000 may include, but are not limited to, at least one processing unit 1001, at least one storage unit 1002, and a bus 1003 connecting different system components (including processing unit 1001 and storage unit 1002).
[0229] The bus 1003 includes a data bus, a control bus, and an address bus. The storage unit 1002 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 1012 and / or a cache memory 1022, and may further include a readable medium in the form of a non-volatile memory, such as a read-only memory (ROM) 1032.
[0230] The storage unit 1002 may also include a program / utility 1052 having a set (at least one) of program modules 1042, such program modules 1042 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0231] The computing device 1000 may also communicate with one or more external devices 1004 (e.g., a keyboard, a pointing device, etc.). Such communication may be performed via an input / output (I / O) interface 1005. Furthermore, the computing device 1000 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1006. Figure 10 As shown, network adapter 1006 communicates with other modules of computing device 1000 via bus 1003. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with computing device 1000, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0232] It should be noted that although several units / modules or sub-units / modules of the timing update device are mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in a single unit / module. Conversely, the features and functions of a single unit / module described above can be further divided and embodied by multiple units / modules.
[0233] Furthermore, although the operations of the disclosed method are described in a particular order in the accompanying drawings, this does not require or imply that the operations must be performed in this particular order, or that all illustrated operations must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0234] Although the spirit and principles of the present disclosure have been described with reference to several specific embodiments, it should be understood that the present disclosure is not limited to the specific embodiments disclosed, and the division into various aspects does not mean that the features in these aspects cannot be combined to benefit. Such division is only for the convenience of expression. The present disclosure is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the appended claims.
Claims
1. A model training method for removing position bias, characterized in that: include: For any of the click tasks or the completion tasks, obtain first user features and object features of the sample objects in the task, where the first user features include user portrait features, user device features, and user song preference features, and the object features include song portrait features, song popularity features, and song behavior features; Obtaining a user vector corresponding to the first user feature and an object vector corresponding to the object feature; Input the user vector and the object vector into the attention network of the main model to obtain a cross vector; Obtaining a context feature vector corresponding to a context feature of a sample object in the task, wherein the context feature includes a recommendation topic feature corresponding to the sample object; The context feature vector and the cross vector are concatenated through the concatenation layer of the main model to obtain a target concatenation vector; Obtaining a quasi-prediction value according to the target splicing vector based on a preset nonlinear function through the fully connected layer of the main model, the preset nonlinear function being a PReLu function; Obtaining an object location feature and a second user feature of the sample object, inputting the object location feature and the second user feature into a first slave model to obtain a location influence value, the location influence value being used to characterize the influence of the object's display location on the task; the second user feature being a basic attribute feature of the user; Determining a first predicted value corresponding to the task according to the proposed predicted value and the position influence value; Iteratively training the master model and the first slave model according to the first predicted value, the first true label of the sample, and a first loss function until a training exit condition is met, thereby obtaining a target master model; When the task is a completed broadcast task, the model training method further includes: Inputting the object position feature into a second slave model to obtain a selection probability value, wherein the selection probability value is used to represent the probability of the user actively selecting the object; Determining a second prediction value corresponding to the completed broadcast task according to the first prediction value and the selection probability value; Iteratively training the master model, the first slave model, and the second slave model according to the second predicted value, the second true label of the sample, and the second loss function until a training exit condition is met to obtain a target master model; The object position feature comprises: a first position feature of the object in the first area and a second position feature of the first area in all areas; Inputting the object position feature and the second user feature into the first slave model to obtain the position influence value includes: Obtain a first one-hot vector corresponding to the first position feature; According to the first one-hot vector, find a first dense vector corresponding to the first one-hot vector; Obtain a second one-hot vector corresponding to the second position feature; According to the second one-hot vector, searching for a second dense vector corresponding to the second one-hot vector; Obtaining a slave user vector corresponding to the second user feature; Multiplying the slave user vector by a preset dense matrix to obtain a third dense vector; Inputting the first dense vector, the second dense vector, and the third dense vector into the splicing layer of the first slave model for splicing to obtain a first splicing vector; The position influence value is obtained according to the first splicing vector through the fully connected layer of the first slave model based on a preset nonlinear function.
2. The model training method according to claim 1, characterized in that Inputting the object position feature into the second slave model to obtain a selection probability value includes: Inputting the first dense vector and the second dense vector into a splicing layer of a second slave model for splicing to obtain a second splicing vector; The second concatenated vector is input into the fully connected layer of the second slave model, and the selection probability value is obtained through a preset nonlinear function.
3. An object recommendation method, characterized in that: include: Obtain user features of the current user and object features of multiple candidate objects; Inputting the user features and the object features into a target main model to obtain a score output by the target main model, wherein the target main model is obtained by the model training method according to claim 1 or 2; The candidate object is recommended to the current user according to the score, wherein the score is a click score and / or a completion score.
4. The object recommendation method according to claim 3, characterized in that Inputting the user features and the object features into a target main model to obtain a score output by the target main model includes: Inputting the user features and the object features into a target main model, obtaining a user vector according to the user features and obtaining an object vector according to the object features through a feature processing layer of the target main model; splicing the user vector and the object vector through the splicing layer of the target main model to obtain a third splicing vector; The score is obtained according to the third splicing vector based on a preset nonlinear function through a fully connected layer of the target main model.
5. The object recommendation method according to claim 4, characterized in that The step of splicing the user vector and the object vector through the splicing layer of the target main model to obtain a third splicing vector includes: Obtaining a cross vector based on the user vector and the object vector through an attention network of the target main model; Obtaining the score according to the third splicing vector based on a preset nonlinear function through the fully connected layer of the target main model includes: The score is obtained according to the cross vector based on a preset nonlinear function through a fully connected layer of the target main model.
6. The object recommendation method according to claim 5, characterized in that The object recommendation method further includes: Obtaining a context feature vector corresponding to the context feature of the candidate object; Splicing the context feature vector and the cross vector through the splicing layer of the target main model to obtain a fourth splicing vector; Obtaining the score according to the cross vector using a fully connected layer of the target main model based on a preset nonlinear function includes: The score is obtained according to the fourth splicing vector through the fully connected layer based on a preset nonlinear function.
7. The object recommendation method according to any one of claims 3 to 6, characterized in that: Recommending the candidate object to the current user based on the score includes: Determine the product of the click score and the completion score as the exposure completion score of the candidate object; sorting the candidate objects according to the completion scores, screening the candidate objects according to the sorting results and a first preset number, and obtaining a first recommended object among the candidate objects; Sorting the first recommended objects according to the exposure completion scores of the first recommended objects, and determining a display order of the second recommended objects and the second recommended objects in the first area based on the sorting results and a second preset number; sorting the remaining objects in the first recommended objects according to their completion scores, and determining a display order of the remaining objects in other areas according to the sorting result; The corresponding recommended objects are displayed in the first area and the other areas.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the model training method for removing position bias as described in claim 1 or 2 and / or the object recommendation method as described in any one of claims 3 to 7 are implemented.
9. A model training device for removing position bias, characterized in that: include: A first acquisition module is used to acquire, for any one of the click task and the completion task, first user features and object features of the sample object in the task; Obtain a user vector corresponding to the first user feature and an object vector corresponding to the object feature; input the user vector and the object vector into the attention network of the main model to obtain a cross vector; input the cross vector into the fully connected layer of the main model, and obtain a quasi-predicted value through a preset nonlinear function, wherein the preset nonlinear function is a PReLu function; a second acquisition module configured to acquire an object location feature and a second user feature of the sample object, input the object location feature and the second user feature into a first slave model, and obtain a location influence value, wherein the location influence value is used to represent the influence of the object's display location on the task; the second user feature includes a basic attribute feature of the user; a determination module, configured to determine a first prediction value corresponding to the task based on the proposed prediction value and the position influence value; a first processing module, configured to iteratively train the master model and the first slave model according to the first predicted value, the first true label of the sample, and a first loss function until a training exit condition is met, thereby obtaining a target master model; The second processing module is configured to: when the task is a completed broadcast task, Inputting the object position feature into a second slave model to obtain a selection probability value, wherein the selection probability value is used to represent the probability of the user actively selecting the object; Determining a second prediction value corresponding to the completed broadcast task according to the first prediction value and the selection probability value; Iteratively training the master model, the first slave model, and the second slave model according to the second predicted value, the second true label of the sample, and the second loss function until a training exit condition is met to obtain a target master model; The object position feature comprises: a first position feature of the object in the first area and a second position feature of the first area in all areas; The second acquisition module is specifically configured to: acquire a first one-hot vector corresponding to the first position feature; According to the first one-hot vector, find a first dense vector corresponding to the first one-hot vector; Obtain a second one-hot vector corresponding to the second position feature; According to the second one-hot vector, searching for a second dense vector corresponding to the second one-hot vector; Obtaining a slave user vector corresponding to the second user feature; Multiplying the slave user vector by a preset dense matrix to obtain a third dense vector; Inputting the first dense vector, the second dense vector, and the third dense vector into the splicing layer of the first slave model for splicing to obtain a first splicing vector; The position influence value is obtained according to the first splicing vector through the fully connected layer of the first slave model based on a preset nonlinear function.
10. The model training device according to claim 9, wherein the second processing module is specifically configured to: Inputting the first dense vector and the second dense vector into a splicing layer of a second slave model for splicing to obtain a second splicing vector; The second concatenated vector is input into the fully connected layer of the second slave model, and the selection probability value is obtained through a preset nonlinear function.
11. An object recommendation device, characterized in that: include: An acquisition module, used to acquire user features of a current user and object features of multiple candidate objects; a processing module, configured to input the user features and the object features into a target main model to obtain a score output by the target main model, wherein the target main model is obtained by the model training method according to claim 1 or 2; The recommendation module is configured to recommend the candidate object to the current user based on the score, wherein the score is a click score and / or a completion score.
12. The object recommendation device according to claim 11, wherein: The processing module is specifically used for: Inputting the user features and the object features into a target main model, obtaining a user vector according to the user features and obtaining an object vector according to the object features through a feature processing layer of the target main model; splicing the user vector and the object vector through the splicing layer of the target main model to obtain a third splicing vector; The score is obtained according to the third splicing vector based on a preset nonlinear function through a fully connected layer of the target main model.
13. The object recommendation device according to claim 12, wherein: The processing module is specifically used for: Obtaining a cross vector based on the user vector and the object vector through an attention network of the target main model; The score is obtained according to the cross vector based on a preset nonlinear function through a fully connected layer of the target main model.
14. The object recommendation device according to claim 13, wherein: The processing module is further configured to: obtain a context feature vector corresponding to the context feature of the candidate object; Splicing the context feature vector and the cross vector through the splicing layer of the target main model to obtain a fourth splicing vector; The fourth concatenated vector is input into the fully connected layer and passed through a preset nonlinear function to obtain a score.
15. The object recommendation device according to any one of claims 11 to 14, characterized in that: The recommendation module is specifically used for: Determine the product of the click score and the completion score as the exposure completion score of the candidate object; sorting the candidate objects according to the completion scores, screening the candidate objects according to the sorting results and a first preset number, and obtaining a first recommended object among the candidate objects; Sorting the first recommended objects according to the exposure completion scores of the first recommended objects, and determining a display order of the second recommended objects and the second recommended objects in the first area based on the sorting results and a second preset number; sorting the remaining objects in the first recommended objects according to their completion scores, and determining a display order of the remaining objects in other areas according to the sorting result; The corresponding recommended objects are displayed in the first area and the other areas.
16. A computing device, characterized in that include: at least one processor and memory; The memory stores computer-executable instructions; The computer-executable instructions stored in at least the memory of the at least one processor enable the at least one processor to execute the model training method for removing position bias as described in claim 1 or 2, and / or the object recommendation method as described in any one of claims 3 to 7.
17. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the model training method for removing position bias as described in any one of claims 1 or 2, and / or the object recommendation method as described in any one of claims 3 to 7.
Citation Information
Patent Citations
Recommendation model training method and selection probability prediction method and device
CN112487278A
Information recommendation method and device, storage medium and electronic equipment
CN113343085A
Content recommendation model training method, content recommendation method and related equipment
CN113360777A