A method and apparatus for predicting a click rate of a recommended target
By using a sliding window to segment and model multiple interests in the user's historical behavior sequence, user interest features are explicitly extracted, which solves the misleading problem of implicit modeling methods and achieves more accurate click-through rate prediction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-15
- Publication Date
- 2026-03-27
AI Technical Summary
Existing implicit multi-interest modeling methods have high requirements for training samples, are easily misled, resulting in inaccurate click-through rate predictions, and cannot extract user interest features from multiple perspectives.
By dividing the user's historical behavior sequence into sliding windows of different sizes, the user's interest features are explicitly extracted using the multi-interest modeling module. Combined with the attention module and the fusion module, the click-through rate of the recommendation target is determined.
It improves the accuracy of click-through rate prediction, reduces the impact of misleading training samples, and increases the interpretability of the model.
Smart Images

Figure CN114756750B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of recommendation technology, and in particular to a method and apparatus for predicting the click-through rate of a recommendation target. Background Technology
[0002] Some business platforms proactively display recommendations of services, products, and service providers that users might be interested in, based on user interests. Alternatively, they passively display relevant recommendations when users search.
[0003] Typically, business platforms predict the click-through rate of users towards recommended targets and make recommendations based on this rate. The accuracy of these recommendations is affected by the accuracy of the modeling of user interests.
[0004] Currently, implicit multi-interest modeling methods are commonly used. Based on a user's historical behavior sequence, a feature representing the user's interest is obtained for each attention head through a multi-head attention mechanism.
[0005] However, implicit multi-interest modeling methods have high requirements for training samples and are easily misled by some training samples. Furthermore, because it is impossible to determine which parts of the behavioral sequence each attention head outputs features based on, or which part of the behavioral sequence it represents, it is difficult to detect situations where the training samples mislead the user, and even more difficult to make targeted adjustments. This results in inaccurate click-through rates predicted by features obtained using this method. Summary of the Invention
[0006] This specification provides a method and apparatus for predicting the click-through rate of recommended targets, in order to partially solve the aforementioned problems existing in the prior art.
[0007] The following technical solution is adopted in this specification:
[0008] This specification provides a method for predicting the click-through rate of a recommendation target, including:
[0009] Input the target user's historical behavior sequence into the encoding module of a pre-trained prediction model to obtain behavior sequence features;
[0010] The prediction model's partitioning module divides the behavioral sequence features into several sub-features for each preset type of sliding window; each sliding window is determined by statistically analyzing the historical behavior of each user based on different preset statistical indicators.
[0011] The sub-features of this type of sliding window and the target features corresponding to the recommendation target are input into the multi-interest modeling module of the prediction model to determine the interest features corresponding to this type of sliding window, and based on the interest features corresponding to each type of sliding window, the fused interest features are determined.
[0012] Based on the fused interest features, the click-through rate of the target user for the recommended target is determined through the output module of the prediction model.
[0013] Optionally, the statistical indicators include at least one of the following: statistical indicators based on duration, statistical indicators based on user behavior categories, and statistical indicators based on the category of the target corresponding to the user behavior.
[0014] Optionally, each sliding window is determined based on different preset statistical indicators of each user's historical behavior, specifically including:
[0015] For each statistical indicator, based on that indicator, determine the cumulative number of historical actions each user has taken towards each target within the corresponding time period.
[0016] Use the median of the cumulative number of historical behaviors as the window size;
[0017] Based on the window size, determine the sliding window corresponding to the statistical indicator.
[0018] Optionally, the multi-interest modeling module of the prediction model includes: an attention module and a fusion module;
[0019] The sub-features of this type of sliding window and the target features corresponding to the recommendation target are input into the multi-interest modeling module of the prediction model to determine the interest features corresponding to this type of sliding window, specifically including:
[0020] For each sub-feature of this type of sliding window, the sub-feature and the target feature corresponding to the recommendation target are input into the attention module to determine the interest sub-feature corresponding to the sub-feature;
[0021] Based on each interest sub-feature and weight matrix, the interest features corresponding to this type of sliding window are determined through the fusion module.
[0022] Optionally, the attention module includes a first attention module and a second attention module;
[0023] The sub-feature and the target feature corresponding to the recommendation target are input into the attention module to determine the interest sub-feature corresponding to the sub-feature, specifically including:
[0024] Based on the sub-feature and the target feature corresponding to the recommendation target, the attention weight between the sub-feature and the target feature is determined by the first attention module;
[0025] Based on the attention weight and the sub-feature, the interest sub-feature corresponding to the sub-feature is determined by the second attention module.
[0026] Optionally, based on the fused interest features, the click-through rate of the target user for the recommended target is determined through the output module of the prediction model, specifically including:
[0027] Based on other factors influencing click-through rate, other influencing features are determined through other coding modules of the prediction model;
[0028] The output module of the prediction model concatenates the fused interest features and other influencing features to obtain a comprehensive feature, and determines the click-through rate of the target user for the recommended target based on the comprehensive feature.
[0029] Optionally, based on the interest features corresponding to various sliding windows, fused interest features are determined, specifically including:
[0030] The interest features corresponding to various sliding windows are concatenated with the preset zero vector to obtain aggregated features;
[0031] The aggregation weights are determined based on the aggregation features, and the aggregation features are weighted according to the aggregation weights to obtain the fused interest features.
[0032] This specification provides an apparatus for predicting the click-through rate of a recommended target, comprising:
[0033] The input module is used to input the target user's historical behavior sequence into the encoding module of the pre-trained prediction model to obtain behavior sequence features;
[0034] The splitting module is used to divide the behavioral sequence features into several sub-features for each type of sliding window, based on the segmentation module of the prediction model; each sliding window is determined by statistically analyzing the historical behavior of each user according to different preset statistical indicators.
[0035] The interest fusion module is used to input the sub-features of each type of sliding window and the target features corresponding to the recommendation target into the multi-interest modeling module of the prediction model, determine the interest features corresponding to the type of sliding window, and determine the fused interest features based on the interest features corresponding to each type of sliding window.
[0036] The click-through rate determination module is used to determine the click-through rate of the target user for the recommended target based on the fused interest features and through the output module of the prediction model.
[0037] This specification provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for predicting the click-through rate of a recommendation target.
[0038] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the above-described method for predicting the click-through rate of a recommended target.
[0039] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:
[0040] In the method for predicting the click-through rate of a recommended target provided in this specification, various sliding windows are determined by statistically analyzing the historical behavior of each user according to different preset statistical indicators. The behavioral sequence features corresponding to the historical behavior sequence of the target user are divided into several sub-features. For each type of sliding window, the sub-features of the sliding window and the target features corresponding to the recommended target are input into the multi-interest modeling module of the prediction model to determine the interest features corresponding to the sliding window. Based on the interest features corresponding to various sliding windows, the fused interest features are determined. Based on the fused interest features, the click-through rate of the target user for the recommended target is determined through the output module of the prediction model.
[0041] As can be seen from the above method, this method can divide behavioral sequence features into sub-features of different granularities through different sliding windows, and explicitly extract features representing the interests of target users from different perspectives based on each sub-feature. It is not easily misled by training samples and can more accurately predict the click-through rate of the recommended target. Attached Figure Description
[0042] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:
[0043] Figure 1 This is a flowchart illustrating a method for predicting the click-through rate of a recommended target as described in this specification.
[0044] Figure 2 A schematic diagram of a prediction model provided in this specification;
[0045] Figure 3 This is a schematic diagram of a multi-interest modeling module provided in this specification;
[0046] Figure 4 A schematic diagram of an attention module provided in this specification;
[0047] Figure 5A schematic diagram of an aggregation module provided in this specification;
[0048] Figure 6 A schematic diagram of a prediction model provided in this specification;
[0049] Figure 7 A schematic diagram of a device for predicting the click-through rate of a recommended target, as provided in this specification;
[0050] Figure 8 This is a schematic diagram of the structure of an electronic device provided in this specification. Detailed Implementation
[0051] User historical behavior data can reflect user interests and provide business platforms with a basis for predicting user interests and making targeted recommendations. This allows business platforms to proactively display targets that users might be interested in (such as businesses, products, service providers, etc.) as recommendation targets based on user interests. Alternatively, relevant recommendation targets can be passively displayed to users when they search.
[0052] User historical behavior data reflects user interests that are not singular and change over time; user interests may differ at different times. Furthermore, the number of user actions varies across different time periods (sessions), and different numbers of actions reflect different user interests.
[0053] Typically, business platforms predict the click-through rate (CTR) of recommended targets and make recommendations based on this CTR. For example, they might rank recommended targets based on CTR and then display them to users according to the ranking.
[0054] The accuracy of the click-through rate (CTR) of the recommended target affects the recommendation effect, and the accuracy of the CTR is affected by the accuracy of the modeling of user interests based on the user's historical behavior data.
[0055] Currently, implicit multi-interest modeling methods are commonly used. Based on a user's historical behavior sequence, a multi-head attention mechanism is employed to obtain a feature representing the user's interest for each attention head, with features from different attention heads representing different user interests. The historical behavior sequence is the sequence of targets formed by the user's past behaviors.
[0056] However, this method is implicit modeling, which has weak interpretability and high requirements for training samples, making it susceptible to being misled by some training samples. For example, when multiple identical targets exist in the behavioral sequence of the training samples, the target may be the one that the user is more interested in from a long-term perspective, but not necessarily from a short-term perspective. Because this implicit modeling method can only extract features representing different interests from the perspective of the entire historical behavioral sequence, it cannot extract features from a local perspective, that is, it cannot extract features from multiple perspectives. Therefore, the features obtained based on the historical behavioral sequence are easily interfered with and misled by repeated targets, making the features inaccurate in representing user interests.
[0057] Furthermore, since this implicit modeling method cannot determine which parts of the behavioral sequence the features output by each attention head are based on, or which part of the behavioral sequence it represents, it is difficult to detect situations where the training samples mislead the user, and it is even more impossible to make targeted adjustments.
[0058] Explicit multi-interest modeling methods offer higher interpretability and are less susceptible to misleading or interference from training samples due to explicit modeling. However, if each sequence (e.g., long and short sequences) is encoded by a separate encoder, the computational complexity becomes high.
[0059] Therefore, in the method for predicting the click-through rate of recommended targets provided in this specification, to reduce computational complexity, a prediction model including a multi-interest modeling module is used to extract features based on only one historical behavior sequence to model different user interests. Furthermore, to model user interests from different perspectives and obtain multiple features representing different user interests, this specification uses sliding windows of different sizes to divide the sequence into multiple sub-sequences with not entirely identical granularity. This allows for explicit multi-interest modeling based on each sub-sequence, increases interpretability, avoids being misled by training samples, and more accurately determines the click-through rate of recommended targets.
[0060] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0061] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0062] Figure 1 This is a flowchart illustrating a method for predicting the click-through rate of a recommended target as described in this specification, specifically including the following steps:
[0063] S100: Input the target user's historical behavior sequence into the encoding module of the pre-trained prediction model to obtain behavior sequence features.
[0064] In this specification, the method for predicting the click-through rate of a recommendation target can be executed by the server of a business platform that provides recommendation services, and the method for predicting the click-through rate of a recommendation target can be used in a recommendation system.
[0065] In one or more embodiments of this specification, when predicting the click-through rate of a recommended target, the server can first input the historical behavior sequence of the target user into the encoding module of a pre-trained prediction model to obtain behavior sequence features.
[0066] The historical behavior sequence can be a sequence of targets corresponding to the user's historical behaviors. For example, it could be a sequence of targets clicked by the user in the past. Each target in this historical behavior sequence can correspond to different attributes, and the behavior sequence features determined based on the historical behavior sequence contain encoded information about these attributes.
[0067] Of course, there are no restrictions on the attributes of the target; they can be set as needed, as long as they are attributes that help identify user interests. For example, a target's attributes may include: target identifier, such as a merchant's unique identity document (ID) on the business platform. Target attributes may also include: target category, brand, geographical location, etc., such as geographical location which can be represented by a hash geohash.
[0068] It should be noted that there are no restrictions on the attribute representation format of the target in the historical behavior sequence. For example, it can be in numerical form. Concatenating the numerical representations of several attributes corresponding to a target yields a numerical representation of that target. Multiple numerical representations of targets constitute the historical behavior sequence. Furthermore, there are no restrictions on the time length corresponding to the historical behavior sequence. Therefore, the historical behavior sequence can be either a long-term or short-term sequence.
[0069] For example, since the behavioral sequence features corresponding to the historical behavioral sequence are divided into several sub-features from different perspectives through a sliding window in this application, the historical behavioral sequence can be a long-term sequence in order to take into account both the user's long-term and short-term interests.
[0070] Furthermore, the term "click" as used in this instruction manual does not refer to a simple click operation; actions such as adding to favorites, placing orders, and commenting also fall under the category of click operations. The click-through rate mentioned later is not limited to the click-through rate corresponding to a simple click operation; it can also refer to the click-through rate corresponding to one of multiple operations such as adding to favorites, placing orders, and commenting.
[0071] S102: Through the partitioning module of the prediction model, for each type of preset sliding window, the behavior sequence feature is divided into several sub-features; each sliding window is determined by statistically analyzing the historical behavior of each user according to different preset statistical indicators.
[0072] After determining the behavioral sequence features corresponding to the historical behavioral sequence, the server can use the partitioning module of the prediction model to divide the behavioral sequence features into several sub-features for each type of sliding window.
[0073] The various sliding windows are determined by statistically analyzing each user's historical behavior based on different preset statistical indicators. Statistical indicators are metrics used to obtain statistical data from different perspectives. Statistical data is the set of cumulative historical behavior counts for each user within the corresponding time period, determined by the statistical indicators.
[0074] In one or more embodiments of this specification, the statistical indicators used to determine the sliding window include at least one of the following: statistical indicators based on duration, statistical indicators based on user behavior categories, and statistical indicators based on the category of the target corresponding to the user behavior.
[0075] For example, duration-based statistical indicators only restrict the statistical duration, without restricting the category of user behavior or the category of the corresponding target. User behavior category-based statistical indicators, in addition to restricting the statistical duration, also restrict the category to which the user's behavior belongs. Similarly, user behavior-category-based statistical indicators, in addition to restricting the statistical duration, also restrict the category of the target corresponding to the user behavior.
[0076] For example, statistical indicator 'a' based on duration is: user behaviors within 12 hours. Then, statistical analysis based on indicator 'a' can determine the cumulative historical number of actions taken by each user towards each target within the historical 12 hours, including various actions (such as clicking only, clicking to favorite, clicking to place an order, etc.). Assuming statistical indicator 'b' based on user behavior category is: user click-only behavior within a day, then statistical indicator 'b' can determine the cumulative number of clicks taken by each user towards each target within a historical day, which is the cumulative historical number of actions. Assuming statistical indicator 'c' based on the category of user behavior corresponding to the target is: user click behavior towards merchants of a specific category within 12 hours, then statistical indicator 'c' can determine the cumulative historical number of actions taken by each user who clicked on merchants belonging to a specific category within the historical 12 hours, for each merchant.
[0077] It should be noted that the duration corresponding to the statistical indicators is shorter than the duration corresponding to the historical behavior sequence. There is no limit to the number of indicators corresponding to each statistical indicator used to determine the sliding window. Furthermore, when this specification mentions "click," it does not specifically refer to any particular type of behavior; it can be a simple click, a click to favorite, a click to place an order, a click to comment, etc. When "click only" is mentioned, it refers only to a simple click.
[0078] In one or more embodiments of this specification, when determining each sliding window based on preset statistical indicators, specifically, the server can, for each statistical indicator, determine the cumulative number of historical actions of each user towards each target within the time period corresponding to that statistical indicator. The median of the determined cumulative number of historical actions is then used as the window size, and the sliding window corresponding to that statistical indicator is determined based on that window size.
[0079] That is, the size of the sliding window is determined based on the cumulative number of historical user actions on each target obtained from statistics.
[0080] Of course, using the median of the determined cumulative historical behavior count as the window size is just one example, not a limitation. For example, the mode of the cumulative historical behavior count can also be chosen as the window size.
[0081] S104: Input the sub-features of this type of sliding window and the target features corresponding to the recommendation target into the multi-interest modeling module of the prediction model to determine the interest features corresponding to this type of sliding window, and determine the fused interest features based on the interest features corresponding to each type of sliding window.
[0082] In one or more embodiments of this specification, after determining each sub-feature based on each type of sliding window, the server can input each sub-feature of the sliding window and the target feature corresponding to the recommendation target into the multi-interest modeling module of the prediction model to determine the interest features corresponding to the sliding window, and determine the fused interest features based on the interest features corresponding to each type of sliding window.
[0083] Here, the recommendation target refers to the pre-determined target that needs to be recommended to the user. For example, when a user searches for products using keywords, each product identified based on those keywords can serve as a recommendation target. Alternatively, targets that the user might be interested in and are proactively recommended to them can also be recommendation targets.
[0084] It should be noted that this instruction manual is based on a single recommended target, or it can be considered as a prediction of the click-through rate for each recommended target when there are multiple recommended targets.
[0085] In one or more embodiments of this specification, the multi-interest modeling module of the prediction model may include an attention module and a fusion module.
[0086] When determining the interest features corresponding to each type of sliding window, the server can input the sub-feature and the target feature corresponding to the recommendation target into the attention module for each sub-feature of the sliding window to determine the interest sub-feature corresponding to the sub-feature. Based on each interest sub-feature and the weight matrix, the server can determine the interest features corresponding to the sliding window through the fusion module.
[0087] Specifically, the server can concatenate the various interest sub-features to obtain window interest features, and based on these window interest features, the fusion module can weight these window interest features according to the weight matrix to obtain the interest features corresponding to the sliding window.
[0088] The weight matrix is the parameter of the prediction model, which is obtained by training the prediction model in advance.
[0089] S106: Based on the fused interest features, the click-through rate of the target user for the recommended target is determined through the output module of the prediction model.
[0090] In one or more embodiments of this specification, the server can determine the click-through rate of the recommended target based on the fused interest features and through the output module of the prediction model.
[0091] based on Figure 1 The method for predicting the click-through rate of a recommended target, as shown, involves statistically determining various sliding windows based on different preset statistical indicators of each user's historical behavior. The behavioral sequence features corresponding to the target user's historical behavior sequence are divided into several sub-features. For each type of sliding window, the sub-features of that sliding window and the target features corresponding to the recommended target are input into the multi-interest modeling module of the prediction model to determine the interest features corresponding to that type of sliding window. Based on the interest features corresponding to various sliding windows, a fused interest feature is determined. Then, based on the fused interest feature, the click-through rate of the target user for the recommended target is determined through the output module of the prediction model.
[0092] As can be seen from the above method, this method can divide behavioral sequence features into sub-features of different granularities through different sliding windows, and explicitly extract features representing the interests of target users from different perspectives based on each sub-feature. It is not easily misled by training samples and can more accurately predict the click-through rate of the recommended target.
[0093] For ease of understanding, this manual provides a schematic diagram of the prediction model. For example... Figure 2 As shown.
[0094] Figure 2 This diagram illustrates a prediction model provided in this specification. As shown, the prediction model includes an encoding module, a segmentation module, a multi-interest modeling module, and an output module. The multi-interest modeling module further includes an attention module and a fusion module. Inputting historical behavior sequences into the encoding module of this prediction model yields behavior sequence features. Inputting these features into the segmentation module allows the behavior sequence features to be divided into sub-features based on various sliding windows. Inputting these sub-features into the multi-interest modeling module outputs fused interest features. Inputting these fused interest features into the output module determines the click-through rate of the recommended target.
[0095] The number of attention modules corresponds to the number of sub-features. Figure 2 Only two attention modules are shown. Furthermore, the number of fusion modules corresponds to the number of sliding windows. Figure 2 The example shown uses only one type of sliding window. For each sub-feature, the sub-feature and the target feature of the recommendation target are input into an attention module to obtain an interest sub-feature. Different sub-features are input into different attention modules.
[0096] In one or more embodiments of this specification, the multi-interest modeling module may further include an aggregation module. By inputting the interest features corresponding to various sliding windows into the aggregation module, the fused interest features can be determined.
[0097] The structure of this multi-interest modeling module can be as follows: Figure 3 As shown.
[0098] Figure 3 This is a schematic diagram of a multi-interest modeling module provided in this specification. Figure 3 The following example uses two sliding windows (of different types) for demonstration and explanation. Figure 3 The sequence of circles at the bottom represents the behavioral sequence features. It can be seen that... Figure 3 The partially overlapping set of rectangles at the bottom left represents a sliding window, showing the two sliding windows before and after the movement. The direction indicated by the dashed arrows indicates the direction of movement of the sliding window. Figure 3 The bottom right side shows a sliding window with a different size before and after the movement. It can be seen that sliding windows of different sizes can divide behavioral sequence features into sub-features of different sizes. It should be noted that... Figure 3 For ease of explanation only, a behavioral sequence feature is presented in... Figure 3 The bottom left and right sides are shown separately. The behavioral sequence features on both sides are not two separate behavioral sequence features, but rather the same behavioral sequence feature. Figure 3 The target feature in the image is the same target feature. Furthermore, Figure 3The difference in height between the sliding window before and after the movement is solely for ease of display and differentiation. In reality, moving the sliding window only alters the portion of the behavior sequence features that can be horizontally framed by the sliding window. Similarly, the size difference of the sliding window corresponding to different window sizes in this specification is only in the horizontal (width) dimension.
[0099] based on Figure 4 The multi-interest modeling module shown inputs each sub-feature and the target feature of the recommendation objective into the corresponding attention module to obtain the interest sub-features output by each attention module. For each type of sliding window, the interest sub-features corresponding to that type of sliding window are input into the corresponding fusion module to obtain the interest features corresponding to that sliding window. Then, the interest features corresponding to all types of sliding windows are input into the aggregation module to obtain the fused interest features.
[0100] In one or more embodiments of this specification, the attention module may include a first attention module and a second attention module. In step S104 of this specification, the server may determine the attention weight between the sub-feature and the target feature corresponding to the recommendation target through the first attention module, and determine the interest sub-feature corresponding to the sub-feature through the second attention module based on the attention weight and the sub-feature.
[0101] Figure 5 This is a schematic diagram of an attention module provided in this specification. As shown in the figure, the sub-feature and the target feature are input into the first attention module to obtain the attention weight. The attention weight is then used as the weight of the sub-feature and input together with the sub-feature into the second attention module to obtain the interest sub-feature corresponding to the sub-feature.
[0102] In addition, in one or more embodiments provided in this specification, when determining the fused interest features based on the interest features corresponding to each sliding window in step S104, the fused interest features can be determined based on two methods.
[0103] One approach involves directly concatenating the interest features corresponding to each sliding window to obtain fused interest features.
[0104] In another approach, the interest features corresponding to various sliding windows can be concatenated with a preset zero vector to obtain aggregated features. Then, aggregation weights are determined based on the aggregated features, and the aggregated features are weighted according to these weights to obtain fused interest features. The structure of the aggregation module in the multi-interest modeling module can then be as follows: Figure 5 As shown.
[0105] Figure 6This diagram illustrates an aggregation module provided in this specification. As shown, the aggregation module includes a first aggregation module and a second aggregation module. The interest features indicated by curly braces are the concatenated interest features corresponding to various sliding windows. By concatenating the interest features corresponding to various sliding windows together with the zero vector and inputting the result into the first aggregation module, the aggregation features can be determined. Then, by inputting the aggregation features into the first aggregation module, the aggregation weights output by the first aggregation module can be obtained. After inputting the aggregation weights and aggregation features into the second aggregation module, the aggregation features are weighted based on the aggregation weights, resulting in the fused interest features output by the second aggregation module.
[0106] In zero-vector-based methods, noise can be eliminated by using the zero vector. Without adding a zero vector, the prediction model would be forced to focus on at least one historical user behavior to determine the click-through rate (CTR) of the recommendation target. This introduces noise when the user's historical behavior sequence is irrelevant to the current recommendation target, hindering accurate CTR prediction. Therefore, methods that determine fused interest features based on zero vectors can reduce noise and improve the accuracy of CTR prediction for the recommendation target.
[0107] It should be noted that if there is no limit to the step size of the sliding window, then in step S102 of this specification, the partial behavioral sequence features corresponding to adjacent sub-features determined based on the sliding window may or may not overlap.
[0108] In one or more embodiments of this specification, assuming the size of the sliding window A is w, the step size of moving the sliding window A is s, and the length of the behavioral sequence feature is n, then k sub-features can be obtained based on the sliding window A. The determination of K satisfies the following formula:
[0109]
[0110] If the behavioral sequence features are features of dimension n×d, then the sub-features f∈R obtained based on the sliding window A partition are... w×d That is, the sub-features are w×d features.
[0111] In step S104, the sub-features identified by the attention module have a dimension of d. Therefore, sliding window A corresponds to k 1×d dimensional interest sub-features, and the window interest features obtained based on these sub-features have a dimension of k×d. After weighting the window interest features using a 1×k weight matrix, the 1×d dimensional interest features corresponding to sliding window A are obtained.
[0112] In the embodiment where the interest features corresponding to each sliding window are concatenated to obtain the fused interest feature, the dimension of the final concatenated fused interest feature is 1×md. m represents the number of sliding windows determined based on different window sizes, which is also the number of fused interest features.
[0113] In the embodiment of determining the fused interest features based on the zero vector and the interest features corresponding to each sliding window, the dimension of the final fused interest features is 1×d.
[0114] In addition, besides the features representing user interests determined based on the user's historical behavior sequence affecting the click-through rate of recommended targets, there are other influencing factors that can also affect the click-through rate of recommended targets.
[0115] Therefore, in step S106, the server can further determine the click-through rate (CTR) of the recommended target based on other influencing factors and the fused interest feature. Specifically, the server can determine other influencing features based on other influencing factors of the CTR through other encoding modules of the prediction model. Then, through the output module of the prediction model, the fused interest feature and the other influencing features are concatenated to obtain a comprehensive feature, and the CTR of the target user for the recommended target is determined based on this comprehensive feature.
[0116] In one or more embodiments of this specification, other influencing factors can be set as needed. For example, in a food delivery scenario, the recommended target can be a food delivery merchant. Other factors affecting the user's click-through rate on food delivery merchants may include: distance factors, weather factors, user characteristics (such as age, occupation, etc.). In other scenarios, the location characteristics of the recommended target may also be included. For example, when a user searches for a store to dine in, even if the recommended target is not far away, a remote location may still affect the user's click-through rate on that store.
[0117] Therefore, in one or more embodiments of this specification, the server can determine other influencing features based at least on one or more combinations of weather features, user features, location features of the recommended target, and location features of the user, through other coding modules of the prediction model.
[0118] In one or more embodiments of this specification, other encoding modules of the prediction model can also be embedding modules. Furthermore, the encoding modules of the prediction model may include a first encoding module and a second encoding module. After inputting the historical behavior sequence into the first encoding module for preliminary encoding, initial behavior sequence features can be obtained. After inputting the initial behavior sequence features into the second encoding module, behavior sequence features corresponding to the historical behavior sequence can be obtained. The first encoding module can be an embedding module. The second encoding module can be an encoding module capable of analyzing context, such as a transformer module.
[0119] In addition, both the first aggregation module and the first attention module of the prediction model can be deep neural networks (DNNs).
[0120] Furthermore, in one or more embodiments of this specification, the output module of the prediction model may include a first output module and a second output module. The first output module is used to concatenate the fused interest features output by the multi-interest modeling module with other influence features output by other encoding modules to obtain a comprehensive feature. The second output module is then used to determine the click-through rate based on the comprehensive feature. The second output module may be a multilayer perceptron (MLP).
[0121] Then, the structure of the prediction model can be as follows: Figure 6 As shown.
[0122] Figure 7 This is a schematic diagram of a prediction model provided in this specification. As can be seen, the prediction model includes an encoding module, other encoding modules, a partitioning module, a multi-interest modeling module, and an output module. The encoding module includes a first encoding module and a second encoding module. The output module includes a first output module and a second output module.
[0123] In one or more embodiments of this specification, when training the prediction model, for each acquired historical behavior sequence, the historical behavior sequence and a recommended target can be used as training samples, and the historical click-through rate of the recommended target can be used as the label of the training sample. After inputting the training sample into the prediction model to be trained, the click-through rate output by the prediction model is obtained. Then, based on the difference between the label of the training sample and the click-through rate output by the prediction model corresponding to the training sample, the parameters of the prediction model can be adjusted to train the prediction model.
[0124] In one or more embodiments of this specification, whether the user clicks on the recommended target may also be used as a label for the training sample.
[0125] Of course, when training the prediction model, for each historical behavior sequence, the historical behavior sequence, a recommendation target, and other influencing factors can also be used as training samples.
[0126] It should be noted that, since the interest features to be fused can be determined in two ways in this specification, namely, the concatenation-based method and the zero-vector-based method, the prediction model can be designed and trained accordingly.
[0127] Furthermore, the modules that make up the prediction model are trained together.
[0128] The above describes a method for predicting the click-through rate of a recommended target, provided by one or more embodiments of this specification. Based on the same idea, this specification also provides a corresponding apparatus for predicting the click-through rate of a recommended target, such as... Figure 7 As shown.
[0129] Figure 1 This specification provides a schematic diagram of an apparatus for predicting the click-through rate of a recommended target. The apparatus includes:
[0130] The input module 200 is used to input the historical behavior sequence of the target user into the encoding module of the pre-trained prediction model to obtain behavior sequence features;
[0131] The splitting module 201 is used to divide the behavioral sequence features into several sub-features through the segmentation module of the prediction model for each preset type of sliding window; each sliding window is determined by statistically analyzing the historical behavior of each user according to different preset statistical indicators.
[0132] The interest fusion module 202 is used to input the sub-features of each type of sliding window and the target features corresponding to the recommendation target into the multi-interest modeling module of the prediction model, determine the interest features corresponding to the type of sliding window, and determine the fused interest features based on the interest features corresponding to each type of sliding window.
[0133] Click-through rate determination module 203 is used to determine the click-through rate of the target user for the recommended target based on the fused interest features and through the output module of the prediction model.
[0134] Optionally, the statistical indicators include at least one of the following: statistical indicators based on duration, statistical indicators based on user behavior categories, and statistical indicators based on the category of the target corresponding to the user behavior.
[0135] Optionally, the device further includes: a window determination module 204, configured to, for each statistical indicator, determine the cumulative number of historical behaviors of each user towards each target within the time period corresponding to the statistical indicator, use the median of the cumulative number of historical behaviors as the window size, and determine the sliding window corresponding to the statistical indicator based on the window size.
[0136] Optionally, the multi-interest modeling module of the prediction model includes an attention module and a fusion module. The interest fusion module 202 is further configured to input the sub-feature and the target feature corresponding to the recommendation target into the attention module for each sub-feature of the sliding window, determine the interest sub-feature corresponding to the sub-feature, and determine the interest feature corresponding to the sliding window based on each interest sub-feature and the weight matrix through the fusion module.
[0137] Optionally, the attention module includes a first attention module and a second attention module. The interest fusion module 202 is further configured to determine the attention weight between the sub-feature and the target feature corresponding to the recommendation target through the first attention module based on the sub-feature and the target feature corresponding to the recommendation target, and to determine the interest sub-feature corresponding to the sub-feature through the second attention module based on the attention weight and the sub-feature.
[0138] Optionally, the click-through rate determination module 203 is further configured to determine other influencing features based on other influencing factors of the click-through rate through other encoding modules of the prediction model, and to concatenate the fused interest features and the other influencing features through the output module of the prediction model to obtain comprehensive features, and to determine the click-through rate of the target user for the recommended target based on the comprehensive features.
[0139] Optionally, the interest fusion module 202 is further configured to concatenate the interest features corresponding to various sliding windows with a preset zero vector to obtain aggregate features, determine the aggregate weights based on the aggregate features, and weight the aggregate features according to the aggregate weights to obtain fused interest features.
[0140] It should be noted that all actions involving the acquisition of signals, information, or data in this manual are carried out in compliance with the relevant data protection laws and regulations of the country where the user is located, and with the authorization of the relevant device owner. This includes the acquisition of the user's historical behavior sequences and the analysis of user interests, all of which are legal and performed with the user's permission.
[0141] Furthermore, the method for predicting the click-through rate (CTR) of recommended targets provided in this specification can be applied to both proactive and passive recommendation scenarios. For example, based on a user's historical behavior data, some targets that the user might be interested in can be proactively displayed as recommended targets, and the CTR of each recommended target can be predicted based on this method. Alternatively, when a user searches, relevant recommended targets can be passively displayed to the user, and the CTR of each recommended target can be predicted.
[0142] In one or more embodiments of this specification, click-through rate (CTR) prediction can be performed in scenarios such as recommending restaurants, food delivery services, movies, advertisements, or guessing users' favorite songs. This is merely an example and not a limitation of this specification.
[0143] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 8 The provided method is to predict the click-through rate of recommended targets.
[0144] This instruction manual also provides Figure 8 The diagram shows the structure of the electronic device. Figure 1 As shown, at the hardware level, this electronic device includes a processor, an internal bus, memory, and non-volatile storage, and may also include other hardware required for business operations. The processor reads the corresponding computer program from the non-volatile storage into memory and then executes it to achieve the above-mentioned functions. Figure 1 The provided method is to predict the click-through rate of recommended targets.
[0145] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0146] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0147] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0148] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0149] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0150] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0151] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0152] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0153] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes The steps of the function specified in one or more boxes.
[0154] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0155] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0156] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0157] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0158] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0159] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0160] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0161] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A method for predicting the click-through rate of a recommended target, characterized in that, include: Input the target user's historical behavior sequence into the encoding module of a pre-trained prediction model to obtain behavior sequence features; The prediction model's partitioning module divides the behavioral sequence features into several sub-features for each preset type of sliding window; each sliding window is determined by statistically analyzing the historical behavior of each user based on different preset statistical indicators. The sub-features of this type of sliding window and the target features corresponding to the recommendation target are input into the multi-interest modeling module of the prediction model to determine the interest features corresponding to this type of sliding window, and based on the interest features corresponding to each type of sliding window, the fused interest features are determined. Based on the fused interest features, the click-through rate of the target user for the recommended target is determined through the output module of the prediction model; the statistical indicators include at least one of the following: statistical indicators based on duration, statistical indicators based on user behavior categories, and statistical indicators based on the category of the target corresponding to the user behavior. Based on the interest features corresponding to various sliding windows, the fused interest features are determined, specifically including: The interest features corresponding to various sliding windows are concatenated with the preset zero vector to obtain aggregated features; The aggregation weights are determined based on the aggregation features, and the aggregation features are weighted according to the aggregation weights to obtain the fused interest features.
2. The method as described in claim 1, characterized in that, Each sliding window is determined based on different preset statistical indicators of each user's historical behavior, specifically including: For each statistical indicator, based on that indicator, determine the cumulative number of historical actions each user has taken towards each target within the corresponding time period. Use the median of the cumulative number of historical behaviors as the window size; Based on the window size, determine the sliding window corresponding to the statistical indicator.
3. The method as described in claim 1, characterized in that, The multi-interest modeling module of the prediction model includes: an attention module and a fusion module; The sub-features of this type of sliding window and the target features corresponding to the recommendation target are input into the multi-interest modeling module of the prediction model to determine the interest features corresponding to this type of sliding window, specifically including: For each sub-feature of this type of sliding window, the sub-feature and the target feature corresponding to the recommendation target are input into the attention module to determine the interest sub-feature corresponding to the sub-feature; Based on each interest sub-feature and weight matrix, the interest features corresponding to this type of sliding window are determined through the fusion module.
4. The method as described in claim 3, characterized in that, The attention module includes a first attention module and a second attention module; The sub-feature and the target feature corresponding to the recommendation target are input into the attention module to determine the interest sub-feature corresponding to the sub-feature, specifically including: Based on the sub-feature and the target feature corresponding to the recommendation target, the attention weight between the sub-feature and the target feature is determined by the first attention module; Based on the attention weight and the sub-feature, the interest sub-feature corresponding to the sub-feature is determined by the second attention module.
5. The method as described in claim 1, characterized in that, Based on the fused interest features, the click-through rate of the target user for the recommended target is determined through the output module of the prediction model, specifically including: Based on other factors influencing click-through rate, other influencing features are determined through other coding modules of the prediction model; The output module of the prediction model concatenates the fused interest features and other influencing features to obtain a comprehensive feature, and determines the click-through rate of the target user for the recommended target based on the comprehensive feature.
6. An apparatus for predicting the click-through rate of a recommended target, characterized in that, include: The input module is used to input the target user's historical behavior sequence into the encoding module of the pre-trained prediction model to obtain behavior sequence features; The splitting module is used to divide the behavioral sequence features into several sub-features for each type of sliding window, based on the segmentation module of the prediction model; each sliding window is determined by statistically analyzing the historical behavior of each user according to different preset statistical indicators. The interest fusion module is used to input the sub-features of each type of sliding window and the target features corresponding to the recommendation target into the multi-interest modeling module of the prediction model, determine the interest features corresponding to the type of sliding window, and determine the fused interest features based on the interest features corresponding to each type of sliding window. The click-through rate determination module is used to determine the click-through rate of the target user for the recommended target based on the fused interest features and through the output module of the prediction model. The statistical indicators include at least one of the following: statistical indicators based on duration, statistical indicators based on user behavior categories, and statistical indicators based on the category of the target corresponding to the user behavior. Based on the interest features corresponding to various sliding windows, the fused interest features are determined, specifically including: The interest features corresponding to various sliding windows are concatenated with the preset zero vector to obtain aggregated features; The aggregation weights are determined based on the aggregation features, and the aggregation features are weighted according to the aggregation weights to obtain the fused interest features.
7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 5.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
User interest preference capturing method
CN112733030A
Click rate prediction method and related device
CN113297486A