Model generation method, recommendation method, device and electronic device

By obtaining training data on the characteristics of users and recommended items, as well as the characteristics of the display locations in the recommendation system, the initial coarse ranking model is trained. By using SENet and DNN network structures, the model is optimized to consider the influence of the display location of the recommended items, which solves the problem of low recommendation accuracy and achieves higher recommendation accuracy and user experience.

CN115048575BActive Publication Date: 2025-09-12SHENZHEN HEYTAP TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210621398.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-01
Publication Date
2025-09-12
Estimated Expiration
2042-06-01

AI Technical Summary

Technical Problem

In the rough ranking stage of the recommendation system, existing models fail to effectively consider the impact of the display location of recommendations on user selection results, resulting in low recommendation accuracy.

Method used

By obtaining training data on user features, recommended item features, and recommended item display location features, the initial coarse ranking model is trained. The SENet and DNN network structures are used to learn the impact of the recommended item display location on user selection results. By combining the location feature network and the recommendation network, the model is optimized to improve the recommendation accuracy.

Benefits of technology

The recommendation accuracy of the coarse ranking model is improved, and the consistency of the output results of the coarse and fine ranking stages is achieved, which improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115048575B_ABST
    Figure CN115048575B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a model generation method, a recommendation method, an apparatus, and an electronic device. The method comprises: obtaining training data, the training data comprising user features, recommendation item features corresponding to the user features, and position features corresponding to the recommendation item features, wherein the position features represent the display location of the recommendation item; and training an initial coarse ranking model based on the training data to obtain a coarse ranking model. Through the above-mentioned method, the initial coarse ranking model can be trained by user features, recommendation item features corresponding to the user features, and position features representing the display location of the recommendation item, so that the influence of the display location of the recommendation item on the user selection result can be taken into account, thereby improving the recommendation accuracy of the coarse ranking model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more specifically, to a model generation method, a recommendation method, a device, and an electronic device. Background Art

[0002] With the rapid development of the internet and the advent of the big data era, people are surrounded by a vast amount of information. To accurately deliver information to each user, recommendation systems have become a research hotspot. Recommendation systems can be divided into several stages: recall, rough ranking, fine ranking, and re-ranking. However, the rough ranking stage still suffers from low recommendation accuracy. Summary of the Invention

[0003] In view of the above problems, the present application proposes a model generation method, a recommendation method, a device and an electronic device to improve the above problems.

[0004] In a first aspect, the present application provides a model generation method, which includes: obtaining training data, the training data including user features, recommendation item features corresponding to the user features, and position features corresponding to the recommendation item features, wherein the position features represent the display location of the recommendation item; and training an initial coarse ranking model based on the training data to obtain a coarse ranking model.

[0005] In the second aspect, the present application provides a recommendation method, which includes: obtaining target user characteristics and candidate recommendation item characteristics; inputting the target user characteristics and candidate recommendation item characteristics into a coarse ranking recommendation model, wherein the coarse ranking recommendation model is obtained based on the coarse ranking model obtained by the above method, and obtaining a coarse ranking recommendation score; determining the coarse ranking recommendation item corresponding to the target user based on the coarse ranking recommendation score.

[0006] In a third aspect, the present application provides a model generation device, which includes: a training data acquisition unit for acquiring training data, wherein the training data includes user features, recommendation features, and location features, and the location features represent the display location of the recommendation; and a model generation unit for training an initial coarse ranking model based on the training data to obtain a coarse ranking model.

[0007] In a fourth aspect, the present application provides a recommendation device, which includes: a feature acquisition unit for acquiring target user features and candidate recommendation features; a coarse ranking recommendation score acquisition unit for inputting the target user features and candidate recommendation features into a coarse ranking recommendation model, wherein the coarse ranking recommendation model is obtained based on the coarse ranking model obtained by the above method, and a coarse ranking recommendation score is obtained; a coarse ranking recommendation object acquisition unit for determining the coarse ranking recommendation object corresponding to the target user based on the coarse ranking recommendation score.

[0008] In a fifth aspect, the present application provides an electronic device comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned method.

[0009] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores program code, wherein the above method is executed when the program code is run.

[0010] The present application provides a model generation method, recommendation method, device, electronic device, and storage medium. After acquiring training data comprising user features, recommended item features corresponding to the user features, and positional features representing the display locations of the recommended items corresponding to the recommended item features, an initial coarse-grained ranking model is trained based on the training data to obtain a coarse-grained ranking model. This method allows the initial coarse-grained ranking model to be trained using user features, recommended item features corresponding to the user features, and positional features representing the display locations of the recommended items, thereby taking into account the impact of the display locations of the recommended items on user selection results, thereby improving the recommendation accuracy of the coarse-grained ranking model. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0012] Figure 1 A flow chart of a model generation method proposed in an embodiment of the present application is shown;

[0013] Figure 2 A schematic diagram showing user characteristics and recommended item characteristics proposed in this application is shown;

[0014] Figure 3 Shows this application Figure 1 A flowchart of an embodiment of S120;

