Game prop recommendation method and device, computer device, and storage medium
Patent Information
- Application Number
- CN202210230129.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-09
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2042-03-09
AI Technical Summary
[0004]然而传统上基于历史购买记录进行分析的方式,只考虑了游戏用户的消费能力,也仅仅是对已有的历史数据进行处理,不能实时跟进游戏进程以及在当前游戏进程下考虑游戏用户的需求,存在所推荐的游戏道具已经购买多次无需再购买的情况
[0035]上述游戏道具推荐方法、装置、计算机设备和存储介质中,当检测到当前游戏实例的实时游戏进程满足道具推荐条件时,获取道具推荐模型,其中,道具推荐模型利用符合特征重要度要求的目标特征训练得到,而目标特征则根据标签预测模型所输出的预测标签确定得到。通过采集当前游戏实例的游戏进程数据、游戏道具属性数据以及玩家属性数据,并从玩家属性数据中提取目标玩家特征,从游戏进程数据中提取目标交互特征,从游戏道具属性数据中提取目标道具特征,进而将目标玩家特征、目标道具特征以及目标交互特征,确定为道具推荐模型的输入数据,基于道具推荐模型输出游戏推荐道具,并在当前游戏实例的游戏界面进行展示。实现了可基于特征重要度确定出符合要求的目标特征,进而根据目标特征训练得到道具推荐模型,而不是采用所有的特征进行训练,减少训练模型所需的特征维度,并去除特征噪音,提升训练得到的道具推荐模型的预测结果,使得所输出的游戏推荐道具更符合当前游戏进程的实际需求,进一步提升游戏道具的推荐成功率,增加平台收益。
Smart Images

