A recommendation method and device, electronic equipment and readable storage medium
By combining behavioral sequences, profile features, and purchase features, and using a dual-tower prediction model for feature fusion, the problems of latency and low accuracy in game equipment gift pack recommendations in existing technologies are solved, and real-time personalized recommendations are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-10
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, game equipment and gift pack recommendations are made solely based on player profile features, resulting in low recommendation latency and accuracy, and failing to meet players' personalized needs in real time.
By acquiring the behavioral sequences, profile features, and purchase characteristics of target players, and using a pre-trained dual-tower prediction model to perform feature fusion, the matching degree between target players and candidate recommended gift packs is determined, enabling real-time recommendations.
It improves the accuracy of game equipment pack recommendations, enabling it to promptly meet the personalized needs of target players.
Smart Images

Figure CN116186403B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of internet game technology, and in particular to a recommended method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] During gameplay, game developers typically need to tailor game equipment packs to each player's individual characteristics to assist them in the game. For example, for low-level "newbie" players, they may need to recommend some "early-game" equipment to help them level up quickly. For higher-level "veteran" players, the game developers should provide them with more suitable game equipment based on their operating habits.
[0003] Currently, when recommending game equipment packs to players, only player profile characteristics are used. However, profile characteristics change relatively slowly; for a single player, it may take several days for their profile characteristics to update, and the number of updated characteristics is also limited. For example, if a player's level increases, only the level-related characteristics change. Therefore, relying solely on player profile characteristics to determine recommended game equipment packs cannot provide real-time recommendations, resulting in a delay in equipment recommendations. Furthermore, due to the limitations of profile characteristics, the accuracy of recommended game equipment packs based solely on player profile characteristics is low. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a recommendation method, device, electronic device and readable storage medium that can utilize the behavioral sequence, profile features and purchase characteristics of the target player to determine the target recommendation package suitable for the target player in real time, thereby improving the accuracy of the recommendation results.
[0005] This application provides a recommendation method, which includes:
[0006] The system acquires the target player's behavior sequence, profile features, and purchase features; wherein, the behavior sequence includes game behavior data generated by the target player during gameplay; and the purchase features include game gift pack data generated by the target player purchasing game gift packs at specific points in time.
[0007] Using the left tower model in a pre-trained dual-tower prediction model, the behavioral sequence, the profile features, and the purchase features are fused to determine the behavioral representation data of the target player.
[0008] Based on the behavioral representation data and the gift pack representation data, the recommendation matching degree between the target player and each candidate recommended gift pack is determined; wherein, the gift pack representation data is determined by the right tower model in the dual-tower prediction model; the gift pack representation data includes the product characteristics and price characteristics of each candidate recommended gift pack;
[0009] Based on the matching degree of each candidate recommended gift pack, a target recommended gift pack is determined to be recommended to the target player.
[0010] This application embodiment also provides a recommendation device, the recommendation device comprising:
[0011] The vector acquisition module is used to acquire the target player's behavior sequence, profile features, and purchase features; wherein, the behavior sequence includes game behavior data generated by the target player during the game; the purchase features include game gift pack data generated by the target player purchasing game gift packs at specific points in time;
[0012] The feature fusion module is used to fuse the behavior sequence, the profile features, and the purchase features using the left tower model in the pre-trained dual-tower prediction model to determine the behavioral representation data of the target player.
[0013] The matching degree prediction module is used to determine the recommendation matching degree between the target player and each candidate recommended gift pack based on the behavioral representation data and the gift pack representation data; wherein, the gift pack representation data is determined by the right tower model in the dual-tower prediction model; the gift pack representation data includes the product characteristics and price characteristics of each candidate recommended gift pack;
[0014] The gift pack recommendation module is used to determine the target recommended gift pack to the target player based on the recommendation matching degree of each candidate recommended gift pack.
[0015] This application also provides an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. When the machine-readable instructions are executed by the processor, the steps of the recommended method described above are performed.
[0016] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the steps of the recommended method described above.
[0017] The recommendation method, apparatus, electronic device, and readable storage medium provided in this application embodiment acquire the behavioral sequence, profile features, and purchase features of a target player; utilize the left tower model of a pre-trained dual-tower prediction model to fuse the behavioral sequence, profile features, and purchase features to determine the behavioral representation data of the target player; based on the behavioral representation data and gift package representation data, determine the recommendation matching degree between the target player and each candidate recommended gift package; wherein, the gift package representation data is determined by the right tower model of the dual-tower prediction model; the gift package representation data includes the product features and price features of each candidate recommended gift package; and based on the recommendation matching degree of each candidate recommended gift package, determine the target recommended gift package to be recommended to the target player. In this way, by utilizing the behavioral sequence, profile features, and purchase features of the target player, suitable target recommended gift packages can be determined in real time, improving the accuracy of the recommendation results.
[0018] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A flowchart illustrating a recommended method provided in an embodiment of this application;
[0021] Figure 2 This is a schematic diagram of the structure of the first filtering module provided in the embodiments of this application;
[0022] Figure 3 This is a schematic diagram of a feature fusion layer structure provided in an embodiment of this application;
[0023] Figure 4 This is one of the structural schematic diagrams of a recommended device provided in the embodiments of this application;
[0024] Figure 5 This is a second schematic diagram of a recommended device provided in an embodiment of this application;
[0025] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. Based on the embodiments of this application, every other embodiment obtained by those skilled in the art without inventive effort falls within the scope of protection of this application.
[0027] Research has revealed that current methods for recommending game equipment packs to players only utilize player profile characteristics. However, these characteristics change slowly; for a single player, it may take several days for their profile to update, and the number of updated characteristics is also limited. For example, if a player's level increases, only the level-related characteristics change. Therefore, relying solely on player profile characteristics to determine recommended game equipment packs cannot provide real-time recommendations, resulting in a delay in equipment recommendations. Furthermore, due to the limitations of profile characteristics, players with the same profile characteristics may have completely different playstyles. Consequently, the accuracy of game equipment pack recommendations based solely on player profile characteristics is low.
[0028] Based on this, this application provides a recommendation method that can utilize the characteristics of target players in three aspects: behavioral sequence, profile features, and purchase features. Through a dual-tower prediction model, it can realize real-time prediction of target recommendation packages, so as to promptly determine the target recommendation packages suitable for recommending to target players. At the same time, since the features used for prediction are no longer limited to profile features, the accuracy of recommendation results can also be improved.
[0029] Please see Figure 1 , Figure 1 A flowchart illustrating a recommended method provided in an embodiment of this application. Figure 1 As shown in the embodiments of this application, the recommended method includes:
[0030] S101. Obtain the target player's behavioral sequence, profile characteristics, and purchase characteristics.
[0031] S102. Using the left tower model in the pre-trained dual-tower prediction model, the behavior sequence, the profile features, and the purchase features are fused to determine the behavioral representation data of the target player.
[0032] S103. Based on the behavioral representation data and the gift pack representation data, determine the recommendation matching degree between the target player and each candidate recommended gift pack.
[0033] S104. Based on the recommendation matching degree of each candidate recommended gift pack, determine the target recommended gift pack to be recommended to the target player.
[0034] The recommendation method provided in this application acquires a behavior sequence representing multiple game behavior data generated by a target player during gameplay, the target player's profile features, and purchase features representing multiple game gift pack data generated by the target player at a specific time point. Considering the differences in data distribution among various features, the left tower model of a pre-trained dual-tower prediction model is used to fuse the behavior sequence, profile features, and purchase features to obtain the target player's behavior representation data, thereby maximizing the complementarity between the various features. Using the behavior representation data fused by the left tower model and the gift pack representation data output by the right tower model, which represents the product features and price features of each candidate recommended gift pack, the recommendation matching degree between the target player and each candidate recommended gift pack is determined. Based on the recommendation matching degree of each candidate recommended gift pack, the target recommended gift pack recommended to the target player is determined. In this way, by combining the target player's behavior features, profile features, and purchase features, the target recommended gift pack suitable for the target player can be determined more accurately, thereby improving the accuracy of the recommendation results.
[0035] Here, the behavior sequence is obtained by extracting game behavior data generated by the target player during the game using a trained sequence encoder; game behavior data refers to the game data corresponding to different game behaviors of the target player during the game; for example, game behaviors such as the target player completing set game tasks in the game, interacting with other players or virtual objects controlled by other players in the game, will be recorded in the form of log data, and the behavior data composed of these log data can be considered as the game behavior data of this target player.
[0036] Profile features can represent the character attribute information of the virtual character controlled by the target player (such as the character's level, class, attack power, health, and wealth) and the player attribute information of the target player (such as the player's class, gender, and age).
[0037] During the game, target players can purchase game packs that help them win, and these purchases are recorded as game pack data. Purchase characteristics consist of game pack data generated by target players purchasing game packs at specific points in time. Purchase characteristics can represent the product characteristics and price characteristics of the various items included in the game packs purchased by target players, as well as the target players' purchasing habits.
[0038] In step S101, the behavioral sequence, profile features, and purchase features generated by the target player during the game are obtained; wherein, the behavioral sequence includes game behavior data generated by the target player during the game; and the purchase features include game gift pack data generated by the target player purchasing game gift packs at specific time points.
[0039] Here, the behavior sequence includes game behavior data generated by the target player completing (or performing) specific game behaviors during the game. For example, taking the completion (or performance) of a preset game task as an example, the target player completes a preset game task during the game. The multiple operations involved in completing the game task (e.g., jumping, releasing skills, etc.) and the interaction process with other virtual objects will be recorded in the form of behavior data. In this way, the target player's behavior sequence can be obtained by extracting the game behavior data.
[0040] For a target player, different game behaviors will occur over a period of time, and the corresponding game behavior data are the game behavior data; that is, the multiple game behavior data that the target player will produce over a period of time.
[0041] In summary, behavioral sequences represent the game behavior information of a target player over a period of time (e.g., a whole day) in the game. They consist of behavioral information of different granularities, such as which game map the target player controlled the virtual object to enter and what game tasks were completed during the game. Essentially, a behavioral sequence tensor is a discrete sequence of data with time information.
[0042] Here, in order to predict the target recommendation package to the target player by comprehensively considering the target player's behavioral characteristics, profile characteristics, and purchase characteristics, it is first necessary to fuse the target player's behavioral sequence, profile characteristics, and purchase characteristics. Due to the differences in data distribution between behavioral sequence and profile characteristics, the fusion process cannot be completed by simply splicing them together. It is necessary to use a model with a complex structure to fuse the features, so as to maximize the mutual complementarity between the two types of features and more comprehensively represent the multifaceted characteristics of the target player.
[0043] In step S102, the dual-tower prediction model is used to achieve feature fusion of behavior sequence tensor, profile features and purchase features. Specifically, the left tower model in the pre-trained dual-tower prediction model is used to fuse behavior sequence, profile features and purchase features to determine the behavior representation data of the target player. At this time, the obtained behavior representation data can comprehensively "describe" the target player from three aspects: behavior, profile and purchase. Therefore, the behavior representation data can be used to more accurately predict the target recommended gift pack.
[0044] Here, considering the differences in data distribution between behavioral sequences and profile features, an additional feature fusion layer is set in the Zuota model to achieve the fusion of behavioral sequences, profile features, and purchase features.
[0045] In one implementation, step S102 includes:
[0046] S1021. By fusing the behavior sequence tensor of the behavior sequence, the portrait feature vector of the portrait feature, and the purchase feature vector of the purchase feature through the feature fusion layer in the left tower model, the target player's fused feature vector is obtained.
[0047] In this step, the behavior sequence tensor, the portrait feature vector, and the purchase feature vector are input into the feature fusion layer of the left tower model. The feature fusion layer is used to fuse the features of the behavior sequence tensor, the portrait feature vector, and the purchase feature vector to obtain the fused feature vector of the target player.
[0048] Here, although the behavior sequence tensor extracted by the sequence encoder can comprehensively represent the various game behaviors of the target player at different game moments, when using the behavior sequence tensor to predict the target recommendation package recommended to the target player, in order to predict a more suitable target recommendation package, it is necessary to extract game behaviors that can better represent the target player's behavioral habits from a large number of game behaviors.
[0049] For example, during gameplay, players need to interact with non-player characters (NPCs) to trigger the execution of game tasks. Obviously, the game behavior that triggers this is uniform for all players; that is, different players all need to trigger the execution of game tasks through the same game behavior (e.g., clicking on NPCs in the game scene). Therefore, the game behavior that triggers the execution of game tasks cannot represent the target player's behavioral habits. Thus, before predicting the target recommended gift pack, it is necessary to simplify the behavioral sequence tensor and extract specific behavioral sequences that can better represent the target player's behavioral habits.
[0050] In one embodiment, step S1021 includes:
[0051] S10211. Referring to the portrait feature vector, using the feature extraction module in the feature fusion layer, a specific behavior sequence is extracted from the behavior sequence tensor to obtain the target player's behavior tensor to be filtered.
[0052] In this step, referencing the target player's profile feature vector, the feature extraction module in the feature fusion layer is used to extract specific behavior sequences that can represent the target player's behavioral habits from the behavior sequence tensor. The specific behavior sequences of the target player are extracted from the target player's behavior sequence tensor to obtain the target player's behavior tensor to be filtered.
[0053] Here, the feature extraction module used to extract specific behavior sequences is actually an attention module. It extracts specific behavior sequences from the behavior sequence tensor by performing an "Attention" operation on the behavior sequence tensor.
[0054] In one implementation, step S10211 includes: referencing the portrait feature vector and a preset latent vector dimension, determining the specific behavior sequence carried in the behavior sequence tensor through an attention mechanism; and forming the target player's filterable behavior tensor based on the specific behavior tensors of each specific behavior sequence.
[0055] In this step, referencing the target player's profile feature vector and the preset latent vector dimension, an "Attention" operation is performed on the behavior sequence tensor through an attention mechanism to determine the specific behavior sequence carried in the behavior sequence tensor; based on the specific behavior tensor of each specific behavior sequence, the target player's behavior tensor to be filtered is formed.
[0056] Here, the latent vector is the learning weight of the behavior representation tensor output by the left tower model. The preset latent vector dimension refers to the dimensional value of the latent vector. The latent vector dimension determines the strength of the latent vector's expressive power. The smaller the latent vector dimension value, the less information the latent vector contains, the weaker its expressive power, and the higher the generalization degree of the left tower model. Conversely, the larger the latent vector dimension value, the more information the latent vector contains, the stronger its expressive power, and the lower the generalization degree of the left tower model.
[0057] Specifically, the feature extraction module (i.e., the attention mechanism module) takes the target player's profile feature vector T_ps and the behavior sequence tensor T_s as inputs, and outputs a behavior tensor V_s to be filtered that is independent of the sequence length l. The behavior sequence tensor is then subjected to an "Attention" operation using the following formula:
[0058]
[0059] Where Q is the portrait feature vector T_ps, K and V are both behavior sequence tensors T_s, and K T d is the transpose of the behavior sequence tensor T_s. k The default implicit vector dimension.
[0060] S10212. The invalid behavior sequence carried in the behavior tensor to be filtered is filtered out by the first filtering module in the feature fusion layer to obtain the target behavior tensor of the target player.
[0061] Here, the feature extraction module determines the target player's behavior tensor to be filtered. Although it can represent the target player's behavioral habits, the behavior tensor to be filtered still includes invalid behavior sequences that are not related to the predicted target recommendation package. Therefore, it is necessary to further filter the invalid behavior sequences in the behavior tensor to be filtered.
[0062] In this step, the invalid behavior sequences in the behavior tensor to be filtered are filtered out by the first filtering module in the feature fusion layer, and the invalid behavior sequences carried in the behavior tensor to be filtered are removed to obtain the target player's target behavior tensor. At this time, the target behavior tensor is used to predict the target recommended gift pack, which can not only reduce the amount of data processing in the prediction process, but also further improve the generalization of the Zuota model.
[0063] In this process, the invalid behavior sequences in the behavior tensor to be filtered or the portrait feature vector can be filtered by referring to the behavior tensor to be filtered.
[0064] In one implementation, step S10212 includes: performing linear processing on the tensor of behaviors to be filtered or the portrait feature vector to determine the target filtering vector referenced when filtering invalid behavior sequences in the tensor of behaviors to be filtered; based on the target filtering vector, filtering out invalid behavior sequences carried in the tensor of behaviors to be filtered by calculating the Hadamard product, and determining the target behavior tensor of the target player.
[0065] In this step, the tensor of behaviors to be filtered or the portrait feature vector is linearly processed to determine the target filtering vector referenced when filtering invalid behavior sequences from the tensor of behaviors to be filtered; by calculating the Hadamard product between the target filtering vector and the tensor of behaviors to be filtered, invalid behavior sequences carried in the tensor of behaviors to be filtered are filtered out, and the target behavior tensor of the target player is determined.
[0066] In one implementation, linear processing is performed on the tensor of behaviors to be filtered or the portrait feature vector to determine the target filtering vector referenced when filtering invalid behavior sequences from the tensor of behaviors to be filtered, including:
[0067] A linear layer is used to linearly transform the tensor of the behavior to be filtered or the feature vector of the portrait to obtain the mapping filtering vector corresponding to the tensor of the behavior to be filtered or the feature vector of the portrait; an activation function is used to nonlinearly transform the mapping filtering vector to obtain the target filtering vector.
[0068] In this step, the linear processing of the behavior tensor or profile feature vector to be filtered mainly includes two parts: first, the behavior tensor or profile feature vector to be filtered is linearly converted into a mapping filter vector through a linear layer; second, the mapping filter vector is nonlinearly transformed through an activation function to determine the target filter vector used to filter invalid behavior sequences.
[0069] Specifically, a linear layer is used to perform a linear transformation on the tensor of the behavior to be filtered or the feature vector of the profile, mapping the tensor of the behavior to be filtered or the feature vector of the profile to the corresponding mapped filter vector; then, an activation function is used to perform a nonlinear transformation on the mapped filter vector to obtain the target filter vector referenced by the invalid behavior sequence.
[0070] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of the first filtering module provided in an embodiment of this application. Figure 2 As shown, the first filtering module 2a includes a linear layer 2b and an activation function 2c. The input of the first filtering module 2a can be a portrait feature vector T_ps or a behavior sequence tensor T_s. The linear layer 2b performs a linear transformation on the portrait feature vector T_ps or the behavior sequence tensor T_s, and the linear layer 2b outputs a mapped filtering vector. The activation function 2c is then used to perform a non-linear transformation on the mapped filtering vector to obtain the target filtering vector. The Hadamard product between the target filtering vector and the behavior tensor V_s to be filtered is calculated to obtain the target behavior tensor of the target player.
[0071] S10213. The invalid portrait features carried in the portrait feature vector are filtered out by the second filtering module in the feature fusion layer to obtain the target portrait vector of the target player.
[0072] Here, the target player's profile feature vector also includes invalid profile features that are not related to the predicted target recommended gift pack. Therefore, it is also necessary to filter out the invalid profile features in the profile feature vector.
[0073] In this step, the invalid portrait features in the portrait feature vector are filtered out by the second filtering module in the feature fusion layer, and the invalid portrait features carried in the portrait feature vector are removed to obtain the target portrait vector of the target player. At this time, the target portrait vector is used to predict the target recommended gift pack, which can not only reduce the amount of data processing in the prediction process, but also further improve the generalization of the Zuota model.
[0074] Wherein, the second filtering vector is the tensor of the behavior to be filtered or the portrait feature vector; that is, invalid portrait features in the portrait feature vector can be filtered by referring to the tensor of the behavior to be filtered or the portrait feature vector.
[0075] In one implementation, step S10212 includes: performing linear processing on the tensor of the behavior to be filtered or the portrait feature vector to determine the portrait filtering vector referenced when filtering invalid portrait features on the portrait feature vector; and based on the portrait filtering vector, filtering out invalid portrait features carried in the portrait feature vector by calculating the Hadamard product to determine the target portrait vector of the target player.
[0076] In this step, the tensor of the behavior to be filtered or the portrait feature vector is linearly processed to determine the portrait filtering vector to be referenced when filtering invalid portrait features from the portrait feature vector; by calculating the Hadamard product between the portrait filtering vector and the portrait feature vector, invalid portrait features carried in the portrait feature vector are filtered out to determine the target portrait vector of the target player.
[0077] In one implementation, linear processing is performed on the tensor of the behavior to be filtered or the portrait feature vector to determine the portrait filtering vector referenced when performing invalid portrait feature filtering on the portrait feature vector, including:
[0078] A linear layer is used to linearly transform the tensor of the behavior to be filtered or the portrait feature vector to obtain the mapping filter vector corresponding to the tensor of the behavior to be filtered or the portrait feature vector; an activation function is used to nonlinearly transform the mapping filter vector to obtain the portrait filter vector.
[0079] This step involves linear processing of the behavior tensor or portrait feature vector to be filtered, which mainly includes two parts: first, the behavior tensor or portrait feature vector to be filtered is linearly transformed into a mapping filter vector through a linear layer; second, the mapping filter vector is nonlinearly transformed through an activation function to determine the portrait filter vector used to filter invalid portrait features.
[0080] Specifically, a linear layer is used to perform a linear transformation on the tensor of the behavior to be filtered or the feature vector of the portrait, mapping the tensor of the behavior to be filtered or the feature vector of the portrait to be filtered into the corresponding mapped filter vector; then, an activation function is used to perform a nonlinear transformation on the mapped filter vector to obtain the portrait filter vector referenced for filtering invalid portrait features.
[0081] S10214. Concatenate the target behavior tensor, the target profile vector, and the purchase feature vector to obtain the fused feature vector of the target player.
[0082] Please see Figure 3 , Figure 3 This is a schematic diagram of a feature fusion layer structure provided in an embodiment of this application. Figure 3 As shown, the feature fusion layer 3a includes a feature extraction module 3b (i.e., attention module 3b), a first filtering module 3c, and a second filtering module 3d. The input of the attention module 3b is the target player's profile feature vector and behavior sequence tensor. The attention module 3b extracts specific behavior sequences from the behavior sequence tensor based on the profile feature vector to determine the target player's behavior tensor V_s to be filtered. The first filtering module 3c filters out invalid behavior sequences carried by the behavior tensor V_s to be filtered, resulting in the target player's target behavior tensor 3e. The second filtering module 3d filters out invalid profile features carried by the profile feature vector, resulting in the target player's target profile vector 3f. The target behavior tensor 3e, the target profile vector 3f, and the purchase feature vector 3g are concatenated to obtain the target player's fused feature vector.
[0083] S1022. Using the Feature Encoding Layer (MLP) in the left tower model, the fused feature vector is feature encoded to obtain the behavior representation tensor of the target player behavior representation data.
[0084] In this step, the feature encoding layer (MLP) set in the left tower model is used to encode the obtained fused feature vector to achieve the format conversion of the fused feature vector and obtain the behavior representation tensor that can represent the target player behavior representation data.
[0085] Among them, the feature encoding layer can be a multi-layer perceptron (MLP), which can be composed of multiple non-linear layers. It can be regarded as a universal function appropriator, which can theoretically approximate any function.
[0086] Here, the purchase feature vector can include multiple game pack data generated by the target player purchasing game packs at multiple specific time points; for example, the game pack data can include game pack data generated by the target player purchasing game packs on the current day, game pack data generated by the target player purchasing game packs in the store on the current day, game pack data generated by the target player purchasing game packs in the previous three days, and so on. This means that the purchase feature vector is composed of the purchase vector of each game pack data; therefore, it is necessary to determine the purchase vector of each game pack data.
[0087] For a game gift pack, it can include multiple gift pack items, and the quantity of each gift pack item can be non-unique; for example, a game gift pack includes two gift pack items, A and B; where the quantity of gift pack item A is 2 and the quantity of gift pack item B is 3; that is, the game gift pack includes 2 gift pack items A and 3 gift pack items B; therefore, when determining the gift pack purchase vector of game gift pack data, it is also necessary to refer to the quantity of each gift pack item included in each game gift pack data.
[0088] In one implementation, the purchase feature vector is determined through the following steps:
[0089] Step 1: For each game gift pack data, determine the quantity of each gift pack item, the price characteristics of each gift pack item, and the product characteristics of each gift pack item.
[0090] In this step, for each game gift pack data, the quantity of each gift pack item, the price characteristics of each gift pack item, and the product characteristics of each gift pack item are determined.
[0091] Among them, the price feature is the selling price of each gift pack item, and the product feature is the product attributes of each gift pack item (such as product ID, product category, product attack power, product attack range, and product function).
[0092] Step 2: For each gift package item, determine the item price vector based on the item's price characteristics and quantity.
[0093] In this step, for each item in the game gift pack data, the product price vector h_p (price embedding vector) is determined based on the price characteristics of the item and the quantity of the item in the game gift pack.
[0094] Specifically, the price features of the gift pack item are mapped through the item embedding layer, and then multiplied by the quantity of the gift pack item in the game gift pack to determine the item price vector. In this way, the item price vector of each gift pack item in the game gift pack is obtained.
[0095] Step 3: Perform a pooling operation on the product price vector of each gift pack item to determine the price feature vector of the game gift pack data.
[0096] In this step, after obtaining the product price vector of each item in the game gift pack, a pooling operation is performed on the product price vector of each item in the gift pack to determine the price feature vector of the game gift pack data.
[0097] Step 4: Based on the product characteristics and quantity of the gift package, determine the product feature vector of the gift package.
[0098] In this step, for each item in the game gift pack data, the item feature vector h_c (item embedding vector) is determined based on the item features and the quantity of the item in the game gift pack.
[0099] Specifically, the product features of the gift pack item are mapped through the item embedding layer, and then multiplied by the quantity of the gift pack item in the game gift pack to determine the product feature vector of the gift pack item. In this way, the product feature vector of each gift pack item in the game gift pack is obtained.
[0100] Step 5: Perform pooling operation on the product feature vector of each gift pack item to determine the gift pack feature vector of the game gift pack data.
[0101] In this step, after obtaining the product feature vector of each item in the game gift pack, a pooling operation is performed on the product feature vector of each item to determine the gift pack feature vector of the game gift pack data.
[0102] Step 6: Based on the price feature vector and the gift pack feature vector of the game gift pack data, determine the gift pack purchase vector of the game gift pack data.
[0103] In this step, the purchase vector of the game gift pack data is determined by adding the price feature vector of the game gift pack data to the gift pack feature vector of the game gift pack data.
[0104] Step 7: Based on the purchase vector of each game gift pack data, form the purchase feature vector.
[0105] Corresponding to the above embodiment, taking a game gift pack containing 2 A gift pack items and 3 B gift pack items as an example, the following steps are taken: First, based on the quantity and price characteristics of A gift pack items, and the quantity and price characteristics of B gift pack items, the product price vectors of A gift pack items and B gift pack items are determined respectively. Then, by pooling the product price vectors of A and B gift pack items, the price feature vector of the game gift pack data is determined. Next, based on the quantity and product characteristics of A gift pack items, and the quantity and product characteristics of B gift pack items, the product feature vectors of A and B gift pack items are determined respectively. Then, by pooling the product feature vectors of A and B gift pack items, the product feature vector of the game gift pack data is determined. Finally, the price feature vector and the product feature vector of the game gift pack data are added together to obtain the gift pack purchase vector of the game gift pack data.
[0106] In one implementation, the behavior sequence tensor is obtained through the following steps: using a pre-trained sequence encoder to extract features from multiple game behavior data generated by the target player during the game, and determining the behavior sequence tensor of the target player's behavior representation data.
[0107] In this step, a pre-trained sequence encoder is used to extract the target player's behavior sequence tensor. Specifically, the pre-trained sequence encoder is used to extract features from multiple game behavior data generated by the target player during the game to determine the target player's behavior sequence tensor.
[0108] The extracted behavior sequence representation tensor T_s = (t_i, ..., t_l) is used, where t_i is the behavior tensor corresponding to the game behavior data at time i, and l is the length of the target player's game behavior over a certain period of time.
[0109] In one implementation, the portrait feature vector is determined through the following steps:
[0110] Obtain the initial portrait vector of the target player; normalize the initial portrait vector to obtain a normalized portrait vector; increase the dimensionality of the normalized portrait vector to obtain the portrait feature vector of the target player.
[0111] In this step, the initial profile vector of the target player is provided by the game developer, and the initial profile vector is a 42-dimensional vector. At this time, each element in the 42-dimensional initial profile vector is normalized so that the mean of each profile feature of the target player represented by the initial profile vector is 0 and the variance is 1. In order to integrate the profile features of the target player with behavioral features and purchase features during the candidate selection process, the normalized profile vector needs to be upgraded to obtain the profile feature vector of the target player.
[0112] In step S103, based on the behavioral representation data of the target player output by the left tower model and the gift package representation data output by the right tower model in the dual-tower prediction model, the recommendation matching degree between the target player and each candidate recommendation gift package to be recommended to the target player is determined.
[0113] The gift pack representation data is determined by the right tower model in the dual-tower prediction model; the gift pack representation data includes the product characteristics and price characteristics of each candidate recommended gift pack to be recommended to the target player.
[0114] In one implementation, step S103 includes: determining the recommendation matching degree between the target player and each candidate recommended gift pack by calculating the inner product or cosine similarity between the behavioral representation data and the gift pack representation data.
[0115] In this step, the prediction recall tensor output by the dual-tower prediction model is determined by calculating the inner product or cosine similarity between the behavioral representation tensor of the behavioral representation data and the gift package representation tensor of the gift package representation data. The prediction recall tensor output by the dual-tower prediction model is then dimensionality-reduced to obtain a matching degree prediction vector of dimension M. Here, M is the number of candidate recommended gift packages, and the element value of each element in the matching degree prediction vector is the recommendation matching degree between the target player and each candidate recommended gift package.
[0116] In one implementation, the gift package representation tensor is determined through the following steps:
[0117] Obtain the candidate gift package vector for each candidate recommended gift package; based on the candidate gift package vector for each candidate recommended gift package, form the candidate purchase vector; use the right tower model in the pre-trained dual-tower prediction model to perform feature encoding on the candidate purchase vector to obtain the gift package representation tensor.
[0118] In this step, the right tower model of the dual-tower prediction model is equipped with a feature encoding layer (MLP) for feature encoding of the candidate purchase vector composed of the candidate gift package vectors of each candidate recommended gift package; the candidate purchase vector is input into the right tower model, and the feature encoding layer is used to encode the candidate purchase vector to obtain a gift package representation tensor that can characterize the product features and price features of each candidate recommended gift package.
[0119] In one implementation, the candidate gift package vector for each candidate recommended gift package is determined through the following steps:
[0120] Step 8: For each candidate recommended gift package, determine the quantity of each candidate product included in the candidate recommended gift package, the price characteristics of each candidate product, and the product characteristics of each candidate product.
[0121] In this step, for each candidate recommended gift package, the quantity of each candidate product included in the candidate recommended gift package, the price characteristics of each candidate product, and the product characteristics of each candidate product are determined.
[0122] Among them, the price feature of the candidate product is the selling price of each candidate product, and the product feature of the candidate product is the product attribute of each candidate product (e.g., product ID, product category, product attack power, product attack range, and product function).
[0123] Step 9: For each candidate product, determine the candidate price vector based on the price characteristics and quantity of the candidate product.
[0124] In this step, for each candidate product included in the candidate recommended gift package, a candidate price vector is determined based on the price characteristics of the candidate product and the quantity of the candidate product in the candidate recommended gift package.
[0125] Specifically, the price features of the candidate product are mapped through the item embedding layer, and then multiplied by the quantity of the candidate product in the candidate recommendation package to determine the product price vector of the candidate product. In this way, the product price vector of each candidate product in the candidate recommendation package is obtained.
[0126] Step 10: Perform a pooling operation on the product price vector of each candidate product to determine the price feature vector of the candidate recommended gift package.
[0127] In this step, after obtaining the product price vector of each candidate product in the candidate recommended gift package, a pooling operation is performed on the product price vector of each candidate product to determine the price feature vector of the candidate recommended gift package.
[0128] Step 11: Determine the product feature vector of the candidate product based on its product characteristics and quantity.
[0129] In this step, for each candidate product in the candidate recommended gift package, the product feature vector (itemembedding vector) of the candidate product is determined based on the product features of the candidate product and the quantity of the candidate product in the candidate recommended gift package.
[0130] Specifically, the product features of the candidate product are mapped through the item embedding layer, and then multiplied by the quantity of the candidate product in the candidate recommendation package to determine the product feature vector of the candidate product. In this way, the product feature vector of each candidate product in the candidate recommendation package is obtained.
[0131] Step 12: Perform pooling operation on the product feature vector of each candidate product to determine the gift package feature vector of the candidate recommended gift package.
[0132] In this step, after obtaining the product feature vector of each candidate product in the candidate recommended gift package, a pooling operation is performed on the product feature vector of each candidate product to determine the gift package feature vector of the candidate recommended gift package.
[0133] Step 13: Based on the price feature vector and the gift feature vector of the candidate recommended gift package, determine the candidate gift package vector of the candidate recommended gift package.
[0134] In this step, the candidate package vector is determined by adding the price feature vector of the candidate recommended package to the package feature vector of the candidate recommended package.
[0135] In step S104, based on the matching degree between the target player and each candidate recommended gift pack, the candidate recommended gift packs are sorted in descending order, and the candidate recommended gift packs that are ranked in the first preset position are determined as the target recommended gift packs recommended to the target player.
[0136] In one implementation, the trained sequence encoder and the dual-tower prediction model are obtained through the following steps:
[0137] Step a: Obtain the behavior sequence data corresponding to the training behavior data used for pre-training the initial sequence encoder.
[0138] Step b: Randomly mask a portion of the sequence data in the behavior sequence data to obtain the masked behavior sequence data.
[0139] Here, a random mask is used to pre-train the initial sequence encoder. The random mask refers to randomly covering a portion of the sequence data input in the behavioral sequence data. The purpose of pre-training is to enable the pre-trained encoder to recover these randomly covered portion of the sequence data.
[0140] In this step, a portion of the sequence data in the behavior sequence data is randomly masked using a preset mask to obtain the masked behavior sequence data, which is then used for pre-training of the initial sequence encoder.
[0141] Step c: Using the initial sequence encoder, combined with the context information included in the masked behavior sequence data, predict the sequence data involved in the masked portion of the masked behavior sequence data to obtain the predicted sequence data.
[0142] In this step, the masked behavior sequence data is used as the input of the initial sequence encoder. Using the initial sequence encoder, combined with the contextual information included in the masked behavior sequence data, the sequence data involved in the masked part of the masked behavior sequence data is predicted in a "fill-in-the-blank" manner to obtain the predicted sequence data.
[0143] Step d: Based on the predicted sequence data and the partial sequence data, adjust the parameters involved in the initial sequence encoder to obtain a preset number of pre-trained encoders.
[0144] In this step, the parameters of the initial sequence encoder are adjusted by combining the predicted sequence data obtained from the initial sequence encoder and the partial sequence data that is covered when the first sequence data is randomly covered, so as to obtain the pre-trained sequence encoder and thus complete the pre-training of the initial sequence encoder.
[0145] Here, since the convergence point of the pre-trained model is random, multiple sequence encoders are pre-trained simultaneously to obtain encoders with better training performance. Then, the model generalization metric (L2 pathnorm) is used to select the encoder with the best pre-training performance, the easiest to fine-tune, and the one to be trained under supervised training from the multiple pre-trained encoders. Among them, L2 pathnorm is an indicator that can predict the generalization of the model; the smaller the value of L2 pathnorm, the better the generalization of the model.
[0146] Step e: Combine the model generalization metrics of each pre-trained encoder to select the encoder to be trained from a preset number of pre-trained encoders.
[0147] In this step, the model generalization index of each pre-trained encoder is determined; combining the model generalization index of each pre-trained encoder, the pre-trained encoder with the smallest model generalization index is selected from the preset number of pre-trained encoders and used as the encoder to be trained in the dual-tower prediction model.
[0148] Here, considering that the dual-tower prediction model involves multiple neural networks, manually adjusting the hyperparameters of these networks is extremely inefficient. Therefore, in this case, we choose to quickly determine the hyperparameters of each neural network through hyperparameter search. Based on this, we adopt a "two-stage random hyperparameter search" method. In the first round of parameter search, we narrow down the search range. In the second round of parameter search, we only perform random hyperparameter search within the search range determined in the first round. This minimizes the computational resources involved in the random hyperparameter search process.
[0149] Specifically, the model generalization metric is calculated using the following formula:
[0150]
[0151] in, for h k The Cartesian product of the parameters, where W is the parameter matrix composed of the parameters of the pre-trained encoder, and i and j represent the row vector and column vector of the parameter matrix, respectively.
[0152] Step f: Using a hyperparameter search method, perform an initial parameter search on the multiple network hyperparameters involved in the dual-tower prediction model to determine the parameter value range of the multiple network hyperparameters.
[0153] In this step, a hyperparameter search is used to perform an initial parameter search on multiple network hyperparameters involved in each neural network of the dual-tower model, determining multiple sets of parameter values for each network hyperparameter; and based on the multiple sets of parameter values for each network hyperparameter, the search range of the secondary parameter search is narrowed to determine the range of parameter values for multiple network hyperparameters when performing a secondary parameter search.
[0154] The network hyperparameters can include the dimension of the product feature vector, the dimension of the price feature vector, the dimension of the latent vector, the network structure of the feature encoding layer (MLP), the learning rate of each neural network, the batch size of the neural network, and the network structure of each neural network (including the neural networks involved in the left tower model and the right tower model in the dual-tower prediction model).
[0155] Step g: Perform a secondary parameter search on the multiple network hyperparameters within the range of the parameter values to determine multiple hyperparameter values for each network hyperparameter.
[0156] In this step, within the range of parameter values determined by the initial parameter search, a secondary parameter search is performed on multiple network hyperparameters of each neural network involved in the dual-tower model to determine multiple hyperparameter values for each network hyperparameter.
[0157] Step h: Based on the multiple hyperparameter values of each network hyperparameter, and combined with the multiple validation recommendation data included in the validation dataset, multiple dual-tower models to be trained are determined.
[0158] In this step, multiple validation recommendation data included in the validation dataset are used to determine the prediction index of the dual-tower prediction model constructed based on multiple hyperparameter values of each network hyperparameter; and based on the prediction index of each constructed dual-tower prediction model, multiple dual-tower models to be trained under supervised training are selected.
[0159] Here, the prediction metric is the recall metric R (recall@100 metric); R = TP / (TP + FN), where TP is the number of target recommendation packages predicted by the dual-tower prediction model to be recommended to sample users, and TP + FN is the number of target recommendation packages that should be recommended to sample players.
[0160] Step i: Obtain multiple training recommendation data for training the encoder to be trained and the multiple dual-tower models to be trained.
[0161] Step j: Using the training recommendation data, supervised training is performed on the encoder to be trained and the multiple dual-tower models to be trained to obtain the trained sequence encoder and the dual-tower prediction model.
[0162] In this step, the acquired training recommendation data is used to perform supervised training on the encoder to be trained and the dual-tower models to be trained. Specifically, the training recommendation data can be used as the input features of each dual-tower model to be trained, and the matching degree labels corresponding to the training recommendation data can be used as the output features of each dual-tower model to be trained, thereby training multiple dual-tower models to obtain a trained dual-tower prediction model. Then, using the multiple validation recommendation data included in the validation dataset, the loss value of each dual-tower model to be trained is determined, and the dual-tower model with the smallest loss value is determined as the trained dual-tower prediction model.
[0163] The training recommendation data specifically includes sample game behaviors and the behavior sequence tensor corresponding to each sample game behavior; each sample game behavior is used as the input feature of each encoder to be trained, and the behavior sequence tensor corresponding to each sample game behavior is used as the output feature of each encoder to be trained, and the encoder to be trained is trained to obtain a trained sequence encoder.
[0164] The recommendation method provided in this application obtains the behavioral sequence, profile features, and purchase features of a target player; it uses the left tower model of a pre-trained dual-tower prediction model to fuse the behavioral sequence, profile features, and purchase features to determine the behavioral representation data of the target player; based on the behavioral representation data and the gift package representation data, it determines the recommendation matching degree between the target player and each candidate recommended gift package; wherein, the gift package representation data is determined by the right tower model of the dual-tower prediction model; the gift package representation data includes the product features and price features of each candidate recommended gift package; and based on the recommendation matching degree of each candidate recommended gift package, it determines the target recommended gift package to be recommended to the target player. In this way, by utilizing the three aspects of the target player's behavioral sequence, profile features, and purchase features, the suitable target recommended gift package to be recommended to the target player can be determined in real time, which can improve the accuracy of the recommendation results.
[0165] Please see Figure 4 , Figure 5 , Figure 4 This is one of the structural schematic diagrams of a recommended device provided in the embodiments of this application. Figure 5 This is a second schematic diagram of a recommended device provided in an embodiment of this application. For example... Figure 4 As shown, the recommendation device 400 includes:
[0166] The vector acquisition module 410 is used to acquire the target player's behavior sequence, profile features, and purchase features; wherein, the behavior sequence includes game behavior data generated by the target player during the game; and the purchase features include game gift pack data generated by the target player purchasing game gift packs at specific time points.
[0167] The feature fusion module 420 is used to fuse the behavior sequence, the profile features, and the purchase features using the left tower model in the pre-trained dual-tower prediction model to determine the behavioral representation data of the target player.
[0168] The matching degree prediction module 430 is used to determine the recommendation matching degree between the target player and each candidate recommended gift pack based on the behavioral representation data and the gift pack representation data; wherein, the gift pack representation data is determined by the right tower model in the dual-tower prediction model; the gift pack representation data includes the product characteristics and price characteristics of each candidate recommended gift pack;
[0169] The gift pack recommendation module 440 is used to determine the target recommended gift pack to be recommended to the target player based on the recommendation matching degree of each candidate recommended gift pack.
[0170] Furthermore, when the feature fusion module 420 uses the left tower model in a pre-trained dual-tower prediction model to fuse the behavior sequence, the profile features, and the purchase features to determine the behavioral representation data of the target player, the feature fusion module 420 is used to:
[0171] The feature fusion layer in the left tower model fuses the behavior sequence tensor of the behavior sequence, the portrait feature vector of the portrait feature, and the purchase feature vector of the purchase feature to obtain the fused feature vector of the target player.
[0172] By utilizing the feature encoding layer in the left tower model, the fused feature vector is feature encoded to obtain the behavior representation tensor of the target player behavior representation data.
[0173] Furthermore, when the feature fusion module 420 fuses the behavior sequence tensor of the behavior sequence, the portrait feature vector of the portrait feature, and the purchase feature vector of the purchase feature through the feature fusion layer in the left tower model to obtain the fused feature vector of the target player, the feature fusion module 420 is used to:
[0174] Referring to the portrait feature vector, the feature extraction module in the feature fusion layer is used to extract a specific behavior sequence from the behavior sequence tensor to obtain the target player's behavior tensor to be filtered.
[0175] The first filtering module in the feature fusion layer filters out invalid behavior sequences carried in the behavior tensor to be filtered, thereby obtaining the target behavior tensor of the target player.
[0176] The second filtering module in the feature fusion layer filters out invalid portrait features carried in the portrait feature vector to obtain the target portrait vector of the target player.
[0177] By concatenating the target behavior tensor, the target profile vector, and the purchase feature vector, the fused feature vector of the target player is obtained.
[0178] Furthermore, when the feature fusion module 420 is used to extract a specific behavior sequence from the behavior sequence tensor using the feature extraction module in the feature fusion layer, with reference to the portrait feature vector, to obtain the target player's behavior tensor to be filtered, the feature fusion module 420 is used to:
[0179] Referring to the portrait feature vector and the preset latent vector dimension, the specific behavior sequence carried in the behavior sequence tensor is determined through an attention mechanism; wherein, the latent vector dimension is determined through hyperparameter search;
[0180] The target player's filterable behavior tensor is composed of specific behavior tensors based on each specific behavior sequence.
[0181] Furthermore, when the feature fusion module 420 filters out invalid behavior sequences carried in the behavior tensor to be filtered through the first filtering module in the feature fusion layer to obtain the target player's target behavior tensor, the feature fusion module 420 is used to:
[0182] Linear processing is performed on the tensor of the behavior to be filtered or the portrait feature vector to determine the target filtering vector referenced when filtering invalid behavior sequences from the tensor of the behavior to be filtered.
[0183] Based on the target filtering vector, invalid behavior sequences carried in the tensor of behaviors to be filtered are filtered out by calculating the Hadamard product, thereby determining the target player's target behavior tensor.
[0184] Furthermore, when the feature fusion module 420 performs linear processing on the tensor of the behavior to be filtered or the portrait feature vector to determine the target filtering vector referenced when filtering invalid behavior sequences from the tensor of the behavior to be filtered, the feature fusion module 420 is used to:
[0185] A linear layer is used to perform a linear transformation on the tensor of the behavior to be filtered or the portrait feature vector to obtain the mapping filter vector corresponding to the tensor of the behavior to be filtered or the portrait feature vector.
[0186] The target filtering vector is obtained by applying a nonlinear transformation to the mapping filtering vector using an activation function.
[0187] Furthermore, such as Figure 5 As shown, the recommendation device 400 further includes a vector determination module 450, which is used to determine the purchase feature vector through the following steps:
[0188] For each game gift pack data, determine the quantity of each gift pack item, the price characteristics of each gift pack item, and the product characteristics of each gift pack item;
[0189] For each gift package item, a price vector is determined based on the price characteristics and quantity of the gift package item.
[0190] Pool the price vector of each item in the gift pack to determine the price feature vector of the game gift pack data;
[0191] Based on the product characteristics and quantity of the gift package, determine the product feature vector of the gift package.
[0192] Pooling is performed on the product feature vector of each gift pack item to determine the gift pack feature vector of the game gift pack data;
[0193] Based on the price feature vector and the gift pack feature vector of the game gift pack data, determine the gift pack purchase vector of the game gift pack data;
[0194] The purchase feature vector is composed of the purchase vector of each game gift pack data.
[0195] Furthermore, such as Figure 5 As shown, the recommendation device 400 further includes a vector extraction module 460, which is used to obtain the behavior sequence tensor through the following steps:
[0196] By using a pre-trained sequence encoder to extract features from multiple game behavior data generated by the target player during the game, the behavior sequence tensor of the target player's behavior representation data is determined.
[0197] Furthermore, such as Figure 5 As shown, the recommendation device 400 further includes a training module 470, which is used to obtain the trained sequence encoder and the dual-tower model through the following steps:
[0198] Obtain the behavior sequence data corresponding to the training behavior data used for pre-training the initial sequence encoder;
[0199] By using a random mask, a portion of the sequence data in the behavior sequence data is randomly masked to obtain the masked behavior sequence data;
[0200] Using the initial sequence encoder, and combining the context information included in the masked behavior sequence data, the sequence data involved in the masked portion of the masked behavior sequence data is predicted to obtain the predicted sequence data;
[0201] Based on the predicted sequence data and the partial sequence data, the parameters involved in the initial sequence encoder are adjusted to obtain a preset number of pre-trained encoders;
[0202] Based on the model generalization metric of each pre-trained encoder, select the encoder to be trained from a preset number of pre-trained encoders;
[0203] The hyperparameter search method is used to perform an initial parameter search on multiple network hyperparameters involved in the dual-tower model to determine the parameter value range of the multiple network hyperparameters;
[0204] A secondary parameter search is performed on the plurality of network hyperparameters within the range of the parameter values to determine multiple hyperparameter values for each network hyperparameter;
[0205] Based on multiple hyperparameter values for each network hyperparameter, and combined with multiple validation recommendation data included in the validation dataset, multiple dual-tower models to be trained are identified.
[0206] Obtain multiple training recommendation data for training the encoder to be trained and the multiple dual-tower models to be trained;
[0207] Using the training recommendation data, supervised training is performed on the encoder to be trained and the multiple dual-tower models to be trained to obtain the trained sequence encoder and the dual-tower prediction model.
[0208] Furthermore, when determining the recommendation matching degree between the target player and each candidate recommended gift pack based on the behavioral representation data and the gift pack representation data, the matching degree prediction module 430 is used to:
[0209] The recommendation matching degree between the target player and each candidate recommended gift pack is determined by calculating the inner product or cosine similarity between the behavioral representation data and the gift pack representation data.
[0210] The recommendation device provided in this application acquires the behavioral sequence, profile features, and purchase features of a target player; it uses the left tower model of a pre-trained dual-tower prediction model to fuse the behavioral sequence, profile features, and purchase features to determine the behavioral representation data of the target player; based on the behavioral representation data and gift package representation data, it determines the recommendation matching degree between the target player and each candidate recommended gift package; wherein, the gift package representation data is determined by the right tower model of the dual-tower prediction model; the gift package representation data includes the product features and price features of each candidate recommended gift package; and based on the recommendation matching degree of each candidate recommended gift package, it determines the target recommended gift package to be recommended to the target player. In this way, by utilizing the three aspects of the target player's behavioral sequence, profile features, and purchase features, a suitable target recommended gift package can be determined in real time, which can improve the accuracy of the recommendation results.
[0211] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6As shown, the electronic device 600 includes a processor 610, a memory 620, and a bus 630. The memory 620 stores machine-readable instructions executable by the processor 610. When the electronic device runs a recommended method as described in the embodiments, the processor 610 communicates with the memory 620 via the bus 630. The processor 610 executes the machine-readable instructions. The preamble of the method item of the processor 610 performs the following steps:
[0212] The system acquires the target player's behavior sequence, profile features, and purchase features; wherein, the behavior sequence includes game behavior data generated by the target player during gameplay; and the purchase features include game gift pack data generated by the target player purchasing game gift packs at specific points in time.
[0213] Using the left tower model in a pre-trained dual-tower prediction model, the behavioral sequence, the profile features, and the purchase features are fused to determine the behavioral representation data of the target player.
[0214] Based on the behavioral representation data and the gift pack representation data, the recommendation matching degree between the target player and each candidate recommended gift pack is determined; wherein, the gift pack representation data is determined by the right tower model in the dual-tower prediction model; the gift pack representation data includes the product characteristics and price characteristics of each candidate recommended gift pack;
[0215] Based on the matching degree of each candidate recommended gift pack, a target recommended gift pack is determined to be recommended to the target player.
[0216] In one feasible implementation, when the processor 610 is used to determine the behavioral representation data of the target player by fusing the behavioral sequence, the profile features, and the purchase features using the left tower model of a pre-trained dual-tower prediction model, the processor 610 is specifically used to:
[0217] The feature fusion layer in the left tower model fuses the behavior sequence tensor of the behavior sequence, the portrait feature vector of the portrait feature, and the purchase feature vector of the purchase feature to obtain the fused feature vector of the target player.
[0218] By utilizing the feature encoding layer in the left tower model, the fused feature vector is feature encoded to obtain the behavior representation tensor of the target player behavior representation data.
[0219] In one feasible implementation, when the processor 610 is used to perform the fusion of the behavior sequence tensor of the behavior sequence, the portrait feature vector of the portrait feature, and the purchase feature vector of the purchase feature through the feature fusion layer in the left tower model to obtain the fused feature vector of the target player, it is specifically used for:
[0220] Referring to the portrait feature vector, the feature extraction module in the feature fusion layer is used to extract a specific behavior sequence from the behavior sequence tensor to obtain the target player's behavior tensor to be filtered.
[0221] The first filtering module in the feature fusion layer filters out invalid behavior sequences carried in the behavior tensor to be filtered, thereby obtaining the target behavior tensor of the target player.
[0222] The second filtering module in the feature fusion layer filters out invalid portrait features carried in the portrait feature vector to obtain the target portrait vector of the target player.
[0223] By concatenating the target behavior tensor, the target profile vector, and the purchase feature vector, the fused feature vector of the target player is obtained.
[0224] In one feasible implementation, when the processor 610 is used to perform the extraction of a specific behavior sequence from the behavior sequence tensor using the feature extraction module in the feature fusion layer, with reference to the portrait feature vector, to obtain the target player's behavior tensor to be filtered, it is specifically used for:
[0225] Referring to the portrait feature vector and the preset latent vector dimension, the specific behavior sequence carried in the behavior sequence tensor is determined through an attention mechanism; wherein, the latent vector dimension is determined through hyperparameter search;
[0226] The target player's filterable behavior tensor is composed of specific behavior tensors based on each specific behavior sequence.
[0227] In one feasible implementation, when the processor 610 executes the first filtering module in the feature fusion layer to filter out invalid behavior sequences carried in the behavior tensor to be filtered, and obtains the target player's target behavior tensor, it is specifically used for:
[0228] Linear processing is performed on the tensor of the behavior to be filtered or the portrait feature vector to determine the target filtering vector referenced when filtering invalid behavior sequences from the tensor of the behavior to be filtered.
[0229] Based on the target filtering vector, invalid behavior sequences carried in the tensor of behaviors to be filtered are filtered out by calculating the Hadamard product, thereby determining the target player's target behavior tensor.
[0230] In one feasible implementation, when the processor 610 is used to perform linear processing on the tensor of behavior to be filtered or the portrait feature vector to determine the target filtering vector referenced when filtering invalid behavior sequences from the tensor of behavior to be filtered, it is specifically used to:
[0231] A linear layer is used to perform a linear transformation on the tensor of the behavior to be filtered or the portrait feature vector to obtain the mapping filter vector corresponding to the tensor of the behavior to be filtered or the portrait feature vector.
[0232] The target filtering vector is obtained by applying a nonlinear transformation to the mapping filtering vector using an activation function.
[0233] In one feasible implementation, the processor 610 further performs the following steps to determine the purchase feature vector:
[0234] For each game gift pack data, determine the quantity of each gift pack item, the price characteristics of each gift pack item, and the product characteristics of each gift pack item;
[0235] For each gift package item, a price vector is determined based on the price characteristics and quantity of the gift package item.
[0236] Pool the price vector of each item in the gift pack to determine the price feature vector of the game gift pack data;
[0237] Based on the product characteristics and quantity of the gift package, determine the product feature vector of the gift package.
[0238] Pooling is performed on the product feature vector of each gift pack item to determine the gift pack feature vector of the game gift pack data;
[0239] Based on the price feature vector and the gift pack feature vector of the game gift pack data, determine the gift pack purchase vector of the game gift pack data;
[0240] The purchase feature vector is composed of the purchase vector of each game gift pack data.
[0241] In one feasible implementation, the processor 610 further performs the following steps to obtain the behavioral sequence tensor:
[0242] By using a pre-trained sequence encoder to extract features from multiple game behavior data generated by the target player during the game, the behavior sequence tensor of the target player's behavior representation data is determined.
[0243] In a feasible implementation, the processor 610 further performs the following steps to obtain the trained sequence encoder and the dual-tower prediction model:
[0244] Obtain the behavior sequence data corresponding to the training behavior data used for pre-training the initial sequence encoder;
[0245] By using a random mask, a portion of the sequence data in the behavior sequence data is randomly masked to obtain the masked behavior sequence data;
[0246] Using the initial sequence encoder, and combining the context information included in the masked behavior sequence data, the sequence data involved in the masked portion of the masked behavior sequence data is predicted to obtain the predicted sequence data;
[0247] Based on the predicted sequence data and the partial sequence data, the parameters involved in the initial sequence encoder are adjusted to obtain a preset number of pre-trained encoders;
[0248] Based on the model generalization metric of each pre-trained encoder, select the encoder to be trained from a preset number of pre-trained encoders;
[0249] The hyperparameter search method is used to perform an initial parameter search on multiple network hyperparameters involved in the dual-tower prediction model to determine the parameter value range of the multiple network hyperparameters.
[0250] A secondary parameter search is performed on the plurality of network hyperparameters within the range of the parameter values to determine multiple hyperparameter values for each network hyperparameter;
[0251] Based on multiple hyperparameter values for each network hyperparameter, and combined with multiple validation recommendation data included in the validation dataset, multiple dual-tower models to be trained are identified.
[0252] Obtain multiple training recommendation data for training the encoder to be trained and the multiple dual-tower models to be trained;
[0253] Using the training recommendation data, supervised training is performed on the encoder to be trained and the multiple dual-tower models to be trained to obtain the trained sequence encoder and the dual-tower prediction model.
[0254] In one feasible implementation, the processor 610, in performing the task of determining the recommendation match degree between the target player and each candidate recommended gift pack based on the behavioral representation data and the gift pack representation data, includes:
[0255] The recommendation matching degree between the target player and each candidate recommended gift pack is determined by calculating the inner product or cosine similarity between the behavioral representation data and the gift pack representation data.
[0256] By combining the target player's behavioral sequences, profile features, and purchase characteristics, the appropriate recommended gift packs can be more accurately determined, thus improving the accuracy of the recommendation results. Furthermore, considering the differences in data distribution between the behavioral sequence tensor and the profile feature vector, the fusion process cannot be accomplished simply by concatenating vectors (tensors). It requires a model with a complex structure to achieve feature fusion, maximizing the mutual complementarity between the two types of features and more comprehensively representing the multifaceted characteristics of the target player. Moreover, considering that the dual-tower prediction model involves multiple neural networks, manual adjustment... The hyperparameter efficiency involved in a whole neural network is extremely low. Therefore, in this case, we choose to quickly determine the hyperparameters involved in each neural network through hyperparameter search. Based on this, we adopt a "two-stage random hyperparameter search" method. The first round of parameter search narrows the parameter search range, and the second round of parameter search only performs random hyperparameter search within the search range determined in the first round. This minimizes the computational resources involved in the random hyperparameter search process. Here, considering the high training difficulty of the sequence encoder, we pre-train the sequence encoder before introducing it into the dual-tower prediction model to prevent the trained model from getting stuck in local optima.
[0257] This application embodiment also provides a computer-readable storage medium storing a computer program, which is executed by a processor, wherein the processor performs the following steps:
[0258] The system acquires the target player's behavior sequence, profile features, and purchase features; wherein, the behavior sequence includes game behavior data generated by the target player during gameplay; and the purchase features include game gift pack data generated by the target player purchasing game gift packs at specific points in time.
[0259] Using the left tower model in a pre-trained dual-tower prediction model, the behavioral sequence, the profile features, and the purchase features are fused to determine the behavioral representation data of the target player.
[0260] Based on the behavioral representation data and the gift pack representation data, the recommendation matching degree between the target player and each candidate recommended gift pack is determined; wherein, the gift pack representation data is determined by the right tower model in the dual-tower prediction model; the gift pack representation data includes the product characteristics and price characteristics of each candidate recommended gift pack;
[0261] Based on the matching degree of each candidate recommended gift pack, a target recommended gift pack is determined to be recommended to the target player.
[0262] In one feasible implementation, when the processor is used to determine the behavioral representation data of the target player by fusing the behavioral sequence, the profile features, and the purchase features using the left tower model of a pre-trained dual-tower prediction model, it is specifically used to:
[0263] The feature fusion layer in the left tower model fuses the behavior sequence tensor of the behavior sequence, the portrait feature vector of the portrait feature, and the purchase feature vector of the purchase feature to obtain the fused feature vector of the target player.
[0264] By utilizing the feature encoding layer in the left tower model, the fused feature vector is feature encoded to obtain the behavior representation tensor of the target player behavior representation data.
[0265] In a feasible implementation, when the processor is used to execute the feature fusion layer in the left tower model to fuse the behavior sequence tensor of the behavior sequence, the portrait feature vector of the portrait feature, and the purchase feature vector of the purchase feature to obtain the fused feature vector of the target player, it is specifically used for:
[0266] Referring to the portrait feature vector, the feature extraction module in the feature fusion layer is used to extract a specific behavior sequence from the behavior sequence tensor to obtain the target player's behavior tensor to be filtered.
[0267] The first filtering module in the feature fusion layer filters out invalid behavior sequences carried in the behavior tensor to be filtered, thereby obtaining the target behavior tensor of the target player.
[0268] The second filtering module in the feature fusion layer filters out invalid portrait features carried in the portrait feature vector to obtain the target portrait vector of the target player.
[0269] By concatenating the target behavior tensor, the target profile vector, and the purchase feature vector, the fused feature vector of the target player is obtained.
[0270] In a feasible implementation, when the processor is used to extract a specific behavior sequence from the behavior sequence tensor using the feature extraction module in the feature fusion layer, with reference to the portrait feature vector, to obtain the target player's behavior tensor to be filtered, it is specifically used for:
[0271] Referring to the portrait feature vector and the preset latent vector dimension, the specific behavior sequence carried in the behavior sequence tensor is determined through an attention mechanism; wherein, the latent vector dimension is determined through hyperparameter search;
[0272] The target player's filterable behavior tensor is composed of specific behavior tensors based on each specific behavior sequence.
[0273] In one feasible implementation, when the processor executes the first filtering module in the feature fusion layer to filter out invalid behavior sequences carried in the behavior tensor to be filtered, and obtains the target player's target behavior tensor, it is specifically used for:
[0274] Linear processing is performed on the tensor of the behavior to be filtered or the portrait feature vector to determine the target filtering vector referenced when filtering invalid behavior sequences from the tensor of the behavior to be filtered.
[0275] Based on the target filtering vector, invalid behavior sequences carried in the tensor of behaviors to be filtered are filtered out by calculating the Hadamard product, thereby determining the target player's target behavior tensor.
[0276] In one feasible implementation, when the processor performs linear processing on the tensor of behaviors to be filtered or the portrait feature vector to determine the target filtering vector referenced when filtering invalid behavior sequences from the tensor of behaviors to be filtered, it is specifically used for:
[0277] A linear layer is used to perform a linear transformation on the tensor of the behavior to be filtered or the portrait feature vector to obtain the mapping filter vector corresponding to the tensor of the behavior to be filtered or the portrait feature vector.
[0278] The target filtering vector is obtained by applying a nonlinear transformation to the mapping filtering vector using an activation function.
[0279] In one feasible implementation, the processor further performs the following steps to determine the purchase feature vector:
[0280] For each game gift pack data, determine the quantity of each gift pack item, the price characteristics of each gift pack item, and the product characteristics of each gift pack item;
[0281] For each gift package item, a price vector is determined based on the price characteristics and quantity of the gift package item.
[0282] Pool the price vector of each item in the gift pack to determine the price feature vector of the game gift pack data;
[0283] Based on the product characteristics and quantity of the gift package, determine the product feature vector of the gift package.
[0284] Pooling is performed on the product feature vector of each gift pack item to determine the gift pack feature vector of the game gift pack data;
[0285] Based on the price feature vector and the gift pack feature vector of the game gift pack data, determine the gift pack purchase vector of the game gift pack data;
[0286] The purchase feature vector is composed of the purchase vector of each game gift pack data.
[0287] In one feasible implementation, the processor further performs the following steps to obtain the behavioral sequence tensor:
[0288] By using a pre-trained sequence encoder to extract features from multiple game behavior data generated by the target player during the game, the behavior sequence tensor of the target player's behavior representation data is determined.
[0289] In a feasible implementation, the processor further performs the following steps to obtain the trained sequence encoder and the dual-tower prediction model:
[0290] Obtain the behavior sequence data corresponding to the training behavior data used for pre-training the initial sequence encoder;
[0291] By using a random mask, a portion of the sequence data in the behavior sequence data is randomly masked to obtain the masked behavior sequence data;
[0292] Using the initial sequence encoder, and combining the context information included in the masked behavior sequence data, the sequence data involved in the masked portion of the masked behavior sequence data is predicted to obtain the predicted sequence data;
[0293] Based on the predicted sequence data and the partial sequence data, the parameters involved in the initial sequence encoder are adjusted to obtain a preset number of pre-trained encoders;
[0294] Based on the model generalization metric of each pre-trained encoder, select the encoder to be trained from a preset number of pre-trained encoders;
[0295] The hyperparameter search method is used to perform an initial parameter search on multiple network hyperparameters involved in the dual-tower prediction model to determine the parameter value range of the multiple network hyperparameters.
[0296] A secondary parameter search is performed on the plurality of network hyperparameters within the range of the parameter values to determine multiple hyperparameter values for each network hyperparameter;
[0297] Based on multiple hyperparameter values for each network hyperparameter, and combined with multiple validation recommendation data included in the validation dataset, multiple dual-tower models to be trained are identified.
[0298] Obtain multiple training recommendation data for training the encoder to be trained and the multiple dual-tower models to be trained;
[0299] Using the training recommendation data, supervised training is performed on the encoder to be trained and the multiple dual-tower models to be trained to obtain the trained sequence encoder and the dual-tower prediction model.
[0300] In one feasible implementation, the processor, in performing the task of determining the recommendation match degree between the target player and each candidate recommended gift pack based on the behavioral representation data and the gift pack representation data, includes:
[0301] The recommendation matching degree between the target player and each candidate recommended gift pack is determined by calculating the inner product or cosine similarity between the behavioral representation data and the gift pack representation data.
[0302] By combining the target player's behavioral sequences, profile features, and purchase characteristics, the appropriate recommended gift packs can be more accurately determined, thus improving the accuracy of the recommendation results. Furthermore, considering the differences in data distribution between the behavioral sequence tensor and the profile feature vector, the fusion process cannot be accomplished simply by concatenating vectors (tensors). It requires a model with a complex structure to achieve feature fusion, maximizing the mutual complementarity between the two types of features and more comprehensively representing the multifaceted characteristics of the target player. Moreover, considering that the dual-tower prediction model involves multiple neural networks, manual adjustment... The hyperparameter efficiency involved in a whole neural network is extremely low. Therefore, in this case, we choose to quickly determine the hyperparameters involved in each neural network through hyperparameter search. Based on this, we adopt a "two-stage random hyperparameter search" method. The first round of parameter search narrows the parameter search range, and the second round of parameter search only performs random hyperparameter search within the search range determined in the first round. This minimizes the computational resources involved in the random hyperparameter search process. Here, considering the high training difficulty of the sequence encoder, we pre-train the sequence encoder before introducing it into the dual-tower prediction model to prevent the trained model from getting stuck in local optima.
[0303] Through the above methods, those skilled in the art can clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0304] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the shown or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0305] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0306] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0307] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0308] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The scope of protection of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application. Such modifications, changes, or substitutions 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 this application, and should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A recommendation method, characterized in that, The recommendation method includes: The system acquires the target player's behavior sequence, profile features, and purchase features; wherein, the behavior sequence includes game behavior data generated by the target player during gameplay; and the purchase features include game gift pack data generated by the target player purchasing game gift packs at specific points in time. Using the left tower model in a pre-trained dual-tower prediction model, the behavioral sequence, the profile features, and the purchase features are fused to determine the behavioral representation data of the target player. Based on the behavioral representation data and the gift pack representation data, the recommendation matching degree between the target player and each candidate recommended gift pack is determined; wherein, the gift pack representation data is determined by the right tower model in the dual-tower prediction model; the gift pack representation data includes the product characteristics and price characteristics of each candidate recommended gift pack; Based on the recommendation matching degree of each candidate recommended gift pack, a target recommended gift pack is determined to be recommended to the target player; The step of using the left tower model in a pre-trained dual-tower prediction model to fuse the behavior sequence, the profile features, and the purchase features to determine the behavioral representation data of the target player includes: Referring to the portrait feature vector, the feature extraction module in the feature fusion layer of the left tower model is used to extract a specific behavior sequence from the behavior sequence tensor to obtain the target player's behavior tensor to be filtered. The first filtering module in the feature fusion layer performs linear processing on the tensor of behavior to be filtered or the portrait feature vector to determine the target filtering vector referenced when filtering invalid behavior sequences from the tensor of behavior to be filtered. Based on the target filtering vector, invalid behavior sequences carried in the tensor of behavior to be filtered are filtered out by calculating the Hadamard product, and the target behavior tensor of the target player is determined. The second filtering module in the feature fusion layer filters out invalid portrait features carried in the portrait feature vector to obtain the target portrait vector of the target player. By concatenating the target behavior tensor, the target profile vector, and the purchase feature vector, the fused feature vector of the target player is obtained. By utilizing the feature encoding layer in the left tower model, the fused feature vector is feature encoded to obtain the behavior representation tensor of the target player behavior representation data.
2. The recommended method according to claim 1, characterized in that, Referring to the portrait feature vector, the feature extraction module in the feature fusion layer extracts a specific behavior sequence from the behavior sequence tensor to obtain the target player's behavior tensor to be filtered, including: Referring to the portrait feature vector and the preset latent vector dimension, the specific behavior sequence carried in the behavior sequence tensor is determined through an attention mechanism; wherein, the latent vector dimension is determined through hyperparameter search; The target player's filterable behavior tensor is composed of specific behavior tensors based on each specific behavior sequence.
3. The recommended method according to claim 1, characterized in that, The step of performing linear processing on the tensor of the behavior to be filtered or the portrait feature vector to determine the target filtering vector referenced when filtering invalid behavior sequences from the tensor of the behavior to be filtered includes: A linear layer is used to perform a linear transformation on the tensor of the behavior to be filtered or the portrait feature vector to obtain the mapping filtering vector corresponding to the tensor of the behavior to be filtered or the portrait feature vector. The target filtering vector is obtained by applying a nonlinear transformation to the mapping filtering vector using an activation function.
4. The recommended method according to claim 1, characterized in that, The purchase feature vector is determined through the following steps: For each game gift pack data, determine the quantity of each gift pack item, the price characteristics of each gift pack item, and the product characteristics of each gift pack item; For each gift package item, a price vector is determined based on the price characteristics and quantity of the gift package item. Pool the price vector of each item in the gift pack to determine the price feature vector of the game gift pack data; Based on the product characteristics and quantity of the gift package, determine the product feature vector of the gift package. Pooling is performed on the product feature vector of each gift pack item to determine the gift pack feature vector of the game gift pack data; Based on the price feature vector and the gift pack feature vector of the game gift pack data, determine the gift pack purchase vector of the game gift pack data; The purchase feature vector is composed of the purchase vector of each game gift pack data.
5. The recommended method according to claim 1, characterized in that, The behavior sequence tensor is obtained through the following steps: By using a pre-trained sequence encoder to extract features from multiple game behavior data generated by the target player during the game, the behavior sequence tensor of the target player's behavior representation data is determined.
6. The recommended method according to claim 5, characterized in that, The trained sequence encoder and the dual-tower prediction model are obtained through the following steps: Obtain the behavior sequence data corresponding to the training behavior data used for pre-training the initial sequence encoder; By using a random mask, a portion of the sequence data in the behavior sequence data is randomly masked to obtain the masked behavior sequence data; Using the initial sequence encoder, and combining the context information included in the masked behavior sequence data, the sequence data involved in the masked portion of the masked behavior sequence data is predicted to obtain the predicted sequence data; Based on the predicted sequence data and the partial sequence data, the parameters involved in the initial sequence encoder are adjusted to obtain a preset number of pre-trained encoders; By combining the model generalization metrics of each pre-trained encoder, an encoder to be trained is selected from a preset number of pre-trained encoders; The hyperparameter search method is used to perform an initial parameter search on multiple network hyperparameters involved in the dual-tower prediction model to determine the parameter value range of the multiple network hyperparameters. A secondary parameter search is performed on the plurality of network hyperparameters within the range of the parameter values to determine multiple hyperparameter values for each network hyperparameter; Based on multiple hyperparameter values for each network hyperparameter, and combined with multiple validation recommendation data included in the validation dataset, multiple dual-tower models to be trained are identified. Obtain multiple training recommendation data for training the encoder to be trained and the multiple dual-tower models to be trained; Using the training recommendation data, supervised training is performed on the encoder to be trained and the multiple dual-tower models to be trained to obtain the trained sequence encoder and the dual-tower prediction model.
7. The recommended method according to claim 1, characterized in that, The step of determining the recommendation matching degree between the target player and each candidate recommended gift pack based on the behavioral representation data and the gift pack representation data includes: The recommendation matching degree between the target player and each candidate recommended gift pack is determined by calculating the inner product or cosine similarity between the behavioral representation data and the gift pack representation data.
8. A recommended device, characterized in that, The recommendation device includes: The vector acquisition module is used to acquire the target player's behavior sequence, profile features, and purchase features; wherein, the behavior sequence includes game behavior data generated by the target player during the game; the purchase features include game gift pack data generated by the target player purchasing game gift packs at specific points in time; The feature fusion module is used to fuse the behavior sequence, the profile features, and the purchase features using the left tower model in the pre-trained dual-tower prediction model to determine the behavioral representation data of the target player. The matching degree prediction module is used to determine the recommendation matching degree between the target player and each candidate recommended gift pack based on the behavioral representation data and the gift pack representation data; wherein, the gift pack representation data is determined by the right tower model in the dual-tower prediction model; the gift pack representation data includes the product characteristics and price characteristics of each candidate recommended gift pack; The gift pack recommendation module is used to determine the target recommended gift pack to the target player based on the recommendation matching degree of each candidate recommended gift pack; When the feature fusion module is used to fuse the behavior sequence, the profile features, and the purchase features using the left tower model in a pre-trained dual-tower prediction model to determine the behavioral representation data of the target player, the feature fusion module is used to: Referring to the portrait feature vector, the feature extraction module in the feature fusion layer of the left tower model is used to extract a specific behavior sequence from the behavior sequence tensor to obtain the target player's behavior tensor to be filtered. The first filtering module in the feature fusion layer performs linear processing on the tensor of behavior to be filtered or the portrait feature vector to determine the target filtering vector referenced when filtering invalid behavior sequences from the tensor of behavior to be filtered. Based on the target filtering vector, invalid behavior sequences carried in the tensor of behavior to be filtered are filtered out by calculating the Hadamard product, and the target behavior tensor of the target player is determined. The second filtering module in the feature fusion layer filters out invalid portrait features carried in the portrait feature vector to obtain the target portrait vector of the target player. By concatenating the target behavior tensor, the target profile vector, and the purchase feature vector, the fused feature vector of the target player is obtained. By utilizing the feature encoding layer in the left tower model, the fused feature vector is feature encoded to obtain the behavior representation tensor of the target player behavior representation data.
9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory via the bus, and the machine-readable instructions are executed by the processor to perform the steps of the recommended method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the recommended method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Game gift bag pushing method and device, electronic equipment and storage medium
CN115120983A