[0015] Figure 4 A schematic diagram of an initial coarse arrangement model proposed in this application is shown;

[0016] Figure 5 A flow chart of a model generation method proposed in another embodiment of the present application is shown;

[0017] Figure 6 A schematic diagram of another initial coarse arrangement model proposed in this application is shown;

[0018] Figure 7 A flowchart of a recommended method proposed in an embodiment of the present application is shown;

[0019] Figure 8 A schematic diagram of a coarse ranking recommendation model proposed in this application is shown;

[0020] Figure 9 A structural block diagram of a model generation device proposed in an embodiment of the present application is shown;

[0021] Figure 10 A structural block diagram of a recommendation device proposed in an embodiment of the present application is shown;

[0022] Figure 11 Shows a structural block diagram of an electronic device proposed in this application;

[0023] Figure 12 It is a storage unit for storing or carrying program codes for implementing the model generation method and recommendation method according to the embodiment of the present application. DETAILED DESCRIPTION

[0024] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0025] With the development of on-device artificial intelligence (AI), the latency of deep learning models running on devices has become a critical metric. Therefore, estimating the latency of models running on devices is particularly important.

[0026] With the advent of the big data era, people are surrounded by a vast amount of information. Therefore, how to accurately deliver information to each user has become increasingly important. Consequently, recommendation systems have become a research hotspot. For example, an increasing number of internet companies are implementing recommendation systems to deliver personalized information to each user. Recommendation systems can be divided into several stages: recall, rough sorting, refined sorting, and re-ranking. Each stage filters a portion of information, allowing users to select and deliver the information they are most interested in from the vast amount of information.

[0027] However, the inventors discovered in their research that the rough ranking stage still suffers from low recommendation accuracy. For example, a DSSM (Deep Structured Semantic Model) can be used to input user-side features into the user tower and item-side features into the item tower. After dual-tower learning, the two towers output user and item vectors, respectively. The similarity between the two vectors is then calculated using the inner product method to serve as the item score. However, the DSSM model fails to consider the cross-features between user and item features, and all features play an equal role, limiting the model's predictive power. For example, the COLD (Computing power cost-aware Online and Lightweight Deep pre-ranking system) model can be used to connect the features on the user side and the item side, and then use the SENet (Squeeze and Excitation Networks) structure to learn the importance of the connected features. Then, a DNN (Deep Neural Networks) structure is used to output the item score. However, the COLD model uses SENet to delete low-importance features, and the training process is cumbersome. In terms of engineering architecture, it requires high technical requirements for engineers and is not easy to implement.

[0028] Therefore, the inventors have proposed a model generation method, recommendation method, device, and electronic device in this application. After obtaining training data including user features, recommended item features corresponding to the user features, and positional features representing the display locations of the recommended items corresponding to the recommended item features, an initial coarse ranking model is trained based on the training data to obtain a coarse ranking model. Through the above-mentioned method, the initial coarse ranking model can be trained using user features, recommended item features corresponding to the user features, and positional features representing the display locations of the recommended items, so that the impact of the display locations of the recommended items on the user's selection results can be taken into account, thereby improving the recommendation accuracy of the coarse ranking model.

[0029] In order to better understand the solutions of the embodiments of the present application, the technical terms used in the embodiments of the present application are explained below.

[0030] SENet: is a network that can explicitly model the interdependence between feature channels. SENet can recalibrate features. Feature recalibration means that the importance of each feature channel can be automatically obtained through learning, and then useful features are promoted according to this importance and features that are less useful for the current task are suppressed.

[0031] DNN: It is a neural network that can be divided into input layer, hidden layer and output layer. Each neuron can belong to a different layer. Each neuron can be connected to all neurons in the previous layer, and the signal can propagate unidirectionally from the input layer to the output layer.

[0032] Embedding technology involves converting one-hot vectors into dense vectors through a fully connected layer. Embedding can be a table lookup operation, and the embedding vector table can be a parameter matrix. The initial values ​​of the parameter matrix can be obtained through random initialization. For example, two 6-dimensional one-hot vectors can be input into a 6×3 dense matrix, and two 3-dimensional dense vectors can be output.

[0033] The embodiments of this application will be described below with reference to the accompanying drawings.

[0034] See also Figure 1 , the present application provides a model generation method, the method comprising:

[0035] S110: Acquire training data, where the training data includes user features, recommended item features corresponding to the user features, and location features corresponding to the recommended item features, where the location features represent a display location of the recommended item.

[0036] User features can refer to features that characterize a user's basic information and interests. Basic user information can include things like their ID (identity document), gender, and age. Interests can refer to information that a user is interested in. For example, in a product shopping recommendation system, these include the user's favorite product types (major categories, subcategories), historically clicked products, and historically purchased products. Product types can be categorized into several major categories (e.g., food, medicine, and clothing), and each major category can be divided into multiple subcategories (e.g., clothing can be divided into shirts, skirts, and sweaters).