Figure CN116764236B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to a method, apparatus, computer device, and storage medium for recommending game items. Background Technology
[0002] With the development of artificial intelligence technology and the gradual promotion of online game operation, various game applications or platforms need to recommend and sell game items to game users to generate revenue. To ensure successful recommendation of game items and increase purchase rates, it is necessary to identify game items that game users have a high willingness to purchase and recommend them accordingly.
[0003] Traditional techniques often involve acquiring game users' historical purchase records, categorizing them based on spending power, and determining the item purchase preferences for each category. For example, if a user is identified as belonging to a high-spending user category, the system retrieves the item purchase data for each user within that category, ranks their item purchase preferences, identifies one or more top-ranked items, and ultimately recommends them to users within that category.
[0004] However, traditional methods of analyzing historical purchase records only consider the spending power of game users and merely process existing historical data. They cannot keep up with the game's progress in real time or consider the needs of game users at the current game stage. This can lead to situations where recommended game items have already been purchased multiple times and no longer need to be bought. Therefore, traditional methods of ranking and recommending game items still suffer from low recommendation success rates and low platform revenue. Summary of the Invention
[0005] Therefore, it is necessary to provide a method, apparatus, computer equipment, and storage medium for recommending game items that can improve the success rate of game item recommendations and increase platform revenue, in response to the aforementioned technical problems.
[0006] Firstly, this application provides a method for recommending game items. The method includes:
[0007] When the real-time game process of the current game instance is detected to meet the item recommendation conditions, an item recommendation model is obtained. The item recommendation model is trained using target features that meet the feature importance requirements. Each target feature is determined based on the predicted label output by the label prediction model.
[0008] Collect game progress data, game item attribute data, and player attribute data for the current game instance;
[0009] Extract target player features from the player attribute data, extract target interaction features from the game process data, and extract target item features from the game item attribute data;
[0010] The target player characteristics, target item characteristics, and target interaction characteristics are determined as the input data for the item recommendation model. Based on the item recommendation model, recommended game items are output and displayed on the game interface of the current game instance.
[0011] In one embodiment, after training the item recommendation model based on each of the target features and the corresponding feature values, the method further includes:
[0012] Obtain pre-labeled feature tags for each of the target features, and determine preset recommended props based on the pre-labeled feature tags;
[0013] The training loss value is determined based on the preset recommended items and the game recommended items;
[0014] Based on the training loss value, the prediction accuracy of the item recommendation model is determined.
[0015] Secondly, this application also provides a game item recommendation device. The device includes:
[0016] The item recommendation model acquisition module is used to acquire an item recommendation model when the real-time game process of the current game instance is detected to meet the item recommendation conditions. The item recommendation model is trained using target features that meet the feature importance requirements. Each target feature is determined according to the predicted label output by the label prediction model.
[0017] The data acquisition module is used to collect game process data, game item attribute data, and player attribute data for the current game instance.
[0018] The target feature extraction module is used to extract target player features from the player attribute data, target interaction features from the game process data, and target item features from the game item attribute data;
[0019] The game recommended item display module is used to determine the target player characteristics, target item characteristics, and target interaction characteristics as input data for the item recommendation model, output game recommended items based on the item recommendation model, and display them on the game interface of the current game instance.
[0020] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0021] When the real-time game process of the current game instance is detected to meet the item recommendation conditions, an item recommendation model is obtained. The item recommendation model is trained using target features that meet the feature importance requirements. Each target feature is determined based on the predicted label output by the label prediction model.
[0022] Collect game progress data, game item attribute data, and player attribute data for the current game instance;
[0023] Extract target player features from the player attribute data, extract target interaction features from the game process data, and extract target item features from the game item attribute data;
[0024] The target player characteristics, target item characteristics, and target interaction characteristics are determined as the input data for the item recommendation model. Based on the item recommendation model, recommended game items are output and displayed on the game interface of the current game instance.
[0025] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0026] When the real-time game process of the current game instance is detected to meet the item recommendation conditions, an item recommendation model is obtained. The item recommendation model is trained using target features that meet the feature importance requirements. Each target feature is determined based on the predicted label output by the label prediction model.
[0027] Collect game progress data, game item attribute data, and player attribute data for the current game instance;
[0028] Extract target player features from the player attribute data, extract target interaction features from the game process data, and extract target item features from the game item attribute data;
[0029] The target player characteristics, target item characteristics, and target interaction characteristics are determined as the input data for the item recommendation model. Based on the item recommendation model, recommended game items are output and displayed on the game interface of the current game instance.
[0030] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0031] When the real-time game process of the current game instance is detected to meet the item recommendation conditions, an item recommendation model is obtained. The item recommendation model is trained using target features that meet the feature importance requirements. Each target feature is determined based on the predicted label output by the label prediction model.
[0032] Collect game progress data, game item attribute data, and player attribute data for the current game instance;
[0033] Extract target player features from the player attribute data, extract target interaction features from the game process data, and extract target item features from the game item attribute data;
[0034] The target player characteristics, target item characteristics, and target interaction characteristics are determined as the input data for the item recommendation model. Based on the item recommendation model, recommended game items are output and displayed on the game interface of the current game instance.
[0035] In the aforementioned game item recommendation method, apparatus, computer equipment, and storage medium, when the real-time game progress of the current game instance is detected to meet the item recommendation conditions, an item recommendation model is obtained. This model is trained using target features that meet feature importance requirements, and the target features are determined based on the predicted labels output by the label prediction model. By collecting game progress data, game item attribute data, and player attribute data of the current game instance, and extracting target player features from the player attribute data, target interaction features from the game progress data, and target item features from the game item attribute data, the target player features, target item features, and target interaction features are determined as the input data for the item recommendation model. Based on the item recommendation model, recommended game items are output and displayed on the game interface of the current game instance. This approach enables the identification of target features based on feature importance, allowing the training of an item recommendation model that utilizes these target features instead of all features. This reduces the feature dimensionality required for training the model, removes feature noise, and improves the prediction results of the trained item recommendation model. Consequently, the output game item recommendations better align with the actual needs of the current game progress, further increasing the success rate of item recommendations and boosting platform revenue. Attached Figure Description
[0036] Figure 1 This is a diagram illustrating the application environment of a game item recommendation method in one embodiment.
[0037] Figure 2 This is a flowchart illustrating a game item recommendation method in one embodiment;
[0038] Figure 3This is a schematic diagram of the item recommendation interface for a game item recommendation method in one embodiment;
[0039] Figure 4 This is a flowchart illustrating the process of training a prop recommendation model using target features that meet the feature importance requirements in one embodiment.
[0040] Figure 5 This is a schematic diagram illustrating the calculation process of feature importance in one embodiment;
[0041] Figure 6 This is a schematic diagram illustrating the feature quantity optimization effect of an item recommendation model in one embodiment.
[0042] Figure 7 This is a flowchart illustrating the process of outputting predicted labels corresponding to the features of each test sample in one embodiment.
[0043] Figure 8 This is a flowchart illustrating the process of determining the value range corresponding to the features of each test sample in one embodiment.
[0044] Figure 9 This is a flowchart illustrating the game item recommendation method in another embodiment;
[0045] Figure 10 This is a structural block diagram of a game item recommendation device in one embodiment;
[0046] Figure 11 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0048] The game item recommendation method provided in this application relates to artificial intelligence (AI) technology. AI utilizes digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceiving the environment, acquiring knowledge, and using that knowledge to obtain optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce new intelligent machines that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess perception, reasoning, and decision-making capabilities. AI technology is a comprehensive discipline involving a wide range of fields, encompassing both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies mainly include computer vision, speech processing, natural language processing, and machine learning / deep learning.
[0049] Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instructional learning.
[0050] With the research and advancement of artificial intelligence (AI) technology, AI is being studied and applied in various fields, such as smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, autonomous driving, drones, robots, smart healthcare, and smart customer service. It is believed that with the development of technology, AI will be applied in more fields and play an increasingly important role.
[0051] The game item recommendation method provided in this application involves technologies such as machine learning in artificial intelligence, and can be applied to, for example... Figure 1In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on a cloud or other network server. When server 104 detects that the real-time game progress of the current game instance meets the item recommendation conditions, it obtains the item recommendation model and collects the game progress data, game item attribute data, and player attribute data of the current game instance. The game progress data, game item attribute data, and player attribute data of the current game instance can be stored in the local storage of terminal 102 or in the corresponding data storage system of the server. Furthermore, server 104 can extract target player features from player attribute data, target interaction features from game progress data, and target item features from game item attribute data. The item recommendation model is trained using target features that meet the feature importance requirements. These target features are determined based on the predicted labels output by the label prediction model. The model then uses target player features, target item features, and target interaction features as input data. Based on this, it outputs recommended game items, which are displayed on the game interface of terminal 102 for players to view. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. Server 104 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0052] In one embodiment, such as Figure 2 As shown, a method for recommending game items is provided, which is then applied to... Figure 1 Taking the server in the example, the following steps are included:
[0053] Step S202: When it is detected that the real-time game process of the current game instance meets the item recommendation conditions, an item recommendation model is obtained. The item recommendation model is trained using target features that meet the feature importance requirements. Each target feature is determined according to the predicted label output by the label prediction model.
[0054] Specifically, the system obtains the real-time game progress of the current game instance and determines whether the real-time game progress meets the item recommendation criteria. If the real-time game progress meets the item recommendation criteria, a trained item recommendation model is obtained, and recommended items are output and displayed for players to view or purchase.
[0055] Furthermore, to determine whether the item recommendation conditions are met, it can be determined whether the current game instance's real-time game process has entered an item recommendation scenario, such as a lucky airdrop scenario or a resource return scenario. When a game instance enters these scenarios, it means that the current game instance's real-time game process meets the item recommendation conditions. Then, under the condition of meeting the item recommendation conditions, an item recommendation purchase page pops up on the game interface, displaying recommended items determined according to the item recommendation model for game players to view and purchase.
[0056] In one embodiment, a method for training an item recommendation model using target features that meet feature importance requirements includes:
[0057] Collect training sample features and train a label prediction model based on each training sample feature and its corresponding sample label; collect test sample features and output predicted labels corresponding to each test sample feature based on the label prediction model; determine target features that meet the feature importance requirements based on each predicted label; and train an item recommendation model based on each target feature and its corresponding feature value.
[0058] Specifically, by collecting player features, item features, and interaction features, and then concatenating these features to obtain training sample features, each training sample feature is pre-labeled. These pre-labeled features include tags indicating whether a player has purchased an item and tags indicating whether a player has not purchased an item. For example, if player A purchased item 'a', the corresponding sample label for player A would be 1, indicating that the player has purchased the item. Conversely, if player A did not purchase item 'a', the corresponding sample label for player A would be 0, indicating that the player has not purchased the item.
[0059] The concatenation of player features, item features, and interaction features can be achieved using vector concatenation operators. For example, if the player feature is X... i (U), the item's characteristic is X i (I) and interaction features X i (Q), then The following formula (1) illustrates this:
[0060]
[0061]
[0062] in, The operator indicates that vectors are concatenated. s, k, and t are used to represent the number of different features, such as the number of player features, item features, and interaction features.
[0063] Furthermore, the initial neural network model can be trained based on the features of each training sample and its corresponding label to obtain a trained label prediction model. After obtaining the label prediction model, it needs to be tested to further identify the target features that have a greater impact on the model, i.e., to determine the target features that meet the feature importance requirements. Then, based on the target features that meet the feature importance requirements and their corresponding feature values, the initial neural network model is retrained to obtain a trained item recommendation model.
[0064] Step S204: Collect game process data, game item attribute data, and player attribute data for the current game instance.
[0065] Specifically, after acquiring the trained item recommendation model, further data such as game progress, item attribute, and player attribute are collected for the current game instance. Game progress data includes the current game progress of the game instance, such as whether it is in the cutscene stage, the game operation stage, or whether it has entered the lucky airdrop scene or the resource return scene. It also includes the interaction characteristics between the player and the item, such as whether the player has used or viewed the item, or the number of times the player has used a certain item in the instance. However, the interaction characteristics do not include the player's purchase behavior of the item.
[0066] Furthermore, the game item attribute data includes item attributes and purchase characteristics. Item attributes include information such as item type, item function, and item price. Purchase characteristics include information such as the purchase quantity of a single item and the purchase data ranking among all items.
[0067] Similarly, player attribute data includes account characteristics, activity characteristics, payment characteristics, and social characteristics. Account characteristics correspond to the player's personal information, including game registration time, gender, login device, and login channel. Activity characteristics include the player's online time, online time period, game level, number of games played, game duration, game win rate, game mode preference, and game map mode preference. Payment characteristics include the player's payment amount per transaction, number of transactions, first payment time, and maximum single payment amount. Social characteristics include the number of game friends, number of chats, number of shares, number of gifts sent, and number of times the player teamed up.
[0068] Among them, the login channel in the account characteristics can be different communication software accounts or application accounts associated with the current game instance; the online time period in the activity characteristics can include morning, noon, afternoon, evening, early morning, weekdays and weekends; the game mode preference can be match mode or ranked mode; and the map mode preference can include different map modes such as desert map, city map and rainforest map.
[0069] Step S206: Extract target player features from player attribute data, target interaction features from game process data, and target item features from game item attribute data.
[0070] Specifically, target features that meet the feature importance criteria include target player features, target interaction features, and target item features. An item recommendation model can be trained based on these features. When using this model to recommend items, target player features need to be extracted from the acquired player attribute data, target interaction features from the game progress data, and target item features from the game item attribute data. These extracted target features are then used as input data to the item recommendation model, which outputs recommended game items based on the trained model.
[0071] Step S208: The target player characteristics, target item characteristics, and target interaction characteristics are determined as the input data for the item recommendation model. Based on the item recommendation model, recommended game items are output and displayed on the game interface of the current game instance.
[0072] Specifically, when using the item recommendation model to make item recommendations, it is necessary to extract target player features from the acquired player attribute data, target interaction features from the game process data, and target item features from the game item attribute data. Then, the target player features, target item features, and target interaction features are determined as the input data for the item recommendation model. Based on the item recommendation model, recommended game items corresponding to the input data can be output.
[0073] Once the recommended items for the game are determined, a recommended item purchase page will pop up on the game interface of the current game instance when entering the Lucky Airdrop scene of the game instance, displaying the recommended items.
[0074] In one embodiment, such as Figure 3 This provides a method for recommending game items, with an item recommendation interface as an example. Figure 3 It can be seen that entering the Lucky Airdrop scene in the game instance indicates that the current game instance's real-time game progress meets the item recommendation conditions. Therefore, under the condition of meeting the item recommendation conditions, a pop-up window appears on the game interface of the current game instance, such as... Figure 3 The item recommendation page shown.
[0075] The item recommendation and purchase page displays game-recommended items based on a trained item recommendation model. These include various items such as clothing, tools, medicine, and game skins. For example, three recommended items are selected from the game's item pool and displayed. Additionally, in the game instance's lucky airdrop scenario, a specified purchase time limit is set, allowing users to view and purchase the displayed game-recommended items within that timeframe.
[0076] In one embodiment, for game instances in the Lucky Airdrop scenario, the item recommendation model used for item recommendation specifically involves sorting features by importance to obtain a feature importance sequence, selecting the top 200 features from the sequence, and training the model based on these 200 features. During model training, this effectively reduces the amount of feature data used in the model and improves the success rate of item recommendations. Specifically, this can be reflected in an increase in player purchase rates, for example, an 8% improvement compared to previous recommendation models.
[0077] In the aforementioned game item recommendation method, when the real-time game progress of the current game instance is detected to meet the item recommendation conditions, an item recommendation model is obtained. This model is trained using target features that meet the feature importance requirements, and the target features are determined based on the predicted labels output by the label prediction model. By collecting game progress data, game item attribute data, and player attribute data of the current game instance, target player features are extracted from the player attribute data, target interaction features from the game progress data, and target item features from the game item attribute data. These target player features, target item features, and target interaction features are then used as input data for the item recommendation model. Based on this model, recommended game items are output and displayed on the game interface of the current game instance. This method achieves the ability to determine the target features that meet the requirements based on feature importance, and then train the item recommendation model based on these target features, instead of using all features for training. This reduces the feature dimensions required for training the model, removes feature noise, and improves the prediction results of the trained item recommendation model. This makes the output game item recommendations more consistent with the actual needs of the current game progress, further increasing the success rate of game item recommendations and increasing platform revenue.
[0078] In one embodiment, such as Figure 4 As shown, the steps for training an item recommendation model using target features that meet the feature importance requirements specifically include:
[0079] Step S402: Collect training sample features and train a label prediction model based on the features of each training sample and the corresponding sample label.
[0080] Specifically, by collecting training data samples and obtaining the training sample features corresponding to each training data sample, as well as the first feature value corresponding to each training sample, a training sample feature set is obtained. Then, each training sample feature is labeled with a corresponding sample label. Based on the training sample feature set and the sample labels corresponding to each training sample feature, a label prediction model can be trained.
[0081] The training sample features are obtained by concatenating features based on player characteristics, item characteristics, and interaction characteristics. For example, if n training data samples are collected, then for each training data sample O i Where 1≤i≤n, each training data sample O i The corresponding training sample features are X i X i =(x i,1 ,…x i,m ), and the training sample features X i The corresponding sample label is y i .
[0082] Furthermore, it is necessary to base the analysis on the results of each training data sample O. i Corresponding training sample features X i Features X of each training sample i The corresponding first feature value, and the sample label is y i A label prediction model f(X) is obtained through training. i Among them, the label prediction model f(X) is obtained through training. i The purpose is to fit sample labels based on sample features and output predicted labels f(x). i The optimization objective of this label prediction model is to minimize f(X). i ) and y i The difference between them, i.e., min||f(X) i )-y i The purpose of ||.
[0083] In one embodiment, the trained label prediction model is specifically represented by the following formula (2):
[0084]
[0085] Where σ represents the activation function, such as the sigmoid function. represents the transpose of the model parameter vector, and b represents the model bias parameter, which is a common parameter in machine learning models.
[0086] Step S404: Collect test sample features and, based on the label prediction model, output the predicted label corresponding to each test sample feature.
[0087] Specifically, after training the label prediction model, it needs to be tested to determine whether the model can be used for label prediction of data features. This is done by collecting test data samples and obtaining the test sample features for each sample. These test sample features are also obtained by concatenating player features, item features, and interaction features.
[0088] In this process, while acquiring the features of each test sample, it is also necessary to acquire the corresponding second feature values. Then, the test sample features and their corresponding second feature values are used as the input data for the label prediction model. Based on the label prediction model, the corresponding first predicted label f(X) is output. i ).
[0089] Furthermore, since it is necessary to determine the target features, that is, to determine which features have a greater impact on the prediction effect of the label prediction model, a preset number of test sample features need to be randomly selected from the test sample features, and the feature values of these test sample features are replaced to obtain updated test sample features. Then, the updated test sample features and the corresponding second feature values are also determined as the input data of the label prediction model, so as to output the second predicted label corresponding to each updated test sample feature based on the label prediction model.
[0090] Among them, a preset number of test data samples can be randomly selected, and for each test sample feature x of the test data samples... i,j The feature values are replaced to form new test sample features. The new test sample features and their corresponding feature values are input into the label prediction model, which outputs the second predicted label corresponding to each updated test sample feature.
[0091] Step S406: Based on each predicted label, determine the target features that meet the feature importance requirements.
[0092] Specifically, based on the first and second predicted labels, the predicted difference values corresponding to the features of each test sample are determined. Then, feature importance is calculated based on these predicted difference values to determine the feature importance corresponding to each test sample feature. Finally, according to preset feature importance requirements, the features of each training sample are screened to determine the target features whose feature importance meets the requirements.
[0093] The first and second predicted labels are used to determine the predicted difference value corresponding to the features of each training sample. Specifically, it is necessary to calculate the absolute value of the difference between the first and second predicted labels, i.e., the predicted difference value. Then, based on the predicted difference value, the feature importance is calculated to determine the feature importance corresponding to each test sample feature.
[0094] Specifically, the mean or variance of the predicted difference values can be calculated as a measure of the influence of the test sample features on the model prediction results of the label prediction model, which can be understood as the feature importance of the test sample features.
[0095] Among them, the predicted difference value can be calculated. The average value is used as the feature importance of the test sample features, that is, the feature importance p is calculated using the following formula (3):
[0096]
[0097] Where n is the number of test sample data.
[0098] In one embodiment, such as Figure 5 This provides a process for calculating feature importance, referring to... Figure 5 It can be seen that, based on the features of each collected test sample, including X1, X2, X3, ... X n And so on, and the label prediction model outputs the first predicted label f(X). i By randomly selecting features from each collected test sample and then replacing the feature values, updated test sample features can be obtained. For example, replacing the feature value of X1 yields X1′, and the updated test sample features are X1′, X2, X3, ... X n Then, based on the updated test sample features and the label prediction model, the second predicted label can be output.
[0099] In one embodiment, after determining the feature importance corresponding to each test sample feature, a preset feature importance requirement is obtained, and the features of each training sample are screened according to the preset feature importance requirement to determine the target features whose feature importance meets the feature importance requirement.
[0100] Specifically, the preset feature importance requirement can be achieved by sorting the used features by importance in descending order and extracting the top-ranked features as target features. "Top-ranked" can be understood as selecting features corresponding to the top 60% to 85% of the features with the highest importance from the descending order as target features. For better prediction performance of the label prediction model, features corresponding to the top 70% of the features with the highest importance can be further selected as target features.
[0101] Step S408: Train the prop recommendation model based on the features of each target and their corresponding feature values.
[0102] Specifically, based on the target features that meet the feature importance requirements and the feature values corresponding to the target features, the initial neural network model is retrained to obtain a trained prop recommendation model.
[0103] In this embodiment, training sample features are collected, and a label prediction model is trained based on each training sample feature and its corresponding label. Test sample features are collected, and based on the label prediction model, predicted labels corresponding to each test sample feature are output. Then, based on each predicted label, target features that meet the feature importance requirements are determined. Based on each target feature and its corresponding feature value, an item recommendation model is trained. This achieves the training, prediction, and secondary training of the initial neural network model based on target features to finally train the item recommendation model, instead of using all features for training. This reduces the feature dimension required for training the model, removes feature noise, and improves the prediction results of the trained item recommendation model.
[0104] In one embodiment, after training the prop recommendation model based on each target feature and its corresponding feature value, the method further includes:
[0105] Obtain pre-labeled feature tags for each target feature, and determine the preset recommended items based on the pre-labeled feature tags; determine the training loss value based on the preset recommended items and the game recommended items; determine the prediction accuracy of the item recommendation model based on the training loss value.
[0106] Specifically, feature labels pre-annotated for each target feature are obtained, and preset recommended items are determined based on the pre-annotated feature labels. The preset recommended items can be understood as the real values, while the game recommended items based on the divisor of the item recommendation model can be understood as the predicted values. Then, the training loss value is calculated based on the real values and predicted values. The prediction effect of the item recommendation model is measured based on the training loss value to determine the prediction accuracy of the item recommendation model.
[0107] Furthermore, the training loss value can be calculated using the following formula (4):
[0108]
[0109] Among them, y i It is the actual value, that is, the preset recommended items, y′ i It is a predicted value, that is, a game-recommended item based on the divisor of the item recommendation model.
[0110] In one embodiment, such as Figure 6 As shown, a schematic diagram illustrating the feature quantity optimization effect of an item recommendation model is provided. Figure 6It is evident that by training, testing, and retraining the original ensemble model or random forest model, a trained ensemble model or random forest model is obtained. The number of target features selected for retraining is less than the number of features required for ordinary training, thus improving training efficiency and reducing training time. Furthermore, the success rate of item recommendation in the ensemble model and random forest model trained based on the selected target features is also improved.
[0111] In this embodiment, pre-labeled feature tags are obtained for each target feature, and preset recommended items are determined based on these tags. Then, a training loss value is determined based on the preset recommended items and the game recommended items. Finally, the prediction accuracy of the item recommendation model is determined based on the training loss value. This allows for the measurement of the prediction performance of the item recommendation model based on the training loss value, thereby determining the model's prediction accuracy. If the prediction accuracy does not meet requirements, adjustments or retraining can be made promptly to improve the recommendation success rate of the applied item recommendation model.
[0112] In one embodiment, such as Figure 7 As shown, the steps for outputting the predicted labels corresponding to the features of each test sample—that is, collecting test sample features and, based on the label prediction model, outputting the predicted labels corresponding to the features of each test sample—specifically include:
[0113] Step S702: Collect test sample features and obtain the second feature value corresponding to each test sample feature. The test sample features are obtained by splicing features based on the collected player features, item features and interaction features.
[0114] Specifically, after training the label prediction model, it is necessary to test the label prediction model to determine whether the label prediction model can be used to predict the labels of data features. Then, it is necessary to obtain the test sample features, which can be obtained by collecting player features, item features, and interaction features, and concatenating the features based on player features, item features, and interaction features.
[0115] In addition to obtaining the features of each test sample, it is also necessary to obtain the second feature value corresponding to each test sample feature.
[0116] Step S704: Determine the features of each test sample and the corresponding second feature values as the input data of the label prediction model, and output the corresponding first predicted label based on the label prediction model.
[0117] Specifically, the features of each test sample and the corresponding second feature value are determined as the input data of the label prediction model. The features of each test sample and the corresponding second feature value are input into the trained label prediction model, and the corresponding first predicted label is output.
[0118] Step S706: Randomly select a preset number of test sample features from the test sample features, and replace the feature values of these test sample features to obtain updated test sample features.
[0119] Specifically, since it is necessary to determine the target features, that is, to determine which features have a greater impact on the prediction effect of the label prediction model, it is necessary to randomly select a preset number of test sample features from the test sample features and replace the feature values of these test sample features to obtain updated test sample features.
[0120] Further, specifically, a preset number of test sample features need to be randomly selected from each test sample feature, and the value range corresponding to each test sample feature is determined based on the second feature value of each test sample feature. Then, the replacement feature values corresponding to these test sample features are determined from the value range, and the feature values of these test sample features are replaced according to the replacement feature values to obtain the updated test sample features. The replacement feature values can be determined by randomly selecting the replacement feature values corresponding to these test sample features from the value range.
[0121] Step S708: Based on the label prediction model, output the second predicted label corresponding to the updated features of each test sample.
[0122] Specifically, the updated features of each test sample and the corresponding replacement feature values are determined as the input data of the label prediction model. Then, the label prediction model can output the second predicted label corresponding to the updated features of each test sample.
[0123] In this embodiment, test sample features are collected, and the corresponding second feature values are obtained for each test sample feature. These test sample features and their corresponding second feature values are then used as input data for the label prediction model. Based on the label prediction model, the corresponding first predicted label is output. A preset number of test sample features are randomly selected from the test sample features, and their feature values are replaced to obtain updated test sample features. Based on the label prediction model, the second predicted label corresponding to each updated test sample feature is output. This achieves testing of the label prediction model and secondary testing of the label prediction model based on the test sample features with replaced feature values. This allows for the subsequent determination of target features, which are then used to finally train the item recommendation model, instead of using all features for training. This reduces the feature dimension required for training the model, removes feature noise, and improves the prediction results of the trained item recommendation model.
[0124] In one embodiment, such as Figure 8 As shown, the steps for determining the value range corresponding to each test sample feature, that is, determining the value range corresponding to each test sample feature based on the second feature value of each test sample feature, specifically include:
[0125] Step S802: Obtain the feature type of each test sample feature; the feature type includes discrete features and continuous features.
[0126] Specifically, it is necessary to obtain the characteristics of each test sample, including item characteristics, player characteristics, and interaction characteristics. Item characteristics include item attributes and purchase characteristics. Item attributes include item type, item function, and item price. Purchase characteristics include the quantity of a single item purchased and its ranking among all items. Player characteristics include account characteristics, activity characteristics, payment characteristics, and social characteristics. Account characteristics correspond to the player's personal information, including game registration time, gender, login device, and login channel. Activity characteristics include the player's online time, online time period, game level, number of games played, game duration, game win rate, game mode preference, and game map mode preference. Payment characteristics include the player's payment amount per transaction, number of transactions, initial payment time, and maximum single payment amount. Social characteristics include the number of game friends, chat frequency, sharing frequency, gift-giving frequency, and team-up frequency. Interaction features include whether a player has used or viewed the item, or the number of times a player has used an item in an instance, but do not include a player's purchase behavior of the item.
[0127] Furthermore, feature types are categorized based on item features, player features, and interaction features to determine whether each feature is a discrete or continuous feature. Discrete features include gender, city, etc., while continuous features include price, age, etc. Discrete features have a finite value space, while continuous features have an infinite value space.
[0128] Step S804: Based on the features of each test sample and the feature type to which they belong, set the corresponding value space and add the corresponding storage limit to the value space.
[0129] Specifically, based on the features of each test sample and their respective feature types, a corresponding value space is initialized for each test sample feature, i.e., the value space is initialized. And set corresponding storage limits for the value space, such as 1000, 2000, etc., which can be adjusted according to actual needs.
[0130] Step S806: Traverse the features of each test sample and obtain the different feature values corresponding to each test sample feature.
[0131] Specifically, by traversing the features of each test sample, the different feature values corresponding to each test sample feature are obtained, that is, the different feature values of each test sample feature in historical game process data or current game process data.
[0132] Step S808: Determine whether the value space has reached the storage limit.
[0133] Step S810: When the value space has not reached the storage limit, store each feature value into the corresponding set value space D. j In order to determine the value range corresponding to the features of each test sample.
[0134] Specifically, obtain the preset storage limit and determine the current value space D. j Whether the preset storage limit has been reached, for example, determining the current value space D. j Has the storage limit of 1000 been reached, when in the value space D? j If the storage limit is not reached, the values of each feature will be stored in the corresponding value space D. j In, and according to the value space D j The value range corresponding to each feature value stored in the system is determined.
[0135] Step S812: When the value space reaches the storage limit, determine the value to be replaced from the value space according to the preset filtering requirements.
[0136] Specifically, when in the value space D j When the storage limit is reached, the system will filter according to preset requirements, such as wiping only once. The probability from the value space D j Select a value and designate it as the value to be replaced.
[0137] Step S814: Obtain the target feature value of the test sample feature to be stored, and update the value to be replaced to the target feature value to determine the value range corresponding to each test sample feature.
[0138] Specifically, this is achieved by obtaining the target feature value of the test sample feature that is currently to be stored, for example, obtaining the test sample feature x that is currently to be stored. j And update the value to be replaced to the test sample feature x with the current feature value to be stored. j The target feature values, based on the updated value space D j Determine the value range corresponding to the features of each test sample.
[0139] In one embodiment, feature value replacement can also be achieved by selecting any two samples and then exchanging the values of their corresponding features. This sample value exchange requires selecting samples, i.e., effective sampling. Determining the value space involves extracting the feature dimensions to be calculated, resulting in higher computational efficiency.
[0140] In one embodiment, after determining the value range corresponding to each test sample feature, the value range can be determined from feature x. j The value space D j In China, with The probability is selected by choosing a feature value x′, and the test sample feature x′ in the test sample is used. j The feature values are replaced with x′ to obtain the updated test sample.
[0141] In this embodiment, by obtaining the feature type to which each test sample feature belongs, a corresponding value space is set based on each test sample feature and its feature type, and a corresponding storage limit is added to the value space. By traversing each test sample feature, different feature values corresponding to each test sample feature are obtained. When the value space has not reached the storage limit, each feature value is stored in the corresponding set value space to determine the value range corresponding to each test sample feature. When the value space reaches the storage limit, the value to be replaced is determined from the value space according to preset filtering requirements, and the target feature value of the test sample feature whose feature value is to be stored is obtained. The value to be replaced is then updated to the target feature value to determine the value range corresponding to each test sample feature. This achieves the method of storing feature values by setting a value space, so that replacement feature values can be obtained from the value space for feature value replacement processing in the future, thereby obtaining the updated test sample features. This enables a secondary test of the label prediction model based on the updated test sample features, further improving the prediction effect of the label prediction model.
[0142] In one embodiment, such as Figure 9 As shown, a method for recommending game items is provided, refer to Figure 9 It can be seen that the method specifically includes the following steps:
[0143] Step S901: Collect training sample features and obtain the first feature value corresponding to each training sample feature to obtain the training sample feature set. The training sample features are obtained by splicing the collected player features, item features and interaction features.
[0144] Step S902: Label each training sample feature with a corresponding sample label; the sample labels include labels for purchased items and labels for unpurchased items.
[0145] Step S903: Train the label prediction model based on the training sample feature set and the sample labels corresponding to each training sample feature.
[0146] Step S904: Collect test sample features and obtain the second feature value corresponding to each test sample feature. The test sample features are obtained by splicing features based on the collected player features, item features and interaction features.
[0147] Step S905: Determine the features of each test sample and the corresponding second feature values as the input data of the label prediction model, and output the corresponding first predicted label based on the label prediction model.
[0148] Step S906: Randomly select a preset number of test sample features from the test sample features, and replace the feature values of these test sample features to obtain updated test sample features.
[0149] Step S907: Based on the label prediction model, output the second predicted label corresponding to the updated features of each test sample.
[0150] Step S908: Based on the first prediction label and the second prediction label, determine the prediction difference value corresponding to the features of each test sample.
[0151] Step S909: Based on the predicted difference value, the feature importance is calculated to determine the feature importance corresponding to each test sample feature.
[0152] Step S910: Based on the preset feature importance requirements, the features of each training sample are screened to determine the target features whose feature importance meets the feature importance requirements.
[0153] Step S911: Train the prop recommendation model based on the features of each target and their corresponding feature values.
[0154] Step S912: When it is detected that the real-time game process of the current game instance meets the item recommendation conditions, the item recommendation model is obtained. The item recommendation model is trained using target features that meet the feature importance requirements. Each target feature is determined according to the predicted label output by the label prediction model.
[0155] Step S913: Collect game process data, game item attribute data, and player attribute data for the current game instance.
[0156] Step S914: Extract target player features from player attribute data, target interaction features from game process data, and target item features from game item attribute data.
[0157] Step S915: The target player characteristics, target item characteristics, and target interaction characteristics are determined as the input data for the item recommendation model. Based on the item recommendation model, recommended game items are output and displayed on the game interface of the current game process.
[0158] In the aforementioned game item recommendation method, when the real-time game progress of the current game instance is detected to meet the item recommendation conditions, an item recommendation model is obtained. This model is trained using target features that meet the feature importance requirements, and the target features are determined based on the predicted labels output by the label prediction model. By collecting game progress data, game item attribute data, and player attribute data of the current game instance, target player features are extracted from the player attribute data, target interaction features from the game progress data, and target item features from the game item attribute data. These target player features, target item features, and target interaction features are then used as input data for the item recommendation model. Based on this model, recommended game items are output and displayed on the game interface of the current game instance. This method achieves the ability to determine the target features that meet the requirements based on feature importance, and then train the item recommendation model based on these target features, instead of using all features for training. This reduces the feature dimensions required for training the model, removes feature noise, and improves the prediction results of the trained item recommendation model. This makes the output game item recommendations more consistent with the actual needs of the current game progress, further increasing the success rate of game item recommendations and increasing platform revenue.
[0159] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0160] Based on the same inventive concept, this application also provides a game item recommendation device for implementing the game item recommendation method described above. The solution provided by this device is similar to the solution described in the above method; therefore, the specific limitations of one or more game item recommendation device embodiments provided below can be found in the limitations of the game item recommendation method described above, and will not be repeated here.
[0161] In one embodiment, such as Figure 10 As shown, a game item recommendation device is provided, including: an item recommendation model acquisition module 1002, a data acquisition module 1004, a target feature extraction module 1006, and a game recommended item display module 1008, wherein:
[0162] The item recommendation model acquisition module 1002 is used to acquire an item recommendation model when the real-time game process of the current game instance is detected to meet the item recommendation conditions. The item recommendation model is trained using target features that meet the feature importance requirements, and each target feature is determined according to the predicted label output by the label prediction model.
[0163] The data acquisition module 1004 is used to collect game process data, game item attribute data, and player attribute data of the current game instance.
[0164] The target feature extraction module 1006 is used to extract target player features from player attribute data, target interaction features from game process data, and target item features from game item attribute data.
[0165] The game recommended item display module 1008 is used to determine the target player characteristics, target item characteristics, and target interaction characteristics as input data for the item recommendation model, output game recommended items based on the item recommendation model, and display them on the game interface of the current game process.
[0166] In the aforementioned game item recommendation device, when the real-time game progress of the current game instance is detected to meet the item recommendation conditions, an item recommendation model is acquired. This model is trained using target features that meet the feature importance requirements, and the target features are determined based on the predicted labels output by the label prediction model. By collecting game progress data, game item attribute data, and player attribute data of the current game instance, target player features are extracted from the player attribute data, target interaction features from the game progress data, and target item features from the game item attribute data. These target player features, target item features, and target interaction features are then used as input data for the item recommendation model. Based on this model, recommended game items are output and displayed on the game interface of the current game progress. This approach allows for the determination of target features that meet the requirements based on feature importance, and the training of the item recommendation model based on these target features, rather than using all features for training. This reduces the feature dimensions required for training the model, removes feature noise, and improves the prediction results of the trained item recommendation model. This results in recommended game items that better meet the actual needs of the current game progress, further increasing the success rate of game item recommendations and boosting platform revenue.
[0167] In one embodiment, a game item recommendation device is provided, further comprising:
[0168] The label prediction model training module is used to collect the features of training samples and train the label prediction model based on the features of each training sample and the corresponding sample label.
[0169] The predicted label output module is used to collect the features of test samples and, based on the label prediction model, output the predicted labels corresponding to the features of each test sample.
[0170] The target feature determination module is used to determine the target features that meet the feature importance requirements based on each predicted label;
[0171] The prop recommendation model training module is used to train the prop recommendation model based on the features of each target and their corresponding feature values.
[0172] In one embodiment, the label prediction model training module is further configured to:
[0173] Collect training sample features and obtain the first feature value corresponding to each training sample feature to obtain the training sample feature set; the training sample features are obtained by concatenating the collected player features, item features and interaction features; label each training sample feature with a corresponding sample label; the sample labels include purchased item labels and unpurchased item labels; and train a label prediction model based on the training sample feature set and the sample labels corresponding to each training sample feature.
[0174] In one embodiment, the label prediction output module is further configured to:
[0175] Collect test sample features and obtain the second feature value corresponding to each test sample feature; the test sample features are obtained by concatenating the collected player features, item features, and interaction features; each test sample feature and its corresponding second feature value are determined as the input data of the label prediction model, and the corresponding first predicted label is output based on the label prediction model; a preset number of test sample features are randomly selected from the test sample features, and the feature values of these test sample features are replaced to obtain the updated test sample features; based on the label prediction model, the second predicted label corresponding to each updated test sample feature is output.
[0176] In one embodiment, the target feature determination module is further configured to:
[0177] Based on the first and second predicted labels, the predicted difference values corresponding to the features of each test sample are determined; the feature importance is calculated based on the predicted difference values to determine the feature importance corresponding to the features of each test sample; and the features of each training sample are screened according to the preset feature importance requirements to determine the target features whose feature importance meets the requirements.
[0178] In one embodiment, the label prediction output module is further configured to:
[0179] A preset number of test sample features are randomly selected from the test sample features; the value range corresponding to each test sample feature is determined according to the second feature value of each test sample feature; the replacement feature value corresponding to these test sample features is determined from the value range; the feature value of these test sample features is replaced according to the replacement feature value to obtain the updated test sample features.
[0180] In one embodiment, the label prediction output module is further configured to:
[0181] Obtain the feature type of each test sample feature; feature types include discrete features and continuous features; based on each test sample feature and its feature type, set the corresponding value space and add a corresponding storage limit to the value space; traverse each test sample feature and obtain the different feature values corresponding to each test sample feature; when the value space has not reached the storage limit, store each feature value in the corresponding set value space to determine the value range corresponding to each test sample feature.
[0182] In one embodiment, the label prediction output module is further configured to:
[0183] When the value space reaches its storage limit, the value to be replaced is determined from the value space according to the preset filtering requirements;
[0184] Obtain the target feature value of the test sample feature for which the current feature value is to be stored, and update the value to be replaced to the target feature value to determine the value range corresponding to each test sample feature.
[0185] In one embodiment, a game item recommendation device is provided, further comprising a prediction accuracy determination module, used for:
[0186] Obtain pre-labeled feature tags for each target feature, and determine the preset recommended items based on the pre-labeled feature tags; determine the training loss value based on the preset recommended items and the game recommended items; determine the prediction accuracy of the item recommendation model based on the training loss value.
[0187] Each module in the aforementioned game item recommendation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.
[0188] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 11As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The database stores data such as target characteristics, game process data, game item attribute data, player attribute data, target player characteristics, target interaction characteristics, target item characteristics, item recommendation models, and recommended game items. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a game item recommendation method.
[0189] Those skilled in the art will understand that Figure 11 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0190] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above method embodiments.
[0191] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.
[0192] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0193] It should be noted that the user information, player characteristics (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0194] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0195] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0196] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for recommending game items, characterized in that, The method includes: When the real-time game process of the current game instance is detected to enter the game item recommendation scenario, it is determined that the real-time game process meets the item recommendation conditions, and an item recommendation model is obtained. The item recommendation model is trained using target features that meet the feature importance requirements, and each target feature is determined according to the predicted label output by the label prediction model. Collect game progress data, game item attribute data, and player attribute data for the current game instance; the game progress data includes the current game progress of the game instance, as well as the interaction characteristics between the game player and items; Extract target player features from the player attribute data, extract target interaction features from the game process data, and extract target item features from the game item attribute data; The target player characteristics, target item characteristics, and target interaction characteristics are determined as the input data for the item recommendation model. Based on the item recommendation model, recommended game items are output and displayed on the game interface of the current game instance. Among them, the methods for training the prop recommendation model using target features that meet the feature importance requirements include: Features of training samples are collected, and a label prediction model is trained based on each training sample feature and its corresponding label. The training sample features are obtained by concatenating features from collected player features, item features, and interaction features. Test sample features are collected, and a predicted label corresponding to each test sample feature is output based on the label prediction model. The test sample features are obtained by concatenating features from collected player features, item features, and interaction features. Target features that meet the feature importance requirements are determined based on each predicted label. An item recommendation model is trained based on each target feature and its corresponding feature value.
2. The method according to claim 1, characterized in that, The process of collecting training sample features and training a label prediction model based on each training sample feature and its corresponding label includes: Collect training sample features and obtain the first feature value corresponding to each training sample feature to obtain the training sample feature set; Each of the training sample features is labeled with a corresponding sample label; the sample label includes a label for purchased items and a label for unpurchased items. The label prediction model is trained based on the training sample feature set and the sample labels corresponding to each training sample feature.
3. The method according to claim 1, characterized in that, The predicted labels include a first predicted label and a second predicted label; the process of collecting test sample features and, based on the label prediction model, outputting predicted labels corresponding to each of the test sample features includes: Collect test sample features and obtain the second feature value corresponding to each test sample feature; The features of each test sample and the corresponding second feature values are determined as the input data of the label prediction model, and the corresponding first predicted label is output based on the label prediction model. A preset number of test sample features are randomly selected from the test sample features, and the feature values of these test sample features are replaced to obtain updated test sample features. Based on the label prediction model, a second predicted label corresponding to the updated features of each test sample is output.
4. The method according to claim 3, characterized in that, The step of determining target features that meet the feature importance requirements based on each of the predicted labels includes: Based on the first prediction label and the second prediction label, the prediction difference value corresponding to the feature of each test sample is determined; Based on the predicted difference value, feature importance is calculated to determine the feature importance corresponding to each of the test sample features; Based on the preset feature importance requirements, the features of each training sample are screened to determine the target features whose feature importance meets the requirements.
5. The method according to claim 3, characterized in that, The step of randomly selecting a preset number of test sample features from the test sample features and replacing the feature values of these test sample features to obtain updated test sample features includes: A preset number of test sample features are randomly selected from each of the aforementioned test sample features; Based on the second feature value of each of the test sample features, determine the value range corresponding to each of the test sample features; Determine the replacement feature values corresponding to the features of these test samples from the value range; Based on the replacement feature values, the feature values of these test samples are replaced to obtain updated test sample features.
6. The method according to claim 5, characterized in that, The step of determining the value range corresponding to each of the test sample features based on the second feature value of each of the test sample features includes: Obtain the feature type to which each of the test sample features belongs; the feature type includes discrete features and continuous features; Based on the characteristics and feature types of each test sample, a corresponding value space is set, and a corresponding storage limit is added to the value space. Iterate through the features of each test sample and obtain the different feature values corresponding to each test sample feature; When the value space has not reached the storage limit, each of the feature values is stored in the corresponding value space to determine the value range corresponding to each of the test sample features.
7. The method according to claim 6, characterized in that, The method further includes: When the value space reaches the storage limit, the value to be replaced is determined from the value space according to the preset filtering requirements; Obtain the target feature value of the test sample feature for which the current feature value is to be stored, and update the value to be replaced to the target feature value to determine the value range corresponding to each test sample feature.
8. The method according to claim 1, characterized in that, After training the item recommendation model based on each of the target features and their corresponding feature values, the method further includes: Obtain pre-labeled feature tags for each of the target features, and determine preset recommended props based on the pre-labeled feature tags; The training loss value is determined based on the preset recommended items and the game recommended items; Based on the training loss value, the prediction accuracy of the item recommendation model is determined.
9. A game item recommendation device, characterized in that, The device includes: The item recommendation model acquisition module is used to determine that the real-time game process meets the item recommendation conditions when the real-time game process of the current game instance is detected to enter the game item recommendation scene, and to acquire the item recommendation model. The item recommendation model is trained using target features that meet the feature importance requirements, and each target feature is determined according to the predicted label output by the label prediction model. The data acquisition module is used to collect game progress data, game item attribute data, and player attribute data of the current game instance; the game progress data includes the current game progress of the game instance, as well as the interaction characteristics between the game player and the items; The target feature extraction module is used to extract target player features from the player attribute data, target interaction features from the game process data, and target item features from the game item attribute data; The game recommended item display module is used to determine the target player characteristics, target item characteristics, and target interaction characteristics as input data for the item recommendation model, output game recommended items based on the item recommendation model, and display them on the game interface of the current game instance; The device further includes: The tag prediction model training module is used to collect training sample features and train a tag prediction model based on each training sample feature and its corresponding sample label; the training sample features are obtained by concatenating the collected player features, item features and interaction features. The predicted label output module is used to collect test sample features and, based on the label prediction model, output predicted labels corresponding to each test sample feature; the test sample features are obtained by concatenating the collected player features, item features, and interaction features. The target feature determination module is used to determine the target features that meet the feature importance requirements based on each of the predicted labels; The prop recommendation model training module is used to train the prop recommendation model based on the target features and their corresponding feature values.
10. The apparatus according to claim 9, characterized in that, The predicted label output module is also used for: Collect training sample features and obtain the first feature value corresponding to each training sample feature to obtain a training sample feature set; label each training sample feature with a corresponding sample label; the sample label includes a purchased item label and an unpurchased item label; train a label prediction model based on the training sample feature set and the sample labels corresponding to each training sample feature.
11. The apparatus according to claim 9, characterized in that, The predicted labels include a first predicted label and a second predicted label; the predicted label output module is further used for: Collect test sample features and obtain the second feature value corresponding to each test sample feature; determine each test sample feature and the corresponding second feature value as the input data of the label prediction model, and output the corresponding first predicted label based on the label prediction model; randomly select a preset number of test sample features from the test sample features, and replace the feature values of these test sample features to obtain updated test sample features; based on the label prediction model, output the second predicted label corresponding to each updated test sample feature.
12. The apparatus according to claim 11, characterized in that, The target feature determination module is further configured to: Based on the first predicted label and the second predicted label, the predicted difference value corresponding to each of the test sample features is determined; the feature importance is calculated based on the predicted difference value to determine the feature importance corresponding to each of the test sample features; and the training sample features are screened according to the preset feature importance requirements to determine the target features whose feature importance meets the feature importance requirements.
13. The apparatus according to claim 11, characterized in that, The predicted label output module is also used for: A preset number of test sample features are randomly selected from the test sample features; a value range corresponding to each test sample feature is determined according to the second feature value of each test sample feature; a replacement feature value corresponding to these test sample features is determined from the value range; and the feature values of these test sample features are replaced according to the replacement feature values to obtain updated test sample features.
14. The apparatus according to claim 13, characterized in that, The predicted label output module is also used for: Obtain the feature type to which each of the test sample features belongs; the feature type includes discrete features and continuous features; based on each of the test sample features and its feature type, set corresponding value spaces and add corresponding storage limits to the value spaces; traverse each of the test sample features and obtain the different feature values corresponding to each of the test sample features; When the value space has not reached the storage limit, each of the feature values is stored in the corresponding value space to determine the value range corresponding to each of the test sample features.
15. The apparatus according to claim 14, characterized in that, The predicted label output module is also used for: When the value space reaches the storage limit, the value to be replaced is determined from the value space according to the preset filtering requirements; the target feature value of the test sample feature of the current feature value to be stored is obtained, and the value to be replaced is updated to the target feature value, so as to determine the value range corresponding to each test sample feature.
16. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 8.
17. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
18. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Prop recommendation method, device and system, server and storage medium
CN111768239A
Method and device for recommending props in game, electronic device and storage medium
CN113546428A