A Prop Recommendation Method, Device, Electronic Device and Storage Medium
By prioritizing the recall rate in the prop recommendation method and applying different prop attribute characteristics at different stages, the problems of waste of computing resources and inaccurate recommendation results in the existing technology are solved, and more efficient and accurate prop recommendations are achieved.
Patent Information
- Application Number
- CN202211215895.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-30
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-09-30
AI Technical Summary
Among the existing prop recommendation methods, the second-stage modeling method adopts full prop attribute characteristics, resulting in wasted computing resources and the recommendation results are not objective and accurate enough.
In the prop recommendation method, by prioritizing the recall rate and applying different prop attribute features at different stages, the prop prediction model and the prop recommendation model are used to process the initial recommendation and the final recommendation respectively to avoid the reuse of prop attribute features.
It reduces the waste of computer resources, improves the objective accuracy of recommendation results, and achieves the purpose of reasonably recommending props for users.
Smart Images

Figure CN115445213B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine learning technology. Specifically, it relates to a prop recommendation method, device, electronic device, and storage medium. Background Art
[0002] In the prop recommendation scenario, it is required to recommend as many props as possible that the user will purchase. In the prior art, a two-stage modeling method is often used to recommend props. For example, the Voting model establishes several binary classification (outputting 0 or 1) models in the first stage, and in the second stage, votes are cast using the results given by all the models in the first stage to see whether the number of 0s or 1s is more. The one with more votes is the finally predicted recommended prop; or the Stacking model establishes n binary classification models in the first stage, and the n binary classification models output n results. In the second stage, these n results are used as input features and input into the model in the second stage, and the output (0 or 1) of the second stage is used as the finally predicted recommended prop.
[0003] However, in the current two-stage modeling method, the prop attribute features of all props (all props refer to props that are allowed to be purchased. For example, when the level of a virtual character reaches 10, 305 props are allowed to be purchased, and when the level of the virtual character reaches 20, 360 props are allowed to be purchased) are used in both stages. This not only wastes computer resources but also easily leads to inaccurate and objective evaluation results of the model, resulting in unreasonable prop recommendations for users. Summary of the Invention
[0004] In view of this, this application provides a prop recommendation method, device, electronic device, and storage medium, which can give priority to recall rate in the prop recommendation scenario and mainly apply different prop attribute features of props in different stages. It can not only save computer resources but also make the recommendation results obtained through the two-stage model objective and accurate, thus achieving the purpose of reasonably recommending props for users.
[0005] In a first aspect, an embodiment of this application provides a virtual prop recommendation method, and the method includes:
[0006] Obtain the prop attribute features of the props to be recommended;
[0007] According to the obtained prop attribute features of the props to be recommended and the trained prop prediction model, predict the initial recommended props from the props to be recommended; wherein, the recall rate of the prop prediction model is not less than a preset recall rate threshold;
[0008] Determine the final recommended item according to the first target item attribute feature of the initial recommended item and the trained item recommendation model; wherein, the first target item attribute feature includes the item attribute features with weights not greater than a preset weight threshold, and the weight represents the influence degree of the item attribute feature on the prediction when the item prediction model predicts the initial recommended item.
[0009] In a second aspect, an embodiment of the present application further provides an item recommendation device, and the device includes:
[0010] A feature acquisition module, configured to acquire the item attribute features of the item to be recommended;
[0011] An initial recommendation module, configured to predict an initial recommended item from the items to be recommended according to the item attribute features of the item to be recommended obtained and the trained item prediction model; wherein, the recall rate of the item prediction model is not less than a preset recall rate threshold;
[0012] A final recommendation module, configured to determine the final recommended item according to the first target item attribute feature of the initial recommended item and the trained item recommendation model; wherein, the first target item attribute feature includes the item attribute features with weights not greater than a preset weight threshold, and the weight represents the influence degree of the item attribute feature on the prediction when the item prediction model predicts the initial recommended item.
[0013] In a third aspect, an embodiment of the present application further 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 runs, the processor communicates with the memory through the bus, and when the processor executes the machine-readable instructions, it executes the item recommendation method as described above.
[0014] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, it executes the item recommendation method as described above.
[0015] The technical solution provided by the present application has the following beneficial effects:
[0016] Compared with the existing two-stage modeling method in which the prop attribute features of all props are used in both stages and there is no stage that clearly adjusts the accuracy rate or the recall rate, when using the prop prediction model in the embodiments of the present application, the prop attribute features of the to-be-recommended props are mainly processed. Here, the prop prediction model actually processes the prop attribute features that have a greater influence on the prediction of the recommended props in the prop attribute features. When using the prop recommendation model, the prop attribute features that have a certain influence on the prediction of the recommended props but are different from those used in the prop prediction model are mainly used. In this way, the prop attribute features mainly applied by the models in the two stages are different, which can avoid the repeated use of the same prop attribute features, thereby reducing the waste of computer resources and improving the computer performance. Moreover, the embodiments of the present application can also give priority to the recall rate in the prop prediction model corresponding to the first stage, so that the recommendation results obtained through the two-stage model are objective and accurate, thereby achieving the purpose of reasonably recommending props to users.
[0017] To make the above objects, features, and advantages of the present application more obvious and understandable, the following specifically enumerates preferred embodiments and, in conjunction with the accompanying drawings, makes a detailed description as follows. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] To more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required to be used in the embodiments. It should be understood that the following drawings only show some embodiments of the present application and should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0019] Figure 1 It is a flowchart of a prop recommendation method provided by an embodiment of the present application;
[0020] Figure 2 It is a schematic structural diagram of a prop recommendation device provided by an embodiment of the present application;
[0021] Figure 3 It is a schematic structural diagram of another prop recommendation device provided by an embodiment of the present application;
[0022] Figure 4 It is a schematic structural diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0023] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are only a part rather than all of the embodiments of the present application. Components of the embodiments of the present application usually described and illustrated in the accompanying drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the claimed present application, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, every other embodiment obtained by those skilled in the art without creative efforts belongs to the scope of protection of the present application.
[0024] First, the applicable application scenarios of the present application will be introduced. The present application can be applied to the prop recommendation scenario. In the prop recommendation scenario, it is required to recommend as many props as possible that the user will purchase. In the prior art, a two-stage modeling method is often used to recommend props. For example, in the first stage of the Voting model, several binary classification (output 0 or 1) models are established. In the second stage, the results given by all the models in the first stage are used for voting to see whether the number of 0s or the number of 1s is more. The one with more votes is the finally predicted recommended prop; or in the first stage of the Stacking model, n binary classification models are established, and the n binary classification models output n results. In the second stage, these n results are used as input features and input into the model in the second stage, and the output (0 or 1) of the second stage is used as the finally predicted recommended prop.
[0025] However, in the current two-stage modeling method, the prop attribute features of all props (all props refer to props that are allowed to be purchased. For example, when the level of a virtual character reaches 10, 305 props are allowed to be purchased, and when the level of the virtual character reaches 20, 360 props are allowed to be purchased) are used in both stages; at the same time, there is no primary or secondary distinction in the tuning process of accuracy and recall rate in the two stages, that is, there is no stage that clearly adjusts the accuracy or clearly adjusts the recall rate. This not only wastes computer resources but also easily leads to the evaluation results of the model being not objectively accurate enough, resulting in the props recommended to the user being not reasonable enough.
[0026] Based on this, the embodiments of the present application provide a prop recommendation method, which can give priority to recall rate in the prop recommendation scenario and mainly apply different prop attribute features of props in different stages. It can not only save computer resources but also make the recommendation results obtained through the two-stage model objective and accurate, so as to achieve the purpose of reasonably recommending props to users.
[0027] Please refer to Figure 1 , Figure 1 which is a flowchart of a prop recommendation method provided by the embodiments of the present application. AsFigure 1 As shown in Figure 1 , the prop recommendation method provided by the embodiment of the present application includes:
[0028] S101. Obtain the prop attribute features of the prop to be recommended;
[0029] S102. According to the obtained prop attribute features of the prop to be recommended and the trained prop prediction model, predict the initial recommended prop from the props to be recommended; wherein, the recall rate of the prop prediction model is not less than the preset recall rate threshold;
[0030] S103. Determine the final recommended prop according to the first target prop attribute features of the initial recommended prop and the trained prop recommendation model; wherein, the first target prop attribute features include the prop attribute features with weights not greater than the preset weight threshold in the prop attribute features, and the weight represents the influence degree of the prop attribute features on the prediction when the prop prediction model predicts the initial recommended prop.
[0031] In the above steps, first obtain the prop attribute features of each prop to be recommended from the historical game data; here, since the information in the historical game data is relatively rich, by obtaining the prop attribute features of the props to be recommended from the historical game data, it can provide sufficient training samples for the training of the prop prediction model and the prop recommendation model. At the same time, the prop attribute features included in the historical game data have a relatively high relevance to the recommended props, that is, the prop attribute features used for the training of the prop prediction model and the prop recommendation model are relatively accurate, thereby improving the accuracy and precision of model training.
[0032] In this way, according to the obtained prop attribute features of each prop to be recommended and the trained prop prediction model, predicting the initial recommended prop from the props to be recommended can make the prediction of the prop prediction model more accurate; wherein, the first recommendation probability threshold is determined according to the recall rate of the prop prediction model. Here, predicting the initial recommended prop from multiple props to be recommended according to the recall rate of the prop prediction model, since the recall rate is given priority, this can make the goal of the prop prediction model consistent with the actual requirements. In addition, by screening out the initial recommended prop from multiple props to be recommended, it can avoid a large number of props to be processed by the subsequent prop recommendation model, thereby reducing the workload of the prop recommendation model. Here, the recall rate is given priority in the prop prediction model corresponding to the first stage.
[0033] Finally, based on the first target prop attribute features of the initial recommended prop and the trained prop recommendation model, the final recommended prop is determined; wherein, the first target prop attribute features include the prop attribute features with weights not greater than the preset weight threshold in the prop attribute features, and the weight represents the influence degree of the prop attribute features on the prediction when the prop prediction model predicts the initial recommended prop. Here, the prop recommendation model mainly considers the prop attribute features that have a certain influence on the prediction of the recommended prop but are different from the prop attribute features used in the prop prediction model. The prop prediction model mainly processes the prop attribute features that have a greater influence on the prediction of the recommended prop. In this way, the prop attribute features mainly applied by the models in the two stages are different, which can avoid the repeated use of the same prop attribute features, thereby reducing the waste of computer resources and improving the computer performance.
[0034] In summary, the embodiments of the present application can give priority to the recall rate in the prop recommendation scenario and mainly apply different prop attribute features of the prop at different stages, which can not only save computer resources, but also make the recommendation results obtained by the two-stage model objective and accurate, so as to achieve the purpose of reasonably recommending props for users.
[0035] In step S101, the prop attribute features of the prop to be recommended are obtained.
[0036] Among them, the prop attribute features include the prop inherent attribute features and the prop custom attribute features; the prop inherent attribute features refer to the attribute features that the prop itself has set by the game rules; the prop custom attribute features refer to the attribute features associated with prop recommendation statistically obtained from the historical game data.
[0037] Here, the historical game data refers to the game data recorded by the system when multiple players perform relevant game operations, and the game data is the feedback of the players on the game content. The content of the historical game data may include, but is not limited to: the current price of the prop, the attack power of the prop, the lucky value of the prop, whether the sect to which the prop belongs (Shaolin sect, Wudang sect, etc.) is the sect of the player, whether the prop is worn by a female character (virtual character gender, not the real player gender) or a male character, the number of times the player has purchased the prop historically, the number of times the player has purchased this type of prop in the last month, the price increase of the prop in the (in-game) market on the same day, the most popular prop color, the longest time since the prop was launched, the number of friends who own the prop, etc.
[0038] Among them, the inherent property features of the item are the property features that the item itself has set by the game rules and do not change with the change of the user's usage conditions. For example, the current price of the item, the attack power of the item, the lucky value of the item, etc. are set during game development; the user-defined property features of the item will change with the change of the user's usage conditions and are mainly statistically obtained from historical game data. These user-defined property features of the item are the property features associated with item recommendation.
[0039] Specifically, step S101 includes the following steps:
[0040] Step 1011: Obtain the user-defined property features of each item to be recommended from historical game data; among them, the user-defined property features of the item are used to represent the property features generated due to the interaction behavior between the item to be recommended and the user.
[0041] Step 10,12: Obtain the inherent property features of the item itself set according to the game rules.
[0042] Step 1013: Based on the user-defined property features and the inherent property features of the item to be recommended, obtain the property features of each item to be recommended.
[0043] In the above manner, the user-defined property features and the inherent property features of the item are used as the property features of each item to be recommended, and the property features of the item are comprehensively analyzed from two dimensions, improving the comprehensiveness and accuracy of the property features of the item. Furthermore, using the relatively comprehensive property features of the item to train the item prediction model or the item recommendation model can ensure the training accuracy of the item prediction model or the item recommendation model, as well as the prediction accuracy of the recommendation probability.
[0044] Specifically, in step 1011, the user-defined property features of the item represent the property features generated due to the interaction behavior between the item to be recommended and the user. Exemplarily, the user-defined property features of the item include but are not limited to: whether the sect to which the item belongs (Shaolin Sect, Wudang Sect, etc.) is the sect of this player, whether the item is worn by a female character (virtual character gender, not the real player's gender) or a male character, the number of times this player has purchased this item in history, the number of times this player has purchased this type of item in the most recent month, the price increase of this item in the (in-game) market on the same day, the most popular item color, the longest time since the item was launched, and the number of friends who own this item.
[0045] Among them, the system can automatically extract the user-defined property features of the item to be recommended from historical game data and store them on the server for subsequent invocation.
[0046] In addition, since the custom property features of items are property features generated by the interaction behavior between the items to be recommended and the user, when recommending items based on the custom property features of items, recommendation information can be displayed on the graphical user interface. For example, if the game developer believes that "purple" items may need to be recommended first, "color" can be taken as an important consideration factor. If the game developer believes that items that have been launched for a long time should be recommended first, "launch time" can be taken as an important consideration factor. However, these two item property features are not among the several strong item property features for the item prediction model in the first stage and belong to "sub-strong" features, but still try to meet the user requirements in the second stage. In this way, "Recommendation reason: Recommended by the game developer" can be written under the advertisement column; for another example, an item property feature "the number of friends who own this equipment" is considered a "sub-strong feature" by the item prediction model in the first stage. However, in the second stage, the influence of those "strongest features" can be eliminated to further consider the role of "the number of friends who own this equipment", and "Recommendation reason: Friends also have this equipment" can be written under the advertisement column.
[0047] In step 1012, the item inherent property features refer to the property features associated with item recommendation. Exemplarily, the item inherent property features include but are not limited to: the current price of the item, the attack power of the item, the lucky value of the item, and the school to which the item belongs.
[0048] Among them, the system can automatically extract the item inherent property features of the item to be recommended from historical game data, or directly save these set parameters on the server during game development for calling.
[0049] In step 1013, the custom property features and inherent property features of the item to be recommended obtained are merged to obtain the item property features of each item to be recommended. Among them, the custom property features and inherent property features of the item can be obtained through different methods, or can be extracted from historical game data at the same time.
[0050] In this way, since the information in historical game data is relatively rich, by obtaining the custom property features of the item to be recommended from historical game data, the purpose of comprehensively and fully analyzing the item property features of the item to be recommended can be achieved, providing sufficient training samples for the training of the item prediction model or item recommendation model.
[0051] In step S102, based on the item property features of the item to be recommended obtained and the trained item prediction model, the initial recommended items are predicted from the items to be recommended; among them, the recall rate of the item prediction model is not less than the preset recall rate threshold.
[0052] In the above steps, the prop attribute features of the props to be recommended obtained are input into the trained prop prediction model to obtain the recommendation probability of each prop to be recommended; the props to be recommended with a recommendation probability not less than the first recommendation probability threshold are determined as the initial recommended props, where the first recommendation probability threshold is determined according to the recall rate of the prop prediction model.
[0053] Here, the input of the prop prediction model is the prop attribute features of each prop to be recommended, and the output is the recommendation probability of each prop to be recommended.
[0054] Specifically, the prop prediction model is trained through the following steps:
[0055] Step 1021: Obtain the prop attribute features and recommendation probabilities of each recommended prop in the recommended prop sample, and the prop attribute features of each non-recommended prop in the non-recommended prop sample.
[0056] Step 1022: Based on the obtained prop attribute features and recommendation probabilities of each recommended prop, and the prop attribute features of each non-recommended prop, train the pre-constructed first classifier to obtain the trained prop prediction model.
[0057] Based on the prop attribute features and recommendation probabilities of each recommended prop and the prop attribute features and recommendation probabilities of each non-recommended prop (the recommendation probability of each non-recommended prop is 0), train the pre-constructed first classifier to obtain the trained prop prediction model; where the prop prediction model is used to output the recommendation probability that the prop to be recommended is an initial recommended prop.
[0058] In the above steps 1021 - 1022, the prop attribute features of the recommended props are used as positive samples, and the prop attribute features of the non-recommended props are used as negative samples to complete the training of the prop prediction model through positive and negative samples.
[0059] Through the above method, by making full use of the prop attribute features of each recommended prop and the prop attribute features of each non-recommended prop, the data volume of the samples and the diversity of the training data can be increased, so that the accuracy of the prop prediction model trained by the prop attribute features of each recommended prop and the prop attribute features of each non-recommended prop is higher, thereby improving the accuracy of the prop prediction model in predicting the recommendation probability.
[0060] Here, in the training stage of the prop prediction model, the first recommendation probability threshold is determined through the following steps:
[0061] Step S1023: Adjust the preset recommendation probability threshold of the prop prediction model until the recall rate of the prop prediction model is not less than the preset recall rate threshold, and determine the adjusted preset recommendation probability threshold as the first recommendation probability threshold.
[0062] Specifically, recall = TP / (TP + FN) (how many items that users will purchase are recommended); where TP is the number of samples with the true category being positive and being predicted as positive (items that users will truly purchase, predicted as "recommended items"); FN is the number of samples that are truly positive but predicted as negative (items that users will truly purchase, predicted as "non-recommended items").
[0063] Among them, the recall of the item prediction model is determined through the following steps: According to the preset recommendation probability threshold of the item prediction model, determine the number of initial recommended items with a recommendation probability greater than the preset recommendation probability threshold; according to the ratio between the number of initial recommended items and the sample size of the recommended item samples, determine the recall of the item prediction model.
[0064] Among them, the specific value of the first recommendation probability threshold can be determined according to the recall. As for what the recall is, it can be defined in advance according to the actual scenario (such as the number of advertising slots). When the number of advertising slots is small, the recall is relatively high, such as 99% - 99.9%, etc.; when the number of advertising slots is large, the recall is relatively low, such as 90% - 95%, etc. Furthermore, the higher the recall, the more items that users will purchase can be recommended as much as possible.
[0065] In the above steps, the first recommendation probability threshold can be obtained according to the above calculation formula of the recall; among them, there is a negative correlation between the first recommendation probability threshold and the recall. Here, for the same item prediction model, the larger the recall, the smaller the first recommendation probability threshold. Because by lowering the first recommendation probability threshold, the range of the number of initial recommended items is increased, making the probability that items that users will truly purchase are not recommended decrease.
[0066] It should be noted that for different models, there is also a negative correlation between the first recommendation probability threshold and the recall. It's just that for different models, their negative correlation is not fixed. For example, for the trained SVM model svm1, when the first recommendation probability threshold is 0.8, the recall can reach 70%; when the first recommendation probability threshold is 0.9, the recall can reach 65%; another example is the trained XGboost model, when the first recommendation probability threshold is 0.8, the recall can reach 90%, and when the first recommendation probability threshold is 0.9, the recall can reach 50%; another example is the trained SVM model svm2, when the first recommendation probability threshold is 0.8, the recall can reach 72%; when the first recommendation probability threshold is 0.9, the recall can reach 66%.
[0067] Through the above method, the first recommendation probability threshold is determined according to the recall, and the first recommendation probability threshold changes with the change of the recall. In this way, the first recommendation probability threshold is determined, which can improve the accuracy of determining the first recommendation probability threshold.
[0068] In an alternative embodiment, step S1023 specifically includes: determining the recall rate of the prop prediction model according to a preset recommended probability threshold of the prop prediction model set in advance; if the recall rate of the prop prediction model is not less than a preset recall rate threshold, determining the preset recommended probability threshold as the first recommended probability threshold; if the recall rate of the prop prediction model is less than the preset recall rate threshold, adjusting the preset recommended probability threshold until the recall rate of the prop prediction model is not less than the preset recall rate threshold, and determining the adjusted preset recommended probability threshold as the first recommended probability threshold.
[0069] In the above manner, the first recommended probability threshold can be adjusted in real time according to the recall rate, so as to ensure a one-to-one correspondence between the first recommended probability threshold and the recall rate. Furthermore, the initial recommended props screened by the first recommended probability threshold meet the recall rate requirements.
[0070] In step S103, the final recommended props are determined according to the first target prop attribute features of the initial recommended props and the trained prop recommendation model.
[0071] Among them, the first target prop attribute features include the prop attribute features with weights not greater than a preset weight threshold in the prop attribute features, and the weight represents the influence degree of the prop attribute features on the prediction when the prop prediction model predicts the initial recommended props.
[0072] Here, the weight of each prop attribute feature is determined through the following steps:
[0073] Determining the importance evaluation value of each prop attribute feature from the trained prop prediction model by calling the feature weight function; performing normalization processing on the importance evaluation value of each prop attribute feature to obtain the weight of each prop attribute feature.
[0074] Exemplarily, after a prop prediction model is fitted / trained to obtain a model object, the importance evaluation value of each prop attribute feature can be obtained through the feature_importance function. Those with a large importance evaluation value are called strong features, and those with a small importance evaluation value are called weak features. Among them, the feature_importance function can be the feature_importance function of a random forest, or the feature_importance function of other machine models, such as SVM, XGBoost, Logistic Regression, GBDT, etc., which are not specifically limited here. Similarly, there is no limit on whether the prop prediction model and the prop recommendation model are of the same type.
[0075] Through the above method, the importance evaluation value of each prop attribute feature can be quickly determined from the trained prop prediction model, and then the weight of each prop attribute feature can be determined, improving the modeling efficiency.
[0076] In an alternative embodiment, the first target prop attribute features include: prop attribute features with weights not greater than a preset weight threshold among the prop attribute features; or, prop attribute features with weights not greater than the preset weight threshold and not less than a first preset weight threshold among the prop attribute features, where the preset weight threshold is greater than the first preset weight threshold; and / or, prop attribute features corresponding to a specified weight. The following will explain these three cases separately:
[0077] For the first case, the first target prop attribute features are prop attribute features with weights not greater than the preset weight threshold among the prop attribute features. Furthermore, the first target prop attribute features are determined through the following steps: Sort the prop attribute features of each initial recommended prop according to the magnitude of the weights corresponding to the prop attribute features to obtain the ranking of the prop attribute features corresponding to each initial recommended prop; Starting from the prop attribute feature corresponding to the largest weight, sequentially select prop attribute features according to the prop attribute feature ranking until the sum of the weights corresponding to the selected multiple prop attribute features is not less than a preset weight sum threshold, and determine each selected prop attribute feature as a second target prop attribute feature; Remove the second target prop attribute features from the prop attribute features of each initial recommended prop to obtain the first target prop attribute features of each initial recommended prop.
[0078] In the above steps, there are k second target prop attribute features, and the k second target prop attribute features can be determined according to the weights corresponding to each prop attribute feature obtained after the training of the prop prediction model in the first stage. Specifically, normalization processing can be performed, and here the weights of the second target prop attribute features can be directly called, where the prop attribute features are the attributes that the prop prediction model has after training. Sort the prop attribute features in descending order according to the weights corresponding to the prop attribute features, and select all prop attribute features with a weight sum not less than the preset weight sum threshold as the k second target prop attribute features. Exemplarily, after sorting the prop attribute features in descending order of weights, calculate the sum of the weights corresponding to the prop attribute features. When the sum result is greater than 50%, select the part of the prop attribute features participating in the sum calculation as the k second target prop attribute features. Removing the k second target prop attribute features from the prop attribute features of each initial recommended prop can obtain the first target prop attribute features of each initial recommended prop.
[0079] Through the above steps, k second target item attribute features (item attribute features with a greater impact on the recommendation probability) are removed from the item attribute features, and the training features for training the item recommendation model can be obtained. In this way, the item attribute features mainly used by the models in the two stages are different, which can avoid the repeated use of the same item attribute features, thereby reducing the waste of computer resources and improving computer performance.
[0080] In related solutions, considering that the weights of different types of models for the same item attribute feature are different. For example, if the item prediction model uses a random forest model, it may consider item attribute feature a, item attribute feature b, item attribute feature c, and item attribute feature d as the second target item attribute features, while if the GBDT model is used as the item prediction model, it may consider item attribute feature a, item attribute feature e, item attribute feature f, and item attribute feature b as the second target item attribute features.
[0081] To improve the pertinence of different types of models for different item attribute features, the first target item attribute features in the embodiments of this application adopt the second case: the item attribute features with weights not greater than the preset weight threshold and not less than the first preset weight threshold in the item attribute features are determined as the first target item attribute features. Specifically, the second target item attribute features are removed from the multiple item attribute features of each initial recommended item, and a preset number of item attribute features are selected from the remaining item attribute features in order of the ranking of the item attribute features to obtain the first target item attribute features of each initial recommended item; where the preset number is less than the number of the remaining item attribute features.
[0082] Here, the Kth to Jth "sub-strong" features can be directly selected as the training features of the item recommendation model, where the number between the Kth and Jth satisfies the preset number. Through the above method, the training features for the item recommendation model can be made more targeted, and the accuracy of the item recommendation model trained in this way is higher.
[0083] For the third case, the first target item attribute features can be selected as the item attribute features corresponding to the specified weight. Among them, the specified weight can be the weight specified in advance by the user. Exemplarily, 15 item attribute features selected by game developers or marketers are used as the first target item attribute features.
[0084] Through the above method, the first target item attribute features suitable for training the item recommendation model can be selected more accurately from the item attribute features, that is, the first target item attribute features can be located more precisely.
[0085] For the fourth case, the first target item attribute features include the item attribute features in the item attribute features whose weights are not greater than the preset weight threshold and not less than the first preset weight threshold, and the item attribute features corresponding to the specified weight. Exemplarily, 3 item attribute features randomly selected by game developers or marketers and the first 12 item attribute features among m - k are used as the first target item attribute features, where m is the total number of item attribute features.
[0086] It should be noted that among them, the item attribute features corresponding to the specified weight mentioned above may include the second target item attribute features.
[0087] Through the above method, it can be ensured that the first target item attribute features include both the attribute features selected by game developers or marketers and the "sub - strong" features, making the attribute features in the first target item attribute features more comprehensive. Furthermore, the training accuracy of the item recommendation model can be improved, so that when recommending items to users, the probability that the recommended items are the items that users want to purchase is increased.
[0088] In the above steps, the first target item attribute features of the initial recommended items are input into the trained item recommendation model to obtain the recommendation probability of each initial recommended item; according to the recommendation probability of each initial recommended item, the final recommended items with optimal recommendation are determined, where the number of the final recommended items is not greater than the first preset recommendation number.
[0089] In an optional embodiment, the item recommendation model is trained through the following steps: obtain the first target item attribute features and the recommendation probability of each recommended item in the recommended item samples; based on the first target item attribute features and the recommendation probability of each obtained recommended item, train the pre - constructed second classifier to obtain the trained item recommendation model.
[0090] Here, the input feature of the item recommendation model is the first target item attribute feature, and the output is the recommendation probability of the initial recommended item. Among them, the input feature of the item recommendation model is different from the input feature of the item prediction model. In this way, the item attribute features mainly applied in the two - stage models are different, which can avoid the repeated use of the same item attribute features, thereby reducing the waste of computer resources and improving computer performance.
[0091] In related games, for example, in the item recommendation scenario, it is required to recommend as many items as possible that users will purchase, and at the same time, it is required that the recommended list be as short as possible (the number of advertisement slots is limited). In order to give as few advertisement slots as possible under the condition of ensuring sufficient recall rate, in this application embodiment, when determining the final recommended items with optimal recommendation according to the recommendation probability of each initial recommended item, the following method is specifically adopted:
[0092] Determine the initial recommended items with a recommended probability not less than the second recommended probability threshold as the final recommended items, so that the number of final recommended items does not exceed the first preset recommended number; wherein, the second recommended probability threshold is determined according to the first preset recommended number;
[0093] Wherein, in the stage of training the item recommendation model, the second recommended probability threshold is determined through the following steps:
[0094] Adjust the initial recommended probability threshold corresponding to the item recommendation model until the number of final recommended items selected through the initial recommended probability threshold does not exceed the first preset recommended number, and determine the adjusted initial recommended probability threshold as the second recommended probability threshold.
[0095] Here, the first preset recommended number is determined according to the number of advertisement slots. Exemplarily, the first preset recommended number is equal to the number of advertisement slots. When some slots of the advertisement slots are occupied, the number of final recommended items is less than the first preset recommended number. Among them, there is a negative correlation between the second recommended probability threshold and the first preset recommended number.
[0096] Or, determine the recommended order of multiple initial recommended items according to the recommended probability of each initial recommended item; starting from the initial recommended item corresponding to the maximum recommended probability, sequentially select the initial recommended items in the recommended order until the number of selected initial recommended items reaches the first preset recommended number to obtain the final recommended items.
[0097] Here, the recommended order refers to the order of preferentially recommending items to the user. Among them, by sorting the recommended probabilities of each initial recommended item from large to small, the recommended order of multiple initial recommended items can be obtained.
[0098] Through the above method, a limited number of items can be recommended to the user, which can ensure that the number of recommended items matches the number of given advertisement slots under the condition of sufficient recall rate, and at the same time ensure that the probability that the recommended items are items that the user will purchase is very high, thereby improving the accuracy of item recommendation.
[0099] In related games, when a certain item is out of stock (for example, a certain item can only be purchased 3 times) and there are vacant positions in the advertisement slots, in the second stage, the subsequent items can be supplemented for recommendation; or after a certain advertisement time (for example, 3 hours), switch to the second batch of recommended items in the second stage. Specifically, according to the recommended probability of each initial recommended item, determine the sub-optimal recommended continuing recommended items from the remaining recommended items; wherein, the remaining recommended items are the items among the initial recommended items except the final recommended items, and the number of continuing recommended items does not exceed the second preset recommended number.
[0100] Among them, the first preset recommended quantity and the second preset recommended quantity can be the same, that is, the second preset recommended quantity is the number of advertisement columns; the first preset recommended quantity and the second preset recommended quantity can also be different, that is, the second preset recommended quantity is determined in real time according to the actual remaining quantity of the advertisement columns, etc.
[0101] For example, there are 100 items to be recommended. In the first stage, 75 items to be recommended are excluded through the item prediction model and recall rate. The remaining 25 recommended items enter the second stage as the initial recommended items. In the second stage, all of these 25 initial recommended items are to be recommended. The recommended probabilities of these 25 initial recommended items are obtained through the item recommendation model, and these 25 initial recommended items are sorted in descending order of the recommended probabilities to obtain the recommendation order. Here, the recommendation order in the second stage is recommended according to the first target item attribute characteristics (such as the item launch time, the number of friends who own this item, etc.), and the first target item attribute characteristics have a relatively high correlation with the user's interaction behavior. Exemplarily, assume that there are a total of 10 advertisement columns. The first batch of recommended items are the 1st to the 10th. After a period of time, the second batch of recommended items are the 11th to the 20th. After another period of time, the third batch of recommended items are the 21st to the 25th; or, there are a total of 10 advertisement columns. The first batch of recommended items are the 1st to the 10th. After a period of time, the item in the 5th advertisement column is sold out, then the item with the recommendation order of the 11th is placed in the 5th advertisement column for continued recommendation.
[0102] Next, an example is given to illustrate the prop recommendation method proposed in the embodiments of the present application. Exemplarily, in the first stage, a prop prediction model is established using m-dimensional prop attribute features (the current price of the prop, the attack power of the prop, the lucky value of the prop, whether the prop is worn by a female character or a male character, whether the sect to which the prop belongs is the player's sect, the number of times the player has purchased the prop in history, the number of times the player has purchased this type of prop in the last month, the price increase of the prop in the market on the same day, the most popular prop color, the longest time since the prop was launched, the number of friends who own this equipment), and the model outputs a recommendation probability (a value between 0.0 and 1.0). By adjusting the first recommendation probability threshold (predictions greater than the first recommendation probability threshold are 1, and predictions less than the first recommendation probability threshold are 0), the recall rate of the prop prediction model is made to meet the recall rate required by the business. After the first stage, the prop prediction model can filter out the props to be recommended with a prediction of 0, and only leave the props to be recommended with a prediction of 1 as the initial predicted props to enter the second stage; in the second stage, a prop recommendation model is established. The prop recommendation model first refers to the prop prediction model in the first stage, checks the most important k features (optimal features) of the prop prediction model in the first stage, removes these k features, and uses the remaining m-k-dimensional features to fit the prop recommendation model, and outputs the recommendation probability (a value between 0.0 and 1.0) of each initial recommended prop. By adjusting the first preset recommended quantity, the quantity of the finally recommended props meets the requirements of the first preset recommended quantity.
[0103] Through the above method, the recall rate can be given priority, so that the model target is consistent with the requirements. Since not all prop attribute features are input into the second stage, the prop recommendation model in the second stage can focus more on the specific attribute features of the prop; because of the feature selection in the first stage, the second stage no longer does the repetitive work of the first stage, and the prop recommendation model in the second stage can focus on the selection of "sub-optimal features", and finally a fixed number of finally recommended props can be obtained for recommendation.
[0104] For example, a prop prediction model is trained, and its output is the recommendation probability of the prop to be recommended (that is, a value between 0.0 and 1.0), and the input is m-dimensional prop attribute features (such as the current price of the prop, the attack power of the prop, the longest time since the prop was launched, etc.); for example, when the prop attribute features of the prop to be recommended a are input, the output recommendation probability is 0.95, when the prop attribute features of the prop to be recommended b are input, the output recommendation probability is 0.72, when the prop attribute features of the prop to be recommended c are input, the output recommendation probability is 0.12, and when the prop attribute features of the prop to be recommended d are input, the output recommendation probability is 0.56.
[0105] Adjust the first recommended probability threshold so that the recommended items meet the bottom line of recall rate. For example, the first recommended probability threshold t1 can be set to 0.5, then there are three items a, b, and d to be recommended that are classified as initial recommended items; if the first recommended probability threshold t1 is set to 0.7, then there are two items a and b to be recommended that are classified as initial recommended items; if the first recommended probability threshold t1 is set to 0.9, then only a is classified as an initial recommended item. It can be seen that by adjusting the first recommended probability threshold, the recall rate of the item prediction model can be changed. Specifically, according to actual requirements, a recall rate can be given. For example, if the minimum recall rate is required to be not less than 95%, then a t1 can be found to meet this recall rate requirement.
[0106] Among them, because of the item prediction model and the determined first recommended probability threshold, the item attribute characteristics of all items to be recommended are predicted to obtain the initial recommended items, and the items to be recommended that are filtered out no longer participate in the model prediction in the second stage. Specifically, call the X.feature_importance() function to obtain the weights of each of the m features, delete the k item attribute features with larger weights, and no longer participate in the input of the item recommendation model in the second stage. The item recommendation model in the second stage only needs the first target item attribute characteristics of the initial recommended items given by the item prediction model in the first stage, and only models the remaining m - k dimensional item attribute characteristics to establish an item recommendation model. The output of the item recommendation model is the recommended probability. Apply the item recommendation model to obtain the recommended probabilities of all initial recommended items, sort them in descending order of the recommended probability, and select the n initial recommended items with the largest probability as the final recommended items; where n is the first preset recommended quantity.
[0107] The item recommendation method provided by the embodiments of the present application mainly processes the item attribute characteristics of the items to be recommended when using the item prediction model. Here, the item prediction model actually processes the item attribute characteristics that have a greater influence on the prediction of the recommended items among the item attribute characteristics. When using the item recommendation model, it mainly uses the item attribute characteristics that have a certain influence on the prediction of the recommended items but are different from those used in the item prediction model. In this way, the item attribute characteristics mainly applied in the two stages of the model are different, which can avoid the repeated use of the same item attribute characteristics, thereby reducing the waste of computer resources and improving computer performance; and the embodiments of the present application can also give priority to the recall rate in the item prediction model corresponding to the first stage, so that the recommended results obtained through the two-stage model are objective and accurate, thus achieving the purpose of reasonably recommending items for users.
[0108] Based on the same inventive concept, an apparatus for prop recommendation corresponding to the prop recommendation method is further provided in the embodiments of the present application. Since the principle of problem-solving of the apparatus in the embodiments of the present application is similar to that of the above-mentioned prop recommendation method in the embodiments of the present application, the implementation of the apparatus can refer to the implementation of the method, and the repeated parts will not be described again.
[0109] Please refer to Figure 2 and Figure 3 , Figure 2 which is a schematic structural diagram of an apparatus for prop recommendation provided by an embodiment of the present application, Figure 3 and Figure 2 which is a schematic structural diagram of another apparatus for prop recommendation provided by an embodiment of the present application. As
[0110] shown in
[0111] the prop recommendation apparatus 200 includes:
[0112] a feature acquisition module 201, configured to acquire prop attribute features of a prop to be recommended;
[0113] an initial recommendation module 202, configured to predict an initial recommended prop from the props to be recommended according to the acquired prop attribute features of the props to be recommended and a trained prop prediction model; wherein, the recall rate of the prop prediction model is not less than a preset recall rate threshold;
[0114] a final recommendation module 203, configured to determine a final recommended prop according to the first target prop attribute features of the initial recommended prop and a trained prop recommendation model; wherein, the first target prop attribute features include prop attribute features with weights not greater than a preset weight threshold, and the weight represents the influence degree of the prop attribute features on the prediction when the prop prediction model predicts the initial recommended prop.
[0115] In an alternative embodiment of the present application, the initial recommendation module 202 is specifically configured to:
[0116] input the acquired prop attribute features of the props to be recommended into the trained prop prediction model to obtain the recommendation probability of each prop to be recommended;
[0117] determine the props to be recommended with recommendation probabilities not less than a first recommendation probability threshold as the initial recommended props, where the first recommendation probability threshold is determined according to the recall rate of the prop prediction model.
[0118] Determine the final recommended items for optimal recommendation according to the recommendation probabilities of each initial recommended item, where the number of final recommended items is not greater than the first preset recommended number.
[0119] In an alternative embodiment of the present application, the final recommendation module 203 is further specifically configured to:
[0120] Determine the initial recommended items with recommendation probabilities not less than the second recommendation probability threshold as the final recommended items, so that the number of final recommended items is not greater than the first preset recommended number; wherein, the second recommendation probability threshold is determined according to the first preset recommended number;
[0121] Or, determine the recommendation order of multiple initial recommended items according to the recommendation probabilities of each initial recommended item; starting from the initial recommended item corresponding to the maximum recommendation probability, sequentially select the initial recommended items in the recommendation order until the number of selected initial recommended items reaches the first preset recommended number to obtain the final recommended items.
[0122] Further, as Figure 3 shown, the item recommendation device 200 further includes a continued recommendation module 204, and the continued recommendation module 204 is configured to:
[0123] Determine the continued recommended items for sub-optimal recommendation from the remaining recommended items according to the recommendation probabilities of each initial recommended item; wherein, the remaining recommended items are the items among the initial recommended items except the final recommended items, and the number of continued recommended items is not greater than the second preset recommended number.
[0124] In an alternative embodiment of the present application, the initial recommendation module 202 is specifically configured to train the item prediction model through the following steps:
[0125] Obtain the item attribute features and recommendation probabilities of each recommended item in the recommended item sample, and the item attribute features of each non-recommended item in the non-recommended item sample;
[0126] Train a pre-constructed first classifier based on the obtained item attribute features and recommendation probabilities of each recommended item, and the item attribute features of each non-recommended item to obtain a trained item prediction model.
[0127] In an alternative embodiment of the present application, the initial recommendation module 202 is further specifically configured to determine the first recommendation probability threshold through the following steps:
[0128] Adjust the preset recommendation probability threshold of the item prediction model until the recall rate of the item prediction model is not less than the preset recall rate threshold, and determine the adjusted preset recommendation probability threshold as the first recommendation probability threshold.
[0129] In an alternative embodiment of the present application, the initial recommendation module 202 is further specifically configured to determine the recall rate of the prop prediction model through the following steps:
[0130] Determine the number of initial recommended props with a recommended probability greater than the preset recommended probability threshold according to the preset recommended probability threshold of the prop prediction model;
[0131] Determine the recall rate of the prop prediction model according to the ratio between the number of initial recommended props and the sample number of the recommended prop samples.
[0132] In an alternative embodiment of the present application, the final recommendation module 203 is specifically configured to determine the weight of each prop attribute feature through the following steps:
[0133] Determine the importance evaluation value of each prop attribute feature from the trained prop prediction model by calling the feature weight function;
[0134] Perform normalization processing on the importance evaluation value of each prop attribute feature to obtain the weight of each prop attribute feature.
[0135] In an alternative embodiment of the present application, the first target prop attribute features include: prop attribute features with a weight not greater than the preset weight threshold and not less than the first preset weight threshold in the prop attribute features, where the preset weight threshold is greater than the first preset weight threshold; and / or, prop attribute features corresponding to the specified weight.
[0136] In an alternative embodiment of the present application, the final recommendation module 203 is further specifically configured to train the prop recommendation model through the following steps:
[0137] Obtain the first target prop attribute features and the recommended probabilities of each recommended prop in the recommended prop samples;
[0138] Train the pre-constructed second classifier based on the obtained first target prop attribute features and recommended probabilities of each recommended prop to obtain the trained prop recommendation model.
[0139] The prop recommendation device provided by the embodiments of the present application, compared with the existing two-stage modeling method where the prop attribute features of all props are used in both stages and there is no stage with a clear adjusted accuracy rate or a clear adjusted recall rate, mainly processes the prop attribute features of the props to be recommended. Here, the prop prediction model actually processes the prop attribute features that have a greater influence on the prediction of the recommended props in the prop attribute features. When using the prop recommendation model, it mainly uses the prop attribute features that have a certain influence on the prediction of the recommended props but are different from those used in the prop prediction model. In this way, the prop attribute features mainly applied by the models in the two stages are different, which can avoid the repeated use of the same prop attribute features, thereby reducing the waste of computer resources and improving computer performance. Moreover, the embodiments of the present application can also give priority to the recall rate in the prop prediction model corresponding to the first stage, so that the recommendation results obtained through the two-stage model are objective and accurate, thereby achieving the purpose of reasonably recommending props to users.
[0140] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of an electronic device provided by the embodiments of the present application. As Figure 4 shown in
[0141] The memory 402 stores machine-readable instructions executable by the processor 401. When the electronic device 400 runs, the processor 401 communicates with the memory 402 through the bus 403, and the processor 401 executes the machine-readable instructions to perform the following steps:
[0142] Obtain the prop attribute features of the props to be recommended;
[0143] According to the obtained prop attribute features of the props to be recommended and the trained prop prediction model, predict the initial recommended props from the props to be recommended; wherein, the recall rate of the prop prediction model is not less than the preset recall rate threshold;
[0144] According to the first target prop attribute features of the initial recommended props and the trained prop recommendation model, determine the final recommended props; wherein, the first target prop attribute features include the prop attribute features whose weights are not greater than the preset weight threshold, and the weight represents the influence degree of the prop attribute features on the prediction when the prop prediction model predicts the initial recommended props.
[0145] In an alternative embodiment of the present application, when the processor 401 predicts the initial recommended props from the props to be recommended according to the obtained prop attribute features of the props to be recommended and the trained prop prediction model, it specifically performs the following steps:
[0146] Input the prop attribute features of the props to be recommended obtained into the trained prop prediction model to obtain the recommendation probability of each prop to be recommended;
[0147] Determine the initial recommended props as the props to be recommended whose recommendation probability is not less than the first recommendation probability threshold, where the first recommendation probability threshold is determined according to the recall rate of the prop prediction model.
[0148] In an alternative embodiment of the present application, when the processor 401 determines the final recommended props according to the first target prop attribute features of the initial recommended props and the trained prop recommendation model, it specifically performs the following steps:
[0149] Input the first target prop attribute features of the initial recommended props into the trained prop recommendation model to obtain the recommendation probability of each initial recommended prop;
[0150] Determine the final recommended props with the optimal recommendation according to the recommendation probability of each initial recommended prop, where the number of the final recommended props is not greater than the first preset recommended number.
[0151] In an alternative embodiment of the present application, when the processor 401 determines the final recommended props with the optimal recommendation according to the recommendation probability of each initial recommended prop, it specifically performs the following steps:
[0152] Determine the initial recommended props whose recommendation probability is not less than the second recommendation probability threshold as the final recommended props, so that the number of the final recommended props is not greater than the first preset recommended number; where the second recommendation probability threshold is determined according to the first preset recommended number;
[0153] Or, determine the recommendation order of multiple initial recommended props according to the recommendation probability of each initial recommended prop; starting from the initial recommended prop corresponding to the maximum recommendation probability, select the initial recommended props in sequence according to the recommendation order until the number of the selected multiple initial recommended props reaches the first preset recommended number to obtain the final recommended props.
[0154] In an alternative embodiment of the present application, the processor 401 also performs the following steps:
[0155] Determine the sub-optimally recommended props to be continued to be recommended from the remaining recommended props according to the recommendation probability of each initial recommended prop; where the remaining recommended props are the props other than the final recommended props among the initial recommended props, and the number of the props to be continued to be recommended is not greater than the second preset recommended number.
[0156] In an alternative embodiment of the present application, the processor 401 is used to train the prop prediction model through the following steps:
[0157] Obtain the item attribute features and recommendation probabilities of each recommended item in the recommended item sample, as well as the item attribute features of each non-recommended item in the non-recommended item sample;
[0158] Based on the item attribute features and recommendation probabilities of each recommended item obtained, as well as the item attribute features of each non-recommended item, train the pre-constructed first classifier to obtain a trained item prediction model.
[0159] In an optional embodiment of the present application, the processor 401 is used to determine the first recommended probability threshold through the following steps:
[0160] Adjust the preset recommended probability threshold of the item prediction model until the recall rate of the item prediction model is not less than the preset recall rate threshold, and determine the adjusted preset recommended probability threshold as the first recommended probability threshold.
[0161] In an optional embodiment of the present application, the processor 401 is used to determine the recall rate of the item prediction model through the following steps:
[0162] According to the preset recommended probability threshold of the item prediction model, determine the number of initial recommended items with a recommended probability greater than the preset recommended probability threshold;
[0163] Determine the recall rate of the item prediction model according to the ratio between the number of initial recommended items and the sample number of the recommended item sample.
[0164] In an optional embodiment of the present application, the processor 401 is used to determine the weight of each item attribute feature through the following steps:
[0165] Determine the importance evaluation value of each item attribute feature from the trained item prediction model by calling the feature weight function;
[0166] Perform normalization processing on the importance evaluation value of each item attribute feature to obtain the weight of each item attribute feature.
[0167] In an optional embodiment of the present application, the first target item attribute features include:
[0168] The item attribute features in the item attribute features whose weights are not greater than the preset weight threshold and not less than the first preset weight threshold, where the preset weight threshold is greater than the first preset weight threshold;
[0169] And / or, the item attribute features corresponding to the specified weight.
[0170] In an optional embodiment of the present application, the processor 401 is used to train the item recommendation model through the following steps:
[0171] Obtain the first target item attribute features and recommendation probabilities of each recommended item in the recommended item sample;
[0172] Based on the first target item attribute features and recommendation probabilities of each recommended item obtained, train the pre-constructed second classifier to obtain a trained item recommendation model.
[0173] When using the item prediction model in the embodiments of the present application, the item attribute features of the item to be recommended are mainly processed. Here, the item prediction model actually processes the item attribute features that have a greater influence on the prediction of the recommended item in the item attribute features. When using the item recommendation model, the item attribute features that have a certain influence on the prediction of the recommended item but are different from those used in the item prediction model are mainly used. In this way, the item attribute features mainly applied in the two-stage models are different, which can avoid the repeated use of the same item attribute features, thereby reducing the waste of computer resources and improving computer performance; and the embodiments of the present application can also give priority to the recall rate in the item prediction model corresponding to the first stage, so that the recommended results obtained through the two-stage model are objective and accurate, thereby achieving the purpose of reasonably recommending items for users.
[0174] The embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the following steps can be executed:
[0175] Obtain the item attribute features of the item to be recommended;
[0176] According to the item attribute features of the item to be recommended obtained and the trained item prediction model, predict the initial recommended item from the items to be recommended; wherein, the recall rate of the item prediction model is not less than a preset recall rate threshold;
[0177] According to the first target item attribute features of the initial recommended item and the trained item recommendation model, determine the final recommended item; wherein, the first target item attribute features include the item attribute features whose weights are not greater than a preset weight threshold, and the weight represents the influence degree of the item attribute features on the prediction when the item prediction model predicts the initial recommended item.
[0178] In an optional embodiment of the present application, when the computer-readable storage medium predicts the initial recommended item from the items to be recommended according to the item attribute features of the item to be recommended obtained and the trained item prediction model, the following steps are specifically executed:
[0179] Input the item attribute features of the item to be recommended obtained into the trained item prediction model to obtain the recommendation probability of each item to be recommended;
[0180] Determine the to-be-recommended items with a recommended probability not less than the first recommended probability threshold as the initial recommended items, where the first recommended probability threshold is determined according to the recall rate of the item prediction model.
[0181] In an alternative embodiment of the present application, when the computer-readable storage medium determines the final recommended items according to the first target item attribute characteristics of the initial recommended items and the trained item recommendation model, the following steps are specifically executed:
[0182] Input the first target item attribute characteristics of the initial recommended items into the trained item recommendation model to obtain the recommended probability of each initial recommended item;
[0183] Determine the final recommended items with the optimal recommendation according to the recommended probability of each initial recommended item, where the number of the final recommended items is not greater than the first preset recommended number.
[0184] In an alternative embodiment of the present application, when the computer-readable storage medium determines the final recommended items with the optimal recommendation according to the recommended probability of each initial recommended item, the following steps are specifically executed:
[0185] Determine the initial recommended items with a recommended probability not less than the second recommended probability threshold as the final recommended items, so that the number of the final recommended items is not greater than the first preset recommended number; where the second recommended probability threshold is determined according to the first preset recommended number;
[0186] Or, determine the recommended order of multiple initial recommended items according to the recommended probability of each initial recommended item; starting from the initial recommended item corresponding to the maximum recommended probability, select the initial recommended items in sequence according to the recommended order until the number of the selected multiple initial recommended items reaches the first preset recommended number to obtain the final recommended items.
[0187] In an alternative embodiment of the present application, the computer-readable storage medium further executes the following steps:
[0188] Determine the sub-optimally recommended continued recommended items from the remaining recommended items according to the recommended probability of each initial recommended item; where the remaining recommended items are the items other than the final recommended items among the initial recommended items, and the number of the continued recommended items is not greater than the second preset recommended number.
[0189] In an alternative embodiment of the present application, the computer-readable storage medium is used to train the item prediction model through the following steps:
[0190] Obtain the item attribute characteristics and recommended probability of each recommended item in the recommended item sample, and the item attribute characteristics of each non-recommended item in the non-recommended item sample;
[0191] Based on the item attribute features and recommendation probabilities of each recommended item obtained, as well as the item attribute features of each unrecommended item, train the pre-constructed first classifier to obtain a trained item prediction model.
[0192] In an alternative embodiment of the present application, the computer-readable storage medium is used to determine the first recommended probability threshold through the following steps:
[0193] Adjust the preset recommended probability threshold of the item prediction model until the recall rate of the item prediction model is not less than the preset recall rate threshold, and determine the adjusted preset recommended probability threshold as the first recommended probability threshold.
[0194] In an alternative embodiment of the present application, the computer-readable storage medium is used to determine the recall rate of the item prediction model through the following steps:
[0195] According to the preset recommended probability threshold of the item prediction model, determine the number of initial recommended items with a recommended probability greater than the preset recommended probability threshold;
[0196] Determine the recall rate of the item prediction model according to the ratio between the number of initial recommended items and the sample number of the recommended item samples.
[0197] In an alternative embodiment of the present application, the computer-readable storage medium is used to determine the weight of each item attribute feature through the following steps:
[0198] Determine the importance evaluation value of each item attribute feature from the trained item prediction model by calling the feature weight function;
[0199] Perform normalization processing on the importance evaluation value of each item attribute feature to obtain the weight of each item attribute feature.
[0200] In an alternative embodiment of the present application, the first target item attribute features include:
[0201] The item attribute features in the item attribute features with weights not greater than the preset weight threshold and not less than the first preset weight threshold, where the preset weight threshold is greater than the first preset weight threshold;
[0202] And / or, the item attribute features corresponding to the specified weights.
[0203] In an alternative embodiment of the present application, the computer-readable storage medium is used to train the item recommendation model through the following steps:
[0204] Obtain the first target item attribute features and recommendation probabilities of each recommended item in the recommended item samples;
[0205] Based on the first target item attribute features and recommendation probabilities of each recommended item obtained, train the pre-constructed second classifier to obtain a trained item recommendation model.
[0206] When using the item prediction model in the embodiments of the present application, it mainly processes the item attribute features of the item to be recommended. Here, the item prediction model actually processes the item attribute features that have a greater impact on the prediction of the recommended item in the item attribute features. When using the item recommendation model, it mainly uses the item attribute features that have a certain impact on the prediction of the recommended item but are different from those used in the item prediction model. In this way, the item attribute features mainly applied in the models of the two stages are different, which can avoid the repeated use of the same item attribute features, thereby reducing the waste of computer resources and improving computer performance. Moreover, the embodiments of the present application can also give priority to the recall rate in the item prediction model corresponding to the first stage, so that the recommended results obtained through the two-stage model are objective and accurate, thus achieving the purpose of reasonably recommending items to users.
[0207] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0208] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division, and there can be other division methods in actual implementation. For another example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.
[0209] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0210] In addition, each functional unit in the various embodiments of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0211] When the above-mentioned function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such an understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of this 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 for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of this application. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks, or optical discs that can store program codes.
[0212] Finally, it should be noted that: the above-mentioned embodiments are only specific implementation manners of this application, used to illustrate the technical solution of this application, rather than limiting it. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that: any person skilled in the art within the technical scope disclosed in this application can still modify the technical solutions recorded in the foregoing embodiments or can easily think of changes, or perform equivalent replacements on some of the technical features; and these modifications, changes, or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A prop recommendation method, characterized in that, The method includes: Obtaining the item attribute features of the item to be recommended; Predicting an initial recommended item from the items to be recommended according to the obtained item attribute features of the item to be recommended and the trained item prediction model; wherein, the recall rate of the item prediction model is not less than a preset recall rate threshold; Determining a final recommended item according to the first target item attribute features of the initial recommended item and the trained item recommendation model; wherein, the first target item attribute features include the item attribute features with weights not greater than a preset weight threshold, and the weight represents the influence degree of the item attribute features on the prediction when the item prediction model predicts the initial recommended item; Wherein, the weight of each item attribute feature is determined through the following steps: Determining the importance evaluation value of each item attribute feature from the trained item prediction model by calling a feature weight function; Performing normalization processing on the importance evaluation value of each item attribute feature to obtain the weight of each item attribute feature.
2. The method according to claim 1, wherein The step of predicting an initial recommended item from the items to be recommended according to the obtained item attribute features of the item to be recommended and the trained item prediction model includes: Inputting the item attribute features of the obtained items to be recommended into the trained item prediction model to obtain the recommendation probability of each item to be recommended; Determining the items to be recommended with a recommendation probability not less than a first recommendation probability threshold as the initial recommended items, wherein the first recommendation probability threshold is determined according to the recall rate of the item prediction model.
3. The method according to claim 1, wherein The step of determining a final recommended item according to the first target item attribute features of the initial recommended item and the trained item recommendation model includes: Inputting the first target item attribute features of the initial recommended item into the trained item recommendation model to obtain the recommendation probability of each initial recommended item; Determining the final recommended item with the optimal recommendation according to the recommendation probability of each initial recommended item, wherein the number of the final recommended items is not greater than a first preset recommended number.
4. The method according to claim 3, characterized in that The step of determining the final recommended item with the optimal recommendation according to the recommendation probability of each initial recommended item includes: Determining the initial recommended items with a recommendation probability not less than a second recommendation probability threshold as the final recommended items, so that the number of the final recommended items is not greater than a first preset recommended number; wherein, the second recommendation probability threshold is determined according to the first preset recommended number; Or, determining the recommendation order of multiple initial recommended items according to the recommendation probability of each initial recommended item; starting from the initial recommended item corresponding to the maximum recommendation probability, sequentially selecting initial recommended items in accordance with the recommendation order until the number of the selected multiple initial recommended items reaches the first preset recommended number to obtain the final recommended items.
5. The method according to claim 3, wherein, The method further includes: Determining a sub-optimally recommended continued recommended item from the remaining recommended items according to the recommendation probability of each initial recommended item; wherein, the remaining recommended items are the items among the initial recommended items except the final recommended items, and the number of the continued recommended items is not greater than a second preset recommended number.
6. The method according to claim 2, wherein Train the item prediction model through the following steps: Obtain the item attribute features and recommendation probabilities of each recommended item in the recommended item sample, as well as the item attribute features of each non-recommended item in the non-recommended item sample; Based on the obtained item attribute features and recommendation probabilities of each recommended item, and the item attribute features of each non-recommended item, train the pre-constructed first classifier to obtain the trained item prediction model.
7. The method according to claim 2, characterized in that, Determine the first recommended probability threshold through the following steps: Adjust the preset recommended probability threshold of the item prediction model until the recall rate of the item prediction model is not less than the preset recall rate threshold, and determine the adjusted preset recommended probability threshold as the first recommended probability threshold.
8. The method according to claim 7, characterized in that, Determine the recall rate of the item prediction model through the following steps: According to the preset recommended probability threshold of the item prediction model, determine the number of initial recommended items with a recommended probability greater than the preset recommended probability threshold; Determine the recall rate of the item prediction model according to the ratio between the number of initial recommended items and the sample number of the recommended item sample.
9. The method according to claim 1, wherein The first target item attribute features include: The item attribute features in the item attribute features with weights not greater than the preset weight threshold and not less than the first preset weight threshold, where the preset weight threshold is greater than the first preset weight threshold; And / or, the item attribute features corresponding to the specified weights.
10. The method according to claim 3, wherein Train the item recommendation model through the following steps: Obtain the first target item attribute features and recommendation probabilities of each recommended item in the recommended item sample; Based on the obtained first target item attribute features and recommendation probabilities of each recommended item, train the pre-constructed second classifier to obtain the trained item recommendation model.
11. A prop recommendation device, characterized in that, The device includes: A feature acquisition module, configured to acquire the item attribute features of the item to be recommended; An initial recommendation module, configured to predict initial recommended items from the items to be recommended according to the obtained item attribute features of the items to be recommended and the trained item prediction model; wherein, the recall rate of the item prediction model is not less than the preset recall rate threshold; A final recommendation module, configured to determine the final recommended items according to the first target item attribute features of the initial recommended items and the trained item recommendation model; wherein, the first target item attribute features include the item attribute features with weights not greater than the preset weight threshold, and the weight represents the influence degree of the item attribute features on the prediction when the item prediction model predicts the initial recommended items; Wherein, determine the weight of each item attribute feature through the following steps: Determine the importance evaluation value of each item attribute feature from the trained item prediction model by calling the feature weight function; Perform normalization processing on the importance evaluation value of each item attribute feature to obtain the weight of each item attribute feature.
12. An electronic device, characterized in that, Include: A processor, a memory, and a bus, where 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, and the processor executes the machine-readable instructions to perform the item recommendation method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is run by a processor, it executes the item recommendation method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Recommendation system-based recommendation model generating method and related devices thereof
CN107609201A
Recommendation information generation method and device, storage medium and electronic equipment
CN113065911A