[0037] Recommendation features can refer to features that characterize the attributes of candidate items in a recommendation system. Different types of recommendation systems have corresponding different attributes of candidates. For example, in an information recommendation system, candidates can be various information, and recommendation features can be information sources, information types, information time, etc.; in a product shopping recommendation system, candidates can be various products, and recommendation features can be product ID, product name, Stock Keeping Unit Identity document (SKU ID), Standard Product Unit Identity document (SPU ID), major category of the product, minor category of the product, product click-through rate (CTR), etc.

[0038] The display position of the recommendation item may refer to the position of the recommendation item in the display interface corresponding to the recommendation system, for example, the ranking of the recommendation item.

[0039] In the recommendation system, there can be multiple users and recommended items. Each user can correspond to a user feature and multiple recommended items. A user feature can be a set of multi-dimensional vectors. Each recommended item can correspond to a recommended item feature. Each recommended item feature can be a set of multi-dimensional vectors. For example, Figure 2 As shown in the middle left figure, a user feature can contain multiple features (such as user ID, gender, historical clicked items, etc.). Each feature can be represented by a one-hot encoding, and the encoding length corresponding to each feature can be different; Figure 2 As shown in the middle right figure, a recommendation feature can contain multiple features (such as product ID, product name, product click-through rate, etc.). Each feature can be represented by a one-hot encoding, and the encoding length corresponding to each feature can be different.

[0040] As a method, the recommendation system's database can be accessed to obtain basic user information, points of interest, attributes of candidate items, and the display location of recommended items. This information can then be one-hot encoded to generate user features, recommended item features, and location features to generate training data. For example, in a product shopping recommendation system, the user's basic information in the database can be provided by the user during registration, and the attributes of the candidate items in the database can be provided by the merchant. The user's preferred product types can be determined based on the user's browsing and clicking behavior. The user's historical clicked and purchased items can be determined based on the user's browsing and purchase history.

[0041] S120: Training the initial coarse sorting model based on the training data to obtain a coarse sorting model.

[0042] The training data may also include labels corresponding to the recommended item features. The labels may include recommendation tags and refined ranking scores. The recommendation tags may indicate whether the corresponding recommended item was clicked, and the refined ranking scores may indicate the degree to which the recommended item, derived from the refined ranking model, is recommended. The initial coarse ranking model may include a position feature network and a recommendation network.

[0043] As a way, Figure 3 As shown, the initial coarse sorting model is trained based on the training data to obtain a coarse sorting model, including:

[0044] S121: Input the position feature into the position feature network to obtain a position score, where the position score represents the probability that the display position corresponding to the recommendation is viewed.

[0045] Among them, the position feature network can be a network used to obtain the position score corresponding to the recommended item. The higher the position score, the closer the recommended item is to the front of the display interface corresponding to the recommendation system, and the more likely it is to be viewed by the user.

[0046] As a method, the position features corresponding to the recommended items can be input into the position feature network to obtain the position scores corresponding to the recommended items.

[0047] S122: Input the user characteristics and the recommendation characteristics into the recommendation network to obtain a recommendation score, where the recommendation score represents the degree of association between the recommendation characteristics corresponding to the recommendation and the user characteristics.

[0048] Among them, the recommendation network can be a network used to determine whether the user will view the recommended items, such as Figure 4 As shown, the recommendation network can include a user tower network, a recommended item tower network, and a feature fusion network. The user tower network can be used to further extract user features, the recommended item tower network can be used to further extract recommended item features, and the feature fusion network can be used to fuse the features extracted by the user tower network and the recommended item tower network. The higher the recommendation score output by the recommendation network, the more closely the recommended item features are associated with the user features, and the more likely the recommended item is to be viewed by the user.

[0049] As a method, user features can be input into the user tower network to obtain a first reference feature; the recommended object features can be input into the recommended object tower network to obtain a second reference feature; the first reference feature and the second reference feature can be input into the feature fusion network to obtain a recommendation score.

[0050] The first reference feature may be a low-dimensional feature obtained by further extracting the user feature, and the second reference feature may be a low-dimensional feature obtained by further extracting the recommendation feature.

[0051] Optionally, in an embodiment of the present application, there may be multiple user features, each of which may correspond to multiple recommendation features. The user features and recommendation features may be divided into multiple different feature groups, with one user feature and one recommendation feature corresponding to the user feature forming a group. The multiple feature groups are then input into the user tower network and the recommendation tower network, respectively, to obtain first and second reference features corresponding to each feature group. The recommendation scores for the recommendation features in each feature group are then obtained through the feature fusion network. For example, the user features may be U1, U2, ..., Un (n is a positive integer), the recommendation features corresponding to U1 may be I11, I12, I13, and the recommendation features corresponding to U2 may be I21 and I22. The feature groups may be as shown in Table 1.

[0052] Table 1

[0053] Feature group number User characteristics Recommended features 1 U1 I11 2 U1 I12 3 U1 I13 4 U2 I21 5 U2 I22 ... ... ...

[0054] S123: Obtain a recommendation score based on the position score and the recommendation score, where the recommendation score represents the degree of recommendation of the recommendation.

[0055] As a method, the position score and the recommendation score can be added together to obtain the recommendation score. The higher the recommendation score, the greater the degree of recommendation corresponding to the recommendation, and the more likely the recommendation is to be displayed in a front position in the corresponding display interface of the recommendation system.

[0056] S124: Training the position feature network and the recommendation network based on the recommendation scores and the labels to obtain a coarse ranking model.

[0057] As a method, the recommendation scores can be compared with the recommendation tags and the fine ranking scores respectively, and the position feature network and the recommendation network can be trained based on the comparison results to obtain a coarse ranking model.

[0058] This embodiment provides a model generation method that, after acquiring training data comprising user features, recommended item features corresponding to the user features, and location features representing the recommended item display locations corresponding to the recommended item features, trains an initial coarse-grained ranking model based on the training data to obtain a coarse-grained ranking model. This method allows the initial coarse-grained ranking model to be trained using user features, recommended item features corresponding to the user features, and location features representing the recommended item display locations, thereby taking into account the impact of the recommended item display locations on user selection results, thereby improving the recommendation accuracy of the coarse-grained ranking model.

[0059] See also Figure 5 , the present application provides a model generation method, the method comprising:

[0060] S210: Acquire training data, where the training data includes user features, recommended item features corresponding to the user features, and location features corresponding to the recommended item features, where the location features represent a display location of the recommended item.

[0061] S220: Input the location feature into the location feature network to obtain a location score, where the location score represents a probability that the display location corresponding to the recommendation is viewed.

[0062] Among them, Figure 6 As shown, the position feature network can include a position embedding network and a position score network. The position embedding network can be used to convert sparse position features (one-hot encoding) into dense position vectors through embedding technology, and the position score network can be used to obtain the position scores corresponding to the recommended items.

[0063] As a method, the position feature can be first input into the position embedding network to obtain a position vector, and then the position vector can be input into the position score network to obtain a position score.

[0064] The position vector may refer to a vector that densely represents the position feature, and the dense representation may refer to dimensionality reduction or the vector may contain at least one decimal.

[0065] For example, a user feature can correspond to 10 recommendations, each of which has a corresponding display position. If the recommendation is displayed in the third position, the position feature can be represented as 0010000000. The position feature is input into the position embedding network, and the position vector is obtained by searching the corresponding embedding vector table of the position embedding network. The embedding vector table can be a 10×5 matrix, and the position vector can be a 5-dimensional dense vector. The position vector is then input into the position score network to obtain a 1-dimensional vector, which can be the position score.

[0066] Optionally, the position embedding network may include a fully connected layer, and the position score network may be a DNN.

[0067] In an embodiment of the present application, sparse position features are converted into dense position vectors through a position embedding network, which can reduce the dimension of the position features and change the display positions represented by the position features from a mutually independent state to a connected state, making the semantic information corresponding to the position vector richer, thereby improving the recommendation accuracy of the coarse ranking model.

[0068] S230: Input the user characteristics into the user tower network to obtain a first reference characteristic.

[0069] Among them, Figure 6 As shown, the user tower network may include a user embedding network, a first attention network, and a first fully connected network. The user embedding network may be used to convert sparse user features into dense user vectors through embedding technology, and the user vectors may contain multiple features; the first attention network may be used to adjust the weights of features in the user vector, amplify important features, and suppress unimportant features, wherein important features may be features that are beneficial to improving the accuracy of the coarse ranking model proposed in this application; the first fully connected network may be used to obtain a first reference feature.

[0070] As a method, the user features can be first input into the user embedding network to obtain the user vector; then the user vector can be input into the first attention network to obtain the user attention feature; and then the user attention feature can be input into the first fully connected network to obtain the first reference feature.

[0071] The user vector may refer to a vector that densely represents user features. Dense representation may refer to dimensionality reduction or the vector may contain at least one decimal. The user attention feature may refer to a feature obtained through the attention mechanism that represents the user's basic information and points of interest.

[0072] Optionally, a user feature can contain multiple features, each of which corresponds to an embedding vector table in the user embedding network. Each feature can be converted into a vector of the same dimension by lookup, thereby obtaining the user vector. The parameters in the embedding vector table can be randomly initialized and updated during the training of the initial coarse-grained model.

[0073] Optionally, the first attention network may be a SENET. The first fully connected network may include at least one fully connected layer.

[0074] S240: Input the recommendation feature into the recommendation tower network to obtain a second reference feature.

[0075] Among them, Figure 6 As shown, the recommendation tower network may include a recommendation embedding network, a second attention network, and a second fully connected network. The recommendation embedding network may be used to convert sparse recommendation features into dense recommendation vectors through embedding technology, and the recommendation vectors may contain multiple features; the second attention network may be used to adjust the weights of features in the recommendation vector, amplify important features, and suppress non-important features, wherein important features may be features that are beneficial to improving the accuracy of the coarse ranking model proposed in this application; the first fully connected network may be used to obtain a second reference feature.

[0076] As a method, the recommendation feature can be first input into the recommendation embedding network to obtain the recommendation vector; then the recommendation vector can be input into the second attention network to obtain the recommendation attention feature; and then the recommendation attention feature can be input into the second fully connected network to obtain the second reference feature.

[0077] The recommendation vector may refer to a vector that densely represents the features of the recommendation. The dense representation may refer to dimensionality reduction or the vector may contain at least one decimal. The recommendation attention feature may refer to a feature obtained through the attention mechanism and used to represent the attributes of the recommendation.

[0078] Optionally, the first attention network may be a SENET. The second fully connected network may include at least one fully connected layer.

[0079] In an embodiment of the present application, the user attention features and the recommendation attention features are obtained through the first attention network and the second attention network respectively, which can increase the weights of important features in the user features and the recommendation features, and reduce the weights of unimportant features in the user features and the recommendation features, so that the coarse ranking model can learn important features more easily, thereby improving the accuracy of the coarse ranking model.

[0080] S250: Inputting the first reference feature and the second reference feature into the feature fusion network to obtain the recommendation score.

[0081] The feature fusion network can be a DNN. As a method, the first reference feature and the second reference feature can be spliced ​​together, and then the spliced ​​features can be input into the feature fusion network to obtain a recommendation score. For example, the first reference feature can be a multidimensional vector: {U0, U1, U2, U3}, and the second reference feature can be a multidimensional vector: {I0, I1, I2, I3}. The spliced ​​features can then be {U0, U1, U2, U3, I0, I1, I2, I3}.

[0082] In an embodiment of the present application, by inputting the first reference feature and the second reference feature into the feature fusion network, feature intersection of the user feature corresponding to the first reference feature and the recommendation feature corresponding to the second reference feature can be achieved, so that the connection between the user feature and the recommendation feature can be learned, thereby improving the semantic richness of the feature and thus improving the recommendation accuracy of the coarse-grained recommendation model.

[0083] S260: Obtain a recommendation score based on the position score and the recommendation score, where the recommendation score represents the degree of recommendation corresponding to the recommendation.

[0084] S270: Obtain a first loss based on the recommendation score and the recommendation tag, where the first loss is used to reduce the difference between the viewing result corresponding to the recommendation score and the recommendation tag.

[0085] As a way, the recommendation score and the recommendation label can be input into the calculation formula of the cross entropy loss function to obtain the first loss.

[0086] S280: Obtaining a second loss based on the recommendation score and the refined ranking score, wherein the second loss is used to make an output result of the coarse ranking model consistent with an output result of the refined ranking model.

[0087] As a way, the recommendation score and the refined ranking score can be input into the calculation formula of the cross entropy loss function to obtain the first loss.

[0088] S290: Training the initial coarse-grained model based on the first loss and the second loss to obtain a coarse-grained model.

[0089] As a method, the first loss and the second loss can be weightedly summed to obtain a third loss, and the network parameters (such as weights, etc.) in the initial coarse-grained model can be updated based on the third loss to obtain a coarse-grained model.

[0090] Among them, the coarse ranking model can be a model that meets the target conditions, and the target conditions can be that the recommendation accuracy reaches a preset accuracy, the number of training times reaches a preset number, and the third loss reaches a local minimum.

[0091] Optionally, the weight coefficients of the first loss and the second loss may be preset or obtained based on training.

[0092] This embodiment provides a model generation method that, through the above-mentioned method, allows an initial coarse ranking model to be trained using user features, recommended item features corresponding to the user features, and location features representing the display location of the recommended items. This allows the influence of the display location of the recommended items on the user's selection results to be taken into account, thereby improving the recommendation accuracy of the coarse ranking model. Furthermore, in this embodiment, the initial coarse ranking model is trained using a first loss and a second loss, so that the initial coarse ranking model can not only learn the relationship between location features and whether the recommended items are viewed by the user, but also learn the generation strategy of the output results of the refined ranking model based on the refined ranking score, so that the recommendation score of the initial coarse ranking model is consistent with the refined ranking score, thereby achieving consistency in the output results of the entire recommendation system at different stages, thereby improving the recommendation accuracy of the coarse ranking model.

[0093] See also Figure 7 , a recommended method provided by this application, the method comprising:

[0094] S310: Obtain target user features and candidate recommendation features.

[0095] The target user characteristics may refer to the user characteristics corresponding to the target user, which may be the user who logs into the display interface corresponding to the recommendation system. The candidate recommendation characteristics may refer to the recommendation characteristics of the recommended items included in the recommendation system, which may refer to all recommended items corresponding to the recommendation system or to recommended items obtained after recall processing of the recommendation system.

[0096] As one approach, the recommendation system database can be queried based on the target user's user ID to obtain the target user's features. After determining the target user, the recommendation system database can retrieve the recommendation features of all recommended items and use them as candidate recommendation features. Alternatively, based on the results of the recall process, the corresponding recommendation features can be retrieved from the recommendation system database in real time and used as candidate recommendation features.

[0097] S320: Input the target user features and the candidate recommendation features into a coarse ranking recommendation model, where the coarse ranking recommendation model is obtained based on the coarse ranking model obtained by the above method, and obtain a coarse ranking recommendation score.

[0098] Among them, since the recommendation system cannot determine the actual display location of the recommended items in the coarse ranking stage of the actual application process, the coarse ranking recommendation model can be the recommendation network in the coarse ranking model.

[0099] As a way, Figure 8 As shown, the target user features and candidate recommendation item features can be input into the user tower network and recommendation item tower network in the recommendation network respectively to obtain the coarse ranking recommendation score output by the feature fusion network.

[0100] Optionally, in an embodiment of the present application, there may be multiple candidate recommendation features. The user features and candidate recommendation features may be divided into multiple different feature groups in a manner such that the target user features and a candidate recommendation feature are grouped together. The multiple feature groups may then be input into the user tower network and the recommendation tower network respectively to obtain a coarse recommendation score corresponding to each candidate recommendation feature.

[0101] Optionally, in an embodiment of the present application, there may be multiple target users. A second reference feature corresponding to each target user's candidate recommendation feature may be obtained in advance through a recommendation tower network in the recommendation network based on the candidate recommendation feature, and the second reference feature may be associated with the user ID and stored. After determining that a target user exists, the user feature may be input into the user tower network in the recommendation network to obtain a first reference feature corresponding to the target user. The corresponding second reference feature may then be obtained based on the target user's user ID. Finally, a coarse recommendation score may be obtained based on the first and second reference features.

[0102] In an embodiment of the present application, by associating and storing the second reference feature with the user ID, the computational efficiency of the recommendation method proposed in the present application can be improved, so that the recommendation results can be displayed to the user more quickly, thereby improving the user experience.

[0103] S330: Determine a coarse-rank recommendation corresponding to the target user based on the coarse-rank recommendation score.

[0104] As a method, the coarse-rank recommendation scores corresponding to the candidate recommendation features can be sorted in descending order, and the candidate recommendations corresponding to the first N (N is a positive integer) coarse-rank recommendation scores are used as the coarse-rank recommendations corresponding to the target user.

[0105] Optionally, the value of N can be pre-set based on the capacity of the recommendations included in the recommendation system. The larger the capacity, the larger the value of N. Optionally, after obtaining the coarse-ranked recommendations corresponding to the target user, the coarse-ranked recommendations can be directly presented to the user through the corresponding display interface of the recommendation system. Alternatively, the candidate recommendation features corresponding to the coarse-ranked recommendations can be input into the corresponding refined ranking model of the recommendation system to obtain refined ranking results, and based on the refined ranking results, the recommendations can be presented to the user through the corresponding display interface of the recommendation system.

[0106] This embodiment provides a recommendation method that, through the aforementioned method, can obtain coarse-ranked recommendations corresponding to a target user based on a coarse-ranking recommendation model. Because the coarse-ranking recommendation model is derived based on a coarse-ranking model that considers the impact of the recommended item's display location on the user's selection results, the accuracy of the coarse-ranked recommendations can be improved. Furthermore, in this embodiment, a refined ranking result can be obtained based on the coarse-ranked recommendations, and based on the refined ranking result, the recommended items are presented to the user via a display interface corresponding to the recommendation system, thereby further reducing the number of recommended items presented to the user and increasing the probability that the recommended items presented to the user will be viewed by the user, allowing the target user to more quickly find the recommended items they need, thereby improving the user experience.

[0107] See also Figure 9 The present application provides a model generation device 600, which includes:

[0108] A training data acquisition unit 610 is configured to acquire training data, wherein the training data includes user features, recommended item features, and location features, wherein the location features represent the display location of the recommended item.

[0109] The model generating unit 620 is configured to train the initial coarse sorting model based on the training data to obtain a coarse sorting model.

[0110] As a method, the training data also includes labels corresponding to the features of the recommendation items. The initial coarse ranking model includes a position feature network and a recommendation network. The model generation unit 620 is specifically used to input the position features into the position feature network to obtain a position score, and the position score represents the probability that the display position corresponding to the recommendation item is viewed; input the user features and the recommendation item features into the recommendation network to obtain a recommendation score, and the recommendation score represents the degree of association between the recommendation item features corresponding to the recommendation item and the user features; based on the position score and the recommendation score, a recommendation item score is obtained, and the recommendation item score represents the degree of recommendation corresponding to the recommendation item; based on the recommendation item score and the label, the position feature network and the recommendation network are trained to obtain a coarse ranking model.

[0111] Optionally, the label includes a recommendation label and a refined ranking score, wherein the recommendation label indicates whether the corresponding recommendation item has been clicked, and the refined ranking score indicates the degree of recommendation of the recommendation item obtained based on the refined ranking model. The model generation unit 620 is specifically configured to obtain a first loss based on the recommendation item score and the recommendation label, wherein the first loss is used to reduce the difference between the viewing result corresponding to the recommendation score and the recommendation label; and obtain a second loss based on the recommendation item score and the refined ranking score, wherein the second loss is used to ensure that the output result of the coarse ranking model is consistent with the output result of the refined ranking model.

[0112] The initial coarse-separated model is trained based on the first loss and the second loss to obtain a coarse-separated model.

[0113] Optionally, the recommendation network includes a user tower network, a recommendation object tower network and a feature fusion network, and the model generation unit 620 is specifically used to input the user feature into the user tower network to obtain a first reference feature; input the recommendation object feature into the recommendation object tower network to obtain a second reference feature; and input the first reference feature and the second reference feature into the feature fusion network to obtain the recommendation score.

[0114] Among them, as a method, the user tower network includes a user embedding network, a first attention network, and a first fully connected network. The model generation unit 620 is specifically used to input the user features into the user embedding network to obtain a user vector; input the user vector into the first attention network to obtain a user attention feature; and input the user attention feature into the first fully connected network to obtain the first reference feature.

[0115] As a method, the recommendation tower network includes a recommendation embedding network, a second attention network, and a second fully connected network. The model generation unit 620 is specifically used to input the recommendation feature into the recommendation embedding network to obtain a recommendation vector; input the recommendation vector into the second attention network to obtain a recommendation attention feature; and input the recommendation attention feature into the second fully connected network to obtain the second reference feature.

[0116] Optionally, the position feature network includes a position embedding network and a position score network, and the model generation unit 620 is specifically used to input the position feature into the position embedding network to obtain a position vector; and input the position vector into the position score network to obtain the position score.

[0117] See also Figure 10 The present application provides a recommendation device 800, which includes:

[0118] A feature acquisition unit 810 is used to acquire target user features and candidate recommendation features;

[0119] A coarse ranking recommendation score acquisition unit 820 is configured to input the target user characteristics and the candidate recommendation item characteristics into a coarse ranking recommendation model, the coarse ranking recommendation model being obtained based on the coarse ranking model obtained by the above method, and acquire a coarse ranking recommendation score;

[0120] The coarse-rank recommendation obtaining unit 830 is configured to determine the coarse-rank recommendation corresponding to the target user based on the coarse-rank recommendation score.

[0121] The following will be combined Figure 11 An electronic device provided by this application is described.

[0122] See also Figure 11 Based on the above-mentioned model generation method, recommendation method, and apparatus, the embodiments of the present application further provide another electronic device 100 that can execute the above-mentioned model generation method and recommendation method. The electronic device 100 includes one or more (only one is shown in the figure) processors 102 and a memory 104 coupled to each other. The memory 104 stores a program that can execute the content of the above-mentioned embodiments, and the processor 102 can execute the program stored in the memory 104.

[0123] The processor 102 may include one or more processing cores. The processor 102 utilizes various interfaces and circuits to connect various components within the electronic device 100. It executes instructions, programs, code sets, or instruction sets stored in the memory 104, and accesses data stored in the memory 104 to perform various functions and process data within the electronic device 100. Optionally, the processor 102 may be implemented using at least one of the following hardware forms: a digital signal processing (DSP), a field-programmable gate array (FPGA), or a programmable logic array (PLA). The processor 102 may integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. The CPU primarily processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem handles wireless communications. It is understood that the modem may not be integrated into the processor 102 and may be implemented separately via a communication chip.

[0124] The memory 104 may include a random access memory (RAM) or a read-only memory (ROM). The memory 104 may be used to store instructions, programs, codes, code sets, or instruction sets. The memory 104 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data created by the terminal 100 during use (such as a phone book, audio and video data, chat history data), etc.

[0125] Please refer to Figure 12 , which shows a block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable storage medium 1000 stores program code, which can be called by a processor to execute the method described in the above method embodiment.

[0126] The computer-readable storage medium 1000 can be an electronic memory such as a flash memory, an EEPROM (Electrically Erasable Programmable Read-Only Memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 1000 includes a non-transitory computer-readable storage medium. The computer-readable storage medium 1000 has storage space for program code 1010 for executing any of the method steps described above. These program codes can be read from or written to one or more computer program products. The program code 1010 can be compressed, for example, in a suitable form.

[0127] In summary, the present application provides a model generation method, recommendation method, device, and electronic device. After acquiring training data including user features, recommended item features corresponding to the user features, and positional features representing the display locations of the recommended items corresponding to the recommended item features, the model generation method, recommendation method, device, and electronic device train an initial coarse ranking model based on the training data to obtain a coarse ranking model. This allows the initial coarse ranking model to be trained using user features, recommended item features corresponding to the user features, and positional features representing the display locations of the recommended items, thereby taking into account the impact of the display locations of the recommended items on user selection results, thereby improving the recommendation accuracy of the coarse ranking model.

[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A model generation method, characterized in that: The method comprises: Acquire training data, the training data including user features, recommended item features corresponding to the user features, and location features corresponding to the recommended item features, wherein the location features represent the display location of the recommended item. The training data also includes tags corresponding to the recommended item features, wherein the tags include a recommendation tag and a refined ranking score, wherein the recommendation tag represents whether the corresponding recommended item has been clicked, and the refined ranking score represents the degree of recommendation of the recommended item obtained based on the refined ranking model. Inputting the position feature into the position feature network of the initial coarse ranking model to obtain a position score, wherein the position score represents the probability that the display position corresponding to the recommendation item is viewed; Inputting the user characteristics and the recommended item characteristics into the recommendation network of the initial coarse ranking model to obtain a recommendation score, wherein the recommendation score represents the degree of correlation between the recommended item characteristics corresponding to the recommended item and the user characteristics; Obtaining a recommendation score based on the location score and the recommendation score, wherein the recommendation score represents a degree of recommendation corresponding to the recommendation; Obtaining a first loss based on the recommendation score and the recommendation tag, wherein the first loss is used to reduce the difference between the viewing result corresponding to the recommendation score and the recommendation tag; obtaining a second loss based on the recommendation score and the refined ranking score, wherein the second loss is used to make an output result of the coarse ranking model consistent with an output result of the refined ranking model; The position feature network and the recommendation network of the initial coarse ranking model are trained based on the first loss and the second loss to obtain a coarse ranking model.

2. The method according to claim 1, characterized in that The recommendation network includes a user tower network, a recommendation item tower network, and a feature fusion network. Inputting the user features and the recommendation item features into the recommendation network of the initial coarse ranking model to obtain a recommendation score includes: Inputting the user characteristics into the user tower network to obtain a first reference characteristic; Inputting the recommendation feature into the recommendation tower network to obtain a second reference feature; The first reference feature and the second reference feature are input into the feature fusion network to obtain the recommendation score.

3. The method according to claim 2, characterized in that The user tower network includes a user embedding network, a first attention network, and a first fully connected network. Inputting the user feature into the user tower network to obtain a first reference feature includes: Inputting the user features into the user embedding network to obtain a user vector; Inputting the user vector into the first attention network to obtain a user attention feature; The user attention feature is input into the first fully connected network to obtain the first reference feature.

4. The method according to claim 2, characterized in that The recommendation object tower network includes a recommendation object embedding network, a second attention network, and a second fully connected network. Inputting the recommendation object feature into the recommendation object tower network to obtain a second reference feature includes: Inputting the recommendation feature into the recommendation embedding network to obtain a recommendation vector; Inputting the recommendation vector into the second attention network to obtain the recommendation attention feature; The recommendation attention feature is input into the second fully connected network to obtain the second reference feature.

5. The method according to claim 1, wherein The position feature network includes a position embedding network and a position score network. Inputting the position feature into the position feature network of the initial coarse sorting model to obtain a position score includes: Inputting the position feature into the position embedding network to obtain a position vector; The position vector is input into the position score network to obtain the position score.

6. A recommendation method, characterized in that: The method comprises: Obtain target user features and candidate recommendation features; Inputting the target user characteristics and the candidate recommendation characteristics into a coarse ranking recommendation model to obtain a coarse ranking recommendation score, wherein the coarse ranking recommendation model is obtained based on the coarse ranking model obtained by the method according to any one of claims 1 to 5; A coarse-rank recommendation corresponding to the target user is determined based on the coarse-rank recommendation score.

7. A model generation device, characterized in that: The device comprises: a training data acquisition unit, configured to acquire training data, the training data including user characteristics, recommendation item characteristics, and location characteristics, the location characteristics representing the display location of the recommendation item; the training data also including labels corresponding to the recommendation item characteristics, the labels including a recommendation label and a refined ranking score, the recommendation label representing whether the corresponding recommendation item has been clicked, and the refined ranking score representing the degree of recommendation of the recommendation item obtained based on the refined ranking model; A model generation unit is configured to input the position feature into a position feature network of an initial coarse ranking model to obtain a position score, wherein the position score represents the probability that the display position corresponding to the recommendation item is viewed; input the user feature and the recommendation item feature into the recommendation network of the initial coarse ranking model to obtain a recommendation score, wherein the recommendation score represents the degree of association between the recommendation item feature corresponding to the recommendation item and the user feature; obtain a recommendation item score based on the position score and the recommendation score, wherein the recommendation item score represents the degree to which the recommendation item is recommended; and obtain a first loss based on the recommendation item score and the recommendation tag, wherein the first loss is used to reduce the difference between the viewing result corresponding to the recommendation score and the recommendation tag; Based on the recommendation score and the fine ranking score, a second loss is obtained, and the second loss is used to make the output result of the coarse ranking model consistent with the output result of the fine ranking model; based on the first loss and the second loss, the position feature network and the recommendation network of the initial coarse ranking model are trained to obtain a coarse ranking model.

8. A recommendation device, characterized in that: The device comprises: A feature acquisition unit, used to acquire target user features and candidate recommendation features; a coarse ranking recommendation score acquisition unit, configured to input the target user characteristics and candidate recommendation item characteristics into a coarse ranking recommendation model to acquire a coarse ranking recommendation score, wherein the coarse ranking recommendation model is obtained based on the coarse ranking model obtained by the method according to any one of claims 1 to 5; A coarse-rank recommendation obtaining unit is configured to determine a coarse-rank recommendation corresponding to the target user based on the coarse-rank recommendation score.

9. An electronic device, characterized in that: including one or more processors and memory; One or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores program code, wherein when the program code is run, the method according to any one of claims 1 to 6 is executed.

Citation Information

Patent Citations

  • Resource recommendation method and device

    CN111143686A

  • Prediction model training method and device and information recommendation method and device

    CN114117202A