Model training method, prop recommendation method, device, electronic equipment, computer readable storage medium and computer program product

CN122937482APending Publication Date: 2026-10-20TENCENT TECH SHANGHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510460060.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-11
Publication Date
2026-10-20

AI Technical Summary

Technical Problem

然而,相关技术中模型训练的效率和准确性较低,不能深度挖掘玩家的兴趣偏好,所以在进行道具推荐时效果不佳

Benefits of technology

[0033]在本申请实施例中,获取待训练的预测模型、第一待推荐道具标识和每一样本对象对应的训练数据,训练数据包括训练样本和样本标签。然后,针对每一样本对象,通过待训练的预测模型,从样本对象的训练样本中获取意向道具标识序列,基于意向道具标识序列和第一待推荐道具标识的目标向量,确定样本对象的倾向表示向量序列。这样,通过样本对象的倾向表示向量序列能够充分挖掘样本对象的意向道具标识序列与第一待推荐道具标识之间的关联,从而提高对样本对象的兴趣偏好进行分析的准确性。之后,基于训练样本、倾向表示向量序列和目标向量进行预测处理,得到样本对象针对第一待推荐道具标识的转化概率;基于每一样本对象的转化概率、样本对象对应的样本标签和意向道具标识序列,对待训练的预测模型进行训练,得到训练后的预测模型。这样,通过训练样本、倾向表示向量序列和目标向量同时进行预测处理,能够提高得到的转化概率的准确性,通过每一样本对象的转化概率、样本标签和意向道具标识序列进行模型训练,能够提高模型训练效率,以及训练后的预测模型的泛化能力和预测准确性,进而提高通过训练后的预测模型进行道具推荐的效率和准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure BDA0005358036170000061
    Figure BDA0005358036170000061
  • Figure BDA0005358036170000071
    Figure BDA0005358036170000071
  • Figure BDA0005358036170000081
    Figure BDA0005358036170000081
Patent Text Reader

Abstract

This application provides a model training method, a prop recommendation method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product. The method includes: for each sample object, obtaining an intention prop identifier sequence from the training samples of the sample object using a prediction model to be trained; determining a tendency representation vector sequence of the sample object based on the intention prop identifier sequence and the target vector of a first prop identifier to be recommended; performing prediction processing based on the training samples, the tendency representation vector sequence, and the target vector to obtain the conversion probability of the sample object for the first prop identifier to be recommended; and training the prediction model to be trained based on the conversion probability of each sample object, the sample label corresponding to the sample object, and the intention prop identifier sequence to obtain a trained prediction model. This application improves the efficiency and accuracy of model training, thereby improving the efficiency and accuracy of prop recommendation using the trained prediction model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to computer technology, and more particularly to a model training method, a prop recommendation method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product. Background Technology

[0002] In gaming scenarios, to enhance player experience and satisfaction, in-game behavior can be analyzed to identify items players might be interested in, providing customized item recommendations and increasing entertainment value. This typically involves manually filtering behavioral data to build a training model. The trained model then predicts the probability of a player purchasing each item, recommending items with higher purchase probabilities. However, the efficiency and accuracy of model training in these technologies are low, and they cannot deeply mine player interests and preferences, resulting in poor effectiveness in item recommendations. Summary of the Invention

[0003] This application provides a model training method, a prop recommendation method, an apparatus, an electronic device, a computer-readable storage medium, and a computer program product, which can improve the efficiency and accuracy of model training, and thus improve the efficiency and accuracy of prop recommendation through the trained prediction model.

[0004] The technical solution of this application embodiment is implemented as follows:

[0005] This application provides a model training method, the method comprising:

[0006] Obtain the prediction model to be trained, the identifier of the first recommended prop, and the training data corresponding to each sample object. The training data includes training samples and sample labels.

[0007] For each of the aforementioned sample objects, the intention prop identifier sequence is obtained from the training samples of the sample object using the prediction model to be trained;

[0008] Based on the intended prop identifier sequence and the target vector of the first recommended prop identifier, determine the tendency representation vector sequence of the sample object;

[0009] Based on the training samples, the tendency representation vector sequence, and the target vector, a prediction process is performed to obtain the conversion probability of the sample object for the first recommended item identifier;

[0010] Based on the conversion probability of each sample object, the sample label corresponding to the sample object, and the intention prop identifier sequence, the prediction model to be trained is trained to obtain the trained prediction model.

[0011] This application provides a method for recommending items, the method including:

[0012] In response to detecting that a target object has entered a logged-in state, a tool recommendation request is received for the target object;

[0013] Based on the item recommendation request, obtain the target object's data to be predicted and the item recommendation list;

[0014] For each second recommended item in the item recommendation list, based on the data to be predicted, the second recommended item is predicted by the trained prediction model to obtain a prediction result. The prediction result is used to characterize the conversion probability of the target object to the second recommended item. The training data of the trained prediction model is obtained using the model training method provided in other embodiments of this application.

[0015] Based on the prediction results for each of the second recommended items, a target item is determined from the item recommendation list, and the target item is pushed to the terminal corresponding to the target object.

[0016] This application provides a model training apparatus, including:

[0017] The first acquisition module is used to acquire the prediction model to be trained, the identifier of the first recommended prop, and the training data corresponding to each sample object. The training data includes training samples and sample labels.

[0018] The first acquisition module is further configured to, for each of the sample objects, acquire an intention prop identifier sequence from the training samples of the sample object through the prediction model to be trained;

[0019] The first determining module is used to determine the tendency representation vector sequence of the sample object based on the intention prop identifier sequence and the target vector of the first recommended prop identifier;

[0020] The first prediction module is used to perform prediction processing based on the training samples, the tendency representation vector sequence and the target vector to obtain the conversion probability of the sample object for the first recommended prop identifier;

[0021] The training module is used to train the prediction model to be trained based on the conversion probability of each sample object, the sample label corresponding to the sample object, and the intention prop identifier sequence, so as to obtain the trained prediction model.

[0022] This application provides a prop recommendation device, including:

[0023] The receiving module is used to receive an item recommendation request for the target object in response to the detection that the target object has entered the login state;

[0024] The second acquisition module is used to acquire the data to be predicted and the list of recommended items for the target object based on the item recommendation request.

[0025] The second prediction module is used to predict each second recommended item in the item recommendation list based on the prediction data and through a trained prediction model to obtain a prediction result. The prediction result is used to characterize the conversion probability of the target object to the second recommended item. The training data of the trained prediction model is obtained using the model training method described above.

[0026] The second determining module is used to determine the target item in the item recommendation list based on the prediction result corresponding to each of the second recommended items, and push the target item to the terminal corresponding to the target object.

[0027] This application provides an electronic device, the electronic device comprising:

[0028] Memory is used to store executable instructions or computer programs.

[0029] The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the model training method or prop recommendation method provided in the embodiments of this application.

[0030] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions, which, when executed by a processor, implements the model training method or prop recommendation method provided in this application.

[0031] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the model training method or prop recommendation method provided in this application.

[0032] The embodiments of this application have the following beneficial effects:

[0033] In this embodiment, a prediction model to be trained, a first recommended item identifier, and training data corresponding to each sample object are obtained. The training data includes training samples and sample labels. Then, for each sample object, the intention item identifier sequence is obtained from the training samples of the sample object using the prediction model to be trained. Based on the intention item identifier sequence and the target vector of the first recommended item identifier, the tendency representation vector sequence of the sample object is determined. In this way, the tendency representation vector sequence of the sample object can fully explore the correlation between the intention item identifier sequence and the first recommended item identifier, thereby improving the accuracy of the interest preference analysis of the sample object. Subsequently, prediction processing is performed based on the training samples, the tendency representation vector sequence, and the target vector to obtain the conversion probability of the sample object for the first recommended item identifier. Based on the conversion probability of each sample object, the sample label corresponding to the sample object, and the intention item identifier sequence, the prediction model to be trained is trained to obtain the trained prediction model. In this way, by simultaneously performing prediction processing on training samples, tendency representation vector sequences, and target vectors, the accuracy of the obtained conversion probabilities can be improved. By training the model using the conversion probabilities of each sample object, sample labels, and intention prop identifier sequences, the training efficiency of the model can be improved, as well as the generalization ability and prediction accuracy of the trained prediction model. This, in turn, improves the efficiency and accuracy of prop recommendation using the trained prediction model. Attached Figure Description

[0034] Figure 1 This is a schematic diagram of the structure of the model training system provided in the embodiments of this application;

[0035] Figure 2A This is a schematic diagram of the server structure provided in an embodiment of this application;

[0036] Figure 2B This is another server structure diagram provided in an embodiment of this application;

[0037] Figure 3A This is a flowchart illustrating the model training method provided in the embodiments of this application;

[0038] Figure 3B This is a flowchart illustrating the process of determining a tendency identifier vector sequence provided in an embodiment of this application;

[0039] Figure 3C This is a flowchart illustrating the process of determining the identifier vector sequence provided in an embodiment of this application;

[0040] Figure 3D This is a flowchart illustrating the process of determining the hidden representation vector sequence provided in an embodiment of this application;

[0041] Figure 3E This is a schematic diagram of the process for obtaining multiple first output vectors provided in an embodiment of this application;

[0042] Figure 3F This is a flowchart illustrating the process of determining a tendency representation vector sequence provided in an embodiment of this application;

[0043] Figure 3G This is a flowchart illustrating the process of determining multiple tendency representation vectors provided in an embodiment of this application;

[0044] Figure 3H This is a schematic diagram of the process for obtaining the conversion probability provided in an embodiment of this application;

[0045] Figure 3I This is a schematic diagram of the process for obtaining discrete feature vectors provided in an embodiment of this application;

[0046] Figure 3J This is a flowchart illustrating the trained prediction model provided in an embodiment of this application;

[0047] Figure 3K This is a schematic diagram of the process for determining the second loss value provided in an embodiment of this application;

[0048] Figure 4A This is a schematic diagram of the prop recommendation process provided in the embodiments of this application;

[0049] Figure 4B This is a flowchart illustrating the process of determining the target prop provided in an embodiment of this application;

[0050] Figure 5 This is a schematic diagram of the game display interface provided in the embodiments of this application;

[0051] Figure 6 This is a schematic diagram of the item purchase interface provided in the embodiments of this application;

[0052] Figure 7 This is a schematic diagram of the overall architecture of the model training system provided in the embodiments of this application;

[0053] Figure 8 This is a comparison diagram of the effects of the prop recommendation scheme in the embodiments of this application and related technologies. Detailed Implementation

[0054] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0055] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0056] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0057] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0058] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.

[0059] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.

[0060] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.

[0061] 1) Deep Multi-Interest Network (DMIN): A machine learning model, particularly used in recommender systems to capture diverse user interests. This model is designed to identify and utilize user interests across multiple contexts or scenarios to improve the accuracy and relevance of recommendations.

[0062] 2) Multi-Head Self-Attention Mechanism: A deep learning technique for processing sequence data. It is a core component in the architecture of deep learning models (Transformers) based on self-attention mechanisms. It can effectively capture long-distance dependencies within sequences and improve the expressive power and generalization ability of the model through division of labor.

[0063] 3) Extreme Gradient Boosting (XGBoost) model: A popular machine learning algorithm mainly used for classification and regression tasks. Based on the principle of Gradient Boosting Decision Tree (GBDT), it optimizes the loss function to train the model and achieve higher prediction accuracy.

[0064] The relevant technology is an item recommendation scheme based on the XGBoost model, and the implementation process is as follows:

[0065] 1) Feature Construction: Player features, item features, and player-item interaction features are selected through manual experience. Player features include, but are not limited to: average daily online time in the past four weeks, level, experience, cumulative spending, spending in the past four weeks, cumulative amount of game currency consumed, amount of game currency consumed in the past four weeks, number of friends, and number of interactions with friends in the past four weeks. Item features include, but are not limited to: item price, item category, whether it is bound to an IP address, number of days it has been available, and purchase popularity. Player-item interaction features include, but are not limited to: the number of times players have viewed / purchased the item in the past four weeks, and the distribution of the number of times players have drawn items of different price tiers in the past four weeks.

[0066] 2) Generate positive and negative samples: Based on the player's item purchase log, take the items purchased by the player in the next hour as positive samples, and record them as 1; at the same time, randomly select a number of items that were not purchased as negative samples for the player, and record them as 0.

[0067] 3) Wide table generation: The features from steps 1 and 2 (player features, item features, player-item cross features) and positive and negative samples are concatenated to obtain the training wide table, which is used for model training; the features from step 1 are concatenated to obtain the prediction wide table, which is used for model prediction.

[0068] 4) Model training: Select the XGBoost model, select appropriate hyperparameters to initialize the model, and input the training wide table generated in step 3 into the model for training until the model converges.

[0069] 5) Model Prediction of Potential Purchase Items: Based on the XGBoost model trained in step 4, the prediction wide table generated in step 3 is input into the model for prediction, obtaining the player's purchase probability for each item. Items are then sorted in descending order of purchase probability. According to business rules and recommendation strategies, the top N (Top-N) items are personalized and recommended to the player.

[0070] In real-world game scenarios, players have a large range of actions and a wide variety of items. Players may make mistakes, such as browsing items they don't want to buy while viewing the item list in the store. Alternatively, players may have different priorities regarding different types of items; some focus on cost-effectiveness, others on aesthetics, and still others on scarcity. Therefore, model training methods using existing technologies cannot deeply understand players' diverse purchasing preferences, resulting in low training efficiency and accuracy, and ultimately, poor performance in item recommendations.

[0071] This application provides a model training method, item recommendation method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can improve the efficiency and accuracy of model training, thereby improving the efficiency and accuracy of item recommendation through the trained prediction model. The following describes exemplary applications of the electronic device provided in this application. The electronic device provided in this application can be implemented as various types of terminals such as laptops, tablets, desktop computers, set-top boxes, smartphones, smart speakers, smartwatches, smart TVs, and in-vehicle terminals, or it can be implemented as a server. The following will describe exemplary applications when the device is implemented as a server.

[0072] See Figure 1 , Figure 1 This is a schematic diagram of the structure of the model training system provided in the embodiments of this application. Figure 1 The system involves a database 100, a server 200, a network 300, and a terminal 400. Terminal 400 is connected to server 200 via network 300, which can be a wide area network (WAN), a local area network (LAN), or a combination of both. The trained prediction model can be stored in database 100, which can be independent of server 200 or deployed on server 200. Figure 1 The database 100 is shown as an example, independent of the server 200.

[0073] During model training, server 200 can obtain the prediction model to be trained, the first recommended item identifier, and the training data corresponding to each sample object from database 100 or terminal 400. Then, for each sample object, the intention item identifier sequence is obtained from the training samples of the sample object using the prediction model to be trained; based on the intention item identifier sequence and the target vector of the first recommended item identifier, the tendency representation vector sequence of the sample object is determined; prediction processing is performed based on the training samples, the tendency representation vector sequence, and the target vector to obtain the conversion probability of the sample object for the first recommended item identifier; based on the conversion probability of each sample object, the sample label corresponding to the sample object, and the intention item identifier sequence, the prediction model to be trained is trained to obtain the trained prediction model. Afterwards, the trained prediction model is stored in database 100.

[0074] Users can log in to the game on terminal 400, putting the target object into a logged-in state. When server 200 detects that the target object has entered a logged-in state, it receives an item recommendation request for the target object; based on the item recommendation request, it obtains the target object's data to be predicted and an item recommendation list. Then, server 200 retrieves a trained prediction model from database 100, and for each second item to be recommended in the item recommendation list, it predicts the second item to be recommended based on the data to be predicted, obtaining a prediction result. The prediction result is used to characterize the target object's conversion probability of the second item to be recommended; based on the prediction result corresponding to each second item to be recommended, the target item is determined in the item recommendation list and pushed to the terminal 400 corresponding to the target object. Afterwards, the target item is displayed through the display interface 401 of terminal 400, completing the item recommendation.

[0075] Taking server 200 for model training as an example, see [link / reference]. Figure 2A , Figure 2A This is a schematic diagram of the server structure provided in an embodiment of this application. Figure 2A The server 200-1 shown includes at least one processor 210-1, memory 230-1, and at least one network interface 220-1. The various components in server 200-1 are coupled together via a bus system 240-1. It is understood that the bus system 240-1 is used to implement communication between these components. In addition to a data bus, the bus system 240-1 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2A The general designated all buses as Bus System 240-1.

[0076] The processor 210-1 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.

[0077] The memory 230-1 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state memory, hard disk drives, optical disk drives, etc. The memory 230-1 may optionally include one or more storage devices physically located away from the processor 210-1.

[0078] Memory 230-1 may include volatile memory or non-volatile memory, or both. Non-volatile memory may be read-only memory (ROM), and volatile memory may be random access memory (RAM). The memory 230-1 described in this application embodiment is intended to include any suitable type of memory.

[0079] In some embodiments, memory 230-1 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.

[0080] Operating system 231-1 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;

[0081] The network communication module 232-1 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 220-1, such as Bluetooth, WiFi, and Universal Serial Bus (USB).

[0082] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2A A model training device 233 stored in memory 230-1 is shown. This device can be software in the form of programs and plugins, and includes the following software modules: a first acquisition module 2331, a first determination module 2332, a first prediction module 2333, and a training module 2334. These modules are logically sequential and can therefore be arbitrarily combined or further split according to their implemented functions. The functions of each module will be described below.

[0083] Taking server 200 as an example for item recommendations, see [link / reference]. Figure 2B , Figure 2B This is another server structure diagram provided in an embodiment of this application. Figure 2B The server 200-2 shown includes at least one processor 210-2, memory 230-2, and at least one network interface 220-2. The various components in server 200-2 are coupled together via a bus system 240-2. It is understood that the bus system 240-2 is used to implement communication between these components. In addition to a data bus, the bus system 240-2 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 2B All buses are labeled as Bus System 240-2. For detailed descriptions of Processor 210-2 and Memory 230-2, please refer to the above text; they will not be repeated here.

[0084] In some embodiments, the apparatus provided in this application can be implemented in software. Figure 2B A prop recommendation device 234 stored in memory 230-2 is shown. This device can be software in the form of programs and plugins, and includes the following software modules: a receiving module 2341, a second acquisition module 2342, a second prediction module 2343, and a second determination model 2344. These modules are logically connected and can therefore be arbitrarily combined or further separated according to their implemented functions. The functions of each module will be described below.

[0085] In other embodiments, the apparatus provided in this application can be implemented in hardware. As an example, the apparatus provided in this application can be a processor in the form of a hardware decoding processor, which is programmed to execute the model training method or prop recommendation method provided in this application. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0086] The model training method provided in this application will be described below with reference to exemplary applications and implementations of the server provided in the embodiments of this application.

[0087] It should be noted that the model training method provided in this application embodiment is applied to the training of prediction models in virtual scenes. The model training examples below are illustrated using prediction models in game scenes. Based on the understanding of the following text, those skilled in the art can apply the model training method provided in this application embodiment to the training of other types of models in other scenes.

[0088] See Figure 3A , Figure 3A This is a flowchart illustrating the model training method provided in the embodiments of this application, which will be combined with... Figure 3A The steps shown are explained.

[0089] In step 101, the prediction model to be trained, the first recommended prop identifier, and the training data corresponding to each sample object are obtained.

[0090] Here, the prediction model to be trained is based on offline log data from the data warehouse and is written using the TensorFlow deep learning framework. The first item to be recommended refers to the identification information of the items to be recommended to the sample objects. This identification information can be the item's identifier (ID), used to uniquely identify and distinguish different items. Here, "item" is a broad concept, referring to items in the game with specific functions or uses. Items can also include various special effects or skins in the game, which can trigger specific effects or obtain specific skins. The sample objects are game players, and the training data includes training samples and sample labels. The training samples include players' historical behavior data and player attribute data in the game. This can be achieved by using all the player's in-game actions and attribute data as training samples, and extracting player data, item data, item conversion context data, and historical identifier sequences of player browsing / purchasing items, etc., from the training samples. Player data includes, but is not limited to: player gender, age group, level, historical cumulative spending, in-game currency reserves, and gameplay preferences; item data includes, but is not limited to: item category, item price, and number of days the item has been available; item conversion context data includes, but is not limited to: whether the item was purchased during a promotional event, and the type of login device (mobile phone or computer); historical identifier sequences of player browsing / purchasing items include, but are not limited to: the item ID sequence purchased by the player within a certain historical period. Training samples can be used to analyze players' preferences for items corresponding to the first recommended item identifier. Sample labels are used to characterize the player's actual purchase of the item corresponding to the first recommended item identifier within the next preset time period after the training samples are collected. For example, if a player purchases the item corresponding to the first recommended item identifier within the next preset time period after the training samples are collected, the sample label is determined to be 1; if a player does not purchase the item corresponding to the first recommended item identifier within the next preset time period after the training samples are collected, the sample label is determined to be 0.

[0091] In step 102, for each sample object, the intention prop identifier sequence is obtained from the training samples of the sample object through the prediction model to be trained.

[0092] Here, the training model is used to extract features from the training samples to obtain the intended item identifier sequence of the sample object. The intended item identifier sequence is used to represent the sequence of IDs of all items purchased or viewed by the sample object within a historical period, such as the ID sequence of items purchased or viewed by the sample object in the past four weeks, the ID sequence of items purchased or viewed by the sample object in the past month, etc.

[0093] In step 103, based on the intention prop identifier sequence and the target vector of the first recommended prop identifier, the tendency representation vector sequence of the sample object is determined.

[0094] Here, based on the correlation between each intention item identifier in the intention item identifier sequence and the first recommended item identifier, the interests and preferences of the sample objects are deeply mined to reduce the impact of the sample objects' erroneous operations and determine the sample objects' tendency representation vector sequence. The tendency representation vector sequence can reflect the sample objects' interests and preferences for the first recommended item.

[0095] In some embodiments, see Figure 3B Step 103 can be implemented through steps 1031 to 1033, including:

[0096] In step 1031, based on the intention item identifier sequence, the identifier vector sequence corresponding to the intention item identifier sequence is determined.

[0097] Here, the prediction model to be trained needs to perform feature mapping on each intention item identifier in the intention item identifier sequence to obtain the identifier vector sequence corresponding to the intention item identifier sequence. For example, each intention item identifier can be projected into a low-dimensional space through a linear transformation to obtain the identifier vector sequence, or a deep learning model, such as a neural network, can be used to map the intention item identifiers into a high-dimensional space to obtain the identifier vector sequence. The identifier vector sequence includes the identifier vectors of all items purchased or viewed by the sample object within a historical period, and these identifier vectors are ordered in chronological order.

[0098] In some embodiments, see Figure 3C Step 1031 can be implemented through steps 10311 to 10313, including:

[0099] In step 10311, the first time information corresponding to each intention prop identifier in the intention prop identifier sequence is determined.

[0100] Here, since the intended item identifier is the identifier of the item that the sample object browses or purchases, each intended item identifier has a time information of being browsed or purchased, i.e., the first time information. This first time information can be determined by the timestamp of each intended item identifier.

[0101] In step 10312, each intended item identifier is sorted based on each first time information to obtain sorted intended item identifiers.

[0102] Here, based on the first-time information, each intended item icon is sorted in chronological order, with the first-time information of the earlier intended item icon preceding the first-time information of the later intended item icon.

[0103] In step 10313, feature mapping is performed on each intention prop identifier in the sorted intention prop identifiers to obtain an identifier vector sequence.

[0104] Here, feature mapping is performed on each of the sorted intended item identifiers to obtain an identifier vector sequence. Therefore, the identifier vector sequence includes the identifier vectors of all items purchased or viewed by the sample object within a historical period, and these identifier vectors are sorted in chronological order.

[0105] In this embodiment, the first time information corresponding to each intention item identifier in the intention item identifier sequence is determined; based on each first time information, each intention item identifier is sorted to obtain sorted intention item identifiers; feature mapping is performed on each intention item identifier in the sorted intention item identifier sequence to obtain an identifier vector sequence. This ensures that the identifier vector sequence includes the identifier vectors of all items purchased or viewed by the sample object within a historical period, and that these identifier vectors are sorted in chronological order, facilitating further analysis of the sample object's historical purchasing or browsing behavior and improving the accuracy of analyzing the sample object's interests and preferences.

[0106] In step 1032, based on the identifier vector sequence and the multi-head self-attention mechanism, the hidden representation vector sequence corresponding to the intention prop identifier sequence is determined.

[0107] Here, the multi-head self-attention mechanism can effectively capture long-distance dependencies within the identifier vector sequence, thereby uncovering various hidden player purchasing interests in the items viewed or purchased. The hidden representation vector sequence includes the output vector corresponding to each item identifier vector and each attention head in the multi-head self-attention layer.

[0108] In some embodiments, the identifier vector sequence includes an item identifier vector corresponding to each intended item identifier, see [link]. Figure 3D Step 1032 can be implemented through steps 10321 to 10324, including:

[0109] In step 10321, attention calculation processing is performed on the identifier vector sequence based on the multi-head self-attention layer to obtain multiple first output vectors corresponding to each prop identifier vector.

[0110] Here, for each item identifier vector, each attention head in the multi-head self-attention layer outputs a first output vector corresponding to that item identifier vector. For example, if the multi-head self-attention layer includes H attention heads, then each item identifier vector has H first output vectors.

[0111] In some embodiments, see Figure 3E Step 10321 can be implemented through steps 3211 to 3214, including:

[0112] In step 3211, for each attention head, the dimension information, query weight matrix, key weight matrix and value weight matrix corresponding to the attention head are determined.

[0113] Here, the attention layer includes multiple attention heads, each with corresponding dimensional information, a query weight matrix, a key weight matrix, and a value weight matrix. The dimensional information is determined by dividing the vector dimension of the input sequence by the number of attention heads, and is an integer, such as 8. The query weight matrix maps each element of the input sequence to the query space of each attention head, the key weight matrix maps each element of the input sequence to the key space of each attention head, and the value weight matrix maps each element of the input sequence to the value space of each attention head.

[0114] In step 3212, the product of the identifier vector sequence and the query weight matrix is ​​determined as the query vector corresponding to the identifier vector sequence; the product of the identifier vector sequence and the key weight matrix is ​​determined as the key vector corresponding to the identifier vector sequence; and the product of the identifier vector sequence and the value weight matrix is ​​determined as the value vector corresponding to the identifier vector sequence.

[0115] Here, by multiplying the identifier vector sequence and the query weight matrix, the query vector corresponding to the identifier vector sequence can be determined; by multiplying the identifier vector sequence and the key weight matrix, the key vector corresponding to the identifier vector sequence can be determined; and by multiplying the identifier vector sequence and the value weight matrix, the value vector corresponding to the identifier vector sequence can be determined.

[0116] In step 3213, the output vector of the attention head is determined based on the query vector, key vector, value vector, and dimension information.

[0117] Here, the logic of the multi-head self-attention layer performing attention calculation on the identifier vector sequence is shown in formula (1):

[0118]

[0119] Among them, head h This represents the output of the h-th attention head in the multi-head self-attention layer, where xb is the sequence of identifier vectors. To query the weight matrix, The key weight matrix is... Let d be the value weight matrix. h The dimensional information of the head.

[0120] In step 3214, the output vector of each attention head is determined as the attention calculation result of the identifier vector sequence.

[0121] Here, the output vector of each attention head in the multi-head self-attention layer is determined as the attention calculation result of the identifier vector sequence. Therefore, the attention calculation result includes multiple first output vectors corresponding to each item identifier vector.

[0122] In this embodiment, for each attention head, the corresponding dimension information, query weight matrix, key weight matrix, and value weight matrix are determined. The product of the identifier vector sequence and the query weight matrix is ​​determined as the query vector corresponding to the identifier vector sequence. The product of the identifier vector sequence and the key weight matrix is ​​determined as the key vector corresponding to the identifier vector sequence. The product of the identifier vector sequence and the value weight matrix is ​​determined as the value vector corresponding to the identifier vector sequence. Based on the query vector, key vector, value vector, and dimension information, the output vector of the attention head is determined. The output vector of each attention head is determined as the attention calculation result of the identifier vector sequence, and the attention calculation result includes multiple first output vectors corresponding to each item identifier vector. In this way, attention calculation can be performed on the item identifier vector of the sample object at each time step, fully exploring the hidden representation of the items browsed or purchased by the sample object at each time step, thereby improving the accuracy of the analysis of the sample object's interest preferences.

[0123] In step 10322, for each item identifier vector, the multiple first output vectors corresponding to the item identifier vector are concatenated to obtain the concatenated output vector.

[0124] Here, for each item identifier vector, all the first output vectors corresponding to this item identifier vector are concatenated in chronological order to obtain the concatenated output vector.

[0125] In step 10323, the concatenated output vector is weighted based on a preset weight matrix to obtain the hidden representation vector corresponding to the prop identifier vector.

[0126] Here, the preset weight matrix is ​​initially set to an initial value and is continuously updated during the training of the prediction model until the model converges. The calculation logic for weighting the concatenated output vector based on the preset weight matrix is ​​shown in formula (2):

[0127] Z = MultiHead(x) b)=Concat(head1,head2,…,head HR W O (2);

[0128] Among them, W O Given a preset weight matrix, x b This is an identifier vector sequence. head1, head2, ..., head HR This represents multiple first output vectors corresponding to the item identifier vector. `Concat` is a concatenation function used to combine the multiple first output vectors `head1`, `head2`, ..., `head3` corresponding to the item identifier vector. HR The vector is then concatenated to obtain the concatenated output vector.

[0129] In step 10324, the hidden representation vector corresponding to each item identifier vector is constructed into a hidden representation vector sequence corresponding to the intended item identifier sequence.

[0130] Here, all the hidden representation vectors corresponding to the item identifier vectors are concatenated together in chronological order to construct a new sequence, namely the hidden representation vector sequence corresponding to the intention item identifier sequence.

[0131] In this embodiment, the identifier vector sequence includes an item identifier vector corresponding to each intended item identifier. Attention calculation is performed on the identifier vector sequence based on a multi-head self-attention layer to obtain multiple first output vectors corresponding to each item identifier vector. For each item identifier vector, the multiple first output vectors are concatenated to obtain a concatenated output vector. The concatenated output vector is then weighted based on a preset weight matrix to obtain a hidden representation vector corresponding to each item identifier vector. The hidden representation vectors corresponding to each item identifier vector are then used to construct a hidden representation vector sequence corresponding to the intended item identifier sequence. This approach fully explores the correlation between intended items purchased or viewed by the sample object at different times, thereby improving the accuracy of analyzing the sample object's interests and preferences.

[0132] In step 1033, the tendency representation vector sequence is determined based on the hidden representation vector sequence, the target vector, and the multi-head self-attention mechanism.

[0133] Here, the hidden representation vector sequence is processed again by multi-head self-attention mechanism, and the first correlation value between the output of each attention head in the multi-head self-attention layer and the target vector is calculated. Then, multiple tendency representation vectors are determined based on the output of each attention head and the corresponding first correlation value.

[0134] In this embodiment, based on the intended item identifier sequence, a corresponding identifier vector sequence is determined; based on the identifier vector sequence and a multi-head self-attention mechanism, a corresponding hidden representation vector sequence is determined; and based on the hidden representation vector sequence, the target vector, and the multi-head self-attention mechanism, a preference representation vector sequence is determined. Thus, by first determining the hidden representation vector sequence corresponding to the intended item identifier sequence through a multi-head self-attention mechanism, and then determining the preference representation vector sequence again through the same mechanism, a deeper understanding of the sample object's interests and preferences can be achieved. This reduces the impact of erroneous operations by the sample object and more accurately reflects the sample object's interest and preference for the first recommended item.

[0135] In some embodiments, see Figure 3F Step 1033 can be implemented through steps 10331 to 10334, including:

[0136] In step 10331, attention calculation is performed on the hidden vector sequence based on the multi-head self-attention layer to obtain multiple second output vectors corresponding to each hidden representation vector.

[0137] Here, in the multi-head self-attention layer, each attention head outputs a second output vector for each hidden representation vector. Therefore, each hidden representation vector corresponds to multiple second output vectors. For example, if the multi-head self-attention layer includes H attention heads, then each hidden representation vector has H second output vectors. The logic of the multi-head self-attention layer performing attention calculation on the hidden vector sequence is shown in formula (5):

[0138]

[0139] Among them, head h Z represents the output of the h-th attention head in the multi-head self-attention layer, and Z represents the hidden vector sequence. To query the weight matrix, The key weight matrix is... Let d be the value weight matrix. model The dimensional information of the head.

[0140] In step 10332, a first correlation value between each second output vector and the target vector is determined.

[0141] Here, the first correlation value between each second output vector and the target vector can be calculated using formula (6):

[0142]

[0143] Among them, e target Let head′ be the target vector for identifying the item to be recommended. hThis is the second output vector.

[0144] In step 10333, multiple tendency representation vectors are determined based on the first correlation value corresponding to each second output vector and the second output vector.

[0145] Here, the second output vector and the first correlation value corresponding to the second output vector of each attention head are weighted and calculated to obtain the tendency representation vector corresponding to each attention head. Then, pooling is performed on the tendency representation vector corresponding to each attention head to obtain multiple tendency representation vectors. The pooling process includes max pooling and average pooling. Max pooling reduces the dimensionality of the data by selecting the maximum value in each local region, while average pooling calculates the average value of each local region.

[0146] In some embodiments, see Figure 3G Step 10333 can be achieved through steps 3331 and 3332, including:

[0147] In step 3331, for each attention head in the multi-head self-attention layer, the product of the second output vector output by the attention head for each hidden representation vector and the first correlation value corresponding to the second output vector is determined as the tendency representation vector corresponding to the attention head.

[0148] Here, for each attention head in the multi-head self-attention layer, the second output vector output by the attention head for each hidden representation vector is multiplied by the first correlation value corresponding to the second output vector to obtain the tendency representation vector corresponding to this attention head, as shown in formula (7):

[0149]

[0150] Among them, w j Indicates the first relevant value, head′ jh The interest head h represents the second output vector output for each hidden representation vector. h This represents the tendency vector corresponding to the attention head h.

[0151] In step 3332, the tendency representation vector corresponding to each attention point is pooled to obtain multiple tendency representation vectors.

[0152] Here, the tendency representation vector corresponding to each attention head is pooled to obtain multiple tendency representation vectors. For example, for each tendency representation vector corresponding to an attention head, max pooling is used to retain the most significant value, or average pooling is used to calculate the average value of each tendency representation vector corresponding to an attention head, thus obtaining multiple tendency representation vectors.

[0153] In this embodiment, for each attention head in the multi-head self-attention layer, the product of the second output vector output by the attention head for each hidden representation vector and the first correlation value corresponding to the second output vector is determined as the tendency representation vector corresponding to the attention head. Pooling is then performed on the tendency representation vector corresponding to each attention head to obtain multiple tendency representation vectors. In this way, the multi-head self-attention layer can fully explore the tendency preferences of the sample objects, and the pooling process can reduce the spatial size of the multiple tendency representation vectors while retaining important features and improving the robustness of the tendency representation vectors.

[0154] In step 10334, multiple tendency representation vectors are constructed into a tendency representation vector sequence.

[0155] Here, all the tendency representation vectors are combined together to construct a new sequence, namely the tendency representation vector sequence.

[0156] In this embodiment, attention calculation is performed on the hidden representation vector sequence based on a multi-head self-attention layer to obtain multiple second output vectors corresponding to each hidden representation vector. Each attention head in the multi-head self-attention layer outputs a second output vector for each hidden representation vector. A first correlation value between each second output vector and the target vector is determined. Based on the first correlation value corresponding to each second output vector, multiple preference representation vectors are determined. These multiple preference representation vectors are then constructed into a preference representation vector sequence. In this way, the multi-head self-attention layer can further explore the correlation between multiple hidden representation vectors in the hidden vector sequence, thereby further improving the accuracy of analyzing the interest preferences of sample objects.

[0157] See also Figure 3A In step 104, prediction processing is performed based on the training samples, the tendency representation vector sequence, and the target vector to obtain the conversion probability of the sample object for the first recommended prop identifier.

[0158] Here, the training model, the tendency representation vector sequence, and the target vector are used to predict the training samples, resulting in a conversion probability. This conversion probability characterizes the probability that a sample object will purchase the first recommended item in the next time step, and is a value between 0 and 1. A higher value indicates a higher probability that the sample object will purchase the first recommended item in the next time step.

[0159] In some embodiments, see Figure 3H Step 104 can be implemented through steps 1041 to 1043, including:

[0160] In step 1041, target data of a preset type is obtained from the training samples, and features are extracted from the training samples to obtain discrete feature vectors.

[0161] Here, the preset type refers to the numerical type. For example, the target data may include: game level, historical cumulative payment, game currency reserves, item prices, item availability days, etc. By extracting features from the training samples, discrete feature data of the sample objects are extracted, and then feature mapping is performed on the discrete feature data to obtain discrete feature vectors.

[0162] In some embodiments, see Figure 3I The step 1041, "extracting features from the training samples to obtain discrete feature vectors," can be achieved through steps 10411 to 10413, including:

[0163] In step 10411, the object data, prop data, and prop transformation context data of the sample objects are extracted from the training samples.

[0164] Here, object data is used to describe the player characteristics of the sample objects, including but not limited to: the sample objects' gender, age stratification, level, historical cumulative spending, game currency reserves, gameplay preferences, etc.; item characteristics are used to describe the characteristics of game items, including but not limited to: item category, item price, item availability days, etc.; item conversion context data includes various information related to the player's decision to purchase items in the game environment, including but not limited to: whether the item was purchased during a promotional event, the type of login terminal device (mobile phone or computer), etc.

[0165] In step 10412, feature mapping is performed on the object data, item data, and item conversion context data respectively to obtain the object feature vector, item feature vector, and item conversion context feature vector.

[0166] Here, object feature vectors are obtained by feature mapping of object data, item feature vectors are obtained by feature mapping of item data, and item transformation context feature vectors are obtained by feature mapping of item transformation context data.

[0167] In step 10413, the object feature vector, the prop feature vector, and the prop transformation context feature vector are determined as discrete feature vectors.

[0168] Here, the object feature vector, item feature vector, and item transformation context feature vector are defined as discrete feature vectors. That is to say, the discrete feature vectors include the object feature vector, item feature vector, and item transformation context feature vector.

[0169] In this embodiment, object data, item data, and item transformation context data of the sample objects are extracted from the training samples. Feature mapping is then performed on the object data, item data, and item transformation context data to obtain object feature vectors, item feature vectors, and item transformation context feature vectors, respectively. These feature vectors are then defined as discrete feature vectors. This approach, by using object feature vectors, item feature vectors, and item transformation context feature vectors, the discrete feature vectors of the sample objects can be more comprehensively enriched, improving the data accuracy and coverage of the discrete feature vectors.

[0170] In step 1042, the target feature data, discrete feature vector, tendency representation vector sequence and target vector are concatenated to obtain a concatenated vector.

[0171] Here, the target feature data, discrete feature vectors, tendency representation vector sequence, and target vector are concatenated row by row. For example, if the target feature data is 10-dimensional, the discrete feature vector is 10-dimensional, the tendency representation vector sequence is 15-dimensional, and the target vector is 15-dimensional, then after concatenation by row, the concatenated vector will be 50-dimensional.

[0172] In step 1043, based on the fully connected network layer in the prediction model to be trained, the concatenated vector is subjected to prediction processing to obtain the conversion probability of the sample object for the first recommended prop identifier.

[0173] Here, the concatenated vector is input into the fully connected network layer of the prediction model to be trained. The fully connected network layer performs prediction processing on the concatenated vector, thereby outputting the conversion probability of the sample object for the first recommended prop identifier.

[0174] In this embodiment, target data of a preset type is obtained from the training samples, and features are extracted from the training samples to obtain discrete feature vectors. The target feature data, discrete feature vectors, a sequence of tendency representation vectors, and the target vector are concatenated to obtain a concatenated vector. Based on the fully connected network layer in the prediction model to be trained, the concatenated vector is used for prediction processing to obtain the conversion probability of the sample object for the first recommended item identifier. Thus, by concatenating the target feature data, discrete feature vectors, a sequence of tendency representation vectors, and the target vector, and using the concatenated vector as input data for the fully connected network layer for prediction processing, the richness and comprehensiveness of the input data can be improved, thereby enhancing the generalization ability of the model's prediction and ensuring the accuracy of determining the conversion probability of the sample object for the first recommended item identifier.

[0175] See also Figure 3AIn step 105, the prediction model to be trained is trained based on the conversion probability of each sample object, the sample label corresponding to the sample object, and the intention prop identifier sequence, to obtain the trained prediction model.

[0176] Here, the first loss value of the prediction model to be trained is determined by the conversion probability of each sample object and the sample label corresponding to the sample object. The second loss value of the prediction model to be trained is determined based on the multiple hidden representation vectors and label vector sequences corresponding to the intention prop identifier sequence of each sample object. Then, the target loss value of the prediction model to be trained is determined based on the first and second loss values. Based on the target loss value, the parameters of the prediction model to be trained are adjusted using a gradient descent algorithm until the training termination condition is met, resulting in the trained prediction model. The training termination condition can be that the target loss value is lower than a loss threshold, or that the difference between the current target loss value and the previous adjacent target loss value is less than a preset difference.

[0177] In this embodiment, a prediction model to be trained, a first recommended item identifier, and training data corresponding to each sample object are obtained. The training data includes training samples and sample labels. Then, for each sample object, the intention item identifier sequence is obtained from the training samples of the sample object using the prediction model to be trained. Based on the intention item identifier sequence and the target vector of the first recommended item identifier, the tendency representation vector sequence of the sample object is determined. In this way, the tendency representation vector sequence of the sample object can fully explore the correlation between the intention item identifier sequence and the first recommended item identifier, thereby improving the accuracy of the interest preference analysis of the sample object. Subsequently, prediction processing is performed based on the training samples, the tendency representation vector sequence, and the target vector to obtain the conversion probability of the sample object for the first recommended item identifier. Based on the conversion probability of each sample object, the sample label corresponding to the sample object, and the intention item identifier sequence, the prediction model to be trained is trained to obtain the trained prediction model. In this way, by simultaneously performing prediction processing on training samples, tendency representation vector sequences, and target vectors, the accuracy of the obtained conversion probabilities can be improved. By training the model using the conversion probabilities of each sample object, sample labels, and intention prop identifier sequences, the training efficiency of the model can be improved, as well as the generalization ability and prediction accuracy of the trained prediction model. This, in turn, improves the efficiency and accuracy of prop recommendation using the trained prediction model.

[0178] In some embodiments, see Figure 3J Step 105 can be implemented through steps 1051 to 1053, including:

[0179] In step 1051, the first loss value of the prediction model to be trained is determined based on the conversion probability of each sample object and the sample label corresponding to the sample object.

[0180] Here, the difference between the conversion probability of each sample object and the sample label corresponding to the sample object is determined by the loss function, and the first loss value of the prediction model to be trained is obtained.

[0181] In step 1052, the hidden representation vector sequence and the identifier vector sequence corresponding to the intention prop identifier sequence of each sample object are determined.

[0182] Here, we can determine the first-time information corresponding to each intention item identifier in the intention item identifier sequence; based on each first-time information, we sort each intention item identifier to obtain sorted intention item identifiers; we perform feature mapping on each intention item identifier in the sorted intention item identifier sequence to obtain an identifier vector sequence. We then perform attention calculation processing on the identifier vector sequence based on a multi-head self-attention layer to obtain multiple first output vectors corresponding to each item identifier vector; for each item identifier vector, we concatenate the multiple first output vectors corresponding to the item identifier vector to obtain a concatenated output vector; we then perform weighted processing on the concatenated output vector based on a preset weight matrix to obtain the hidden representation vector corresponding to the item identifier vector; and we construct the hidden representation vector sequence corresponding to the intention item identifier sequence of the sample object using the hidden representation vectors corresponding to each item identifier vector.

[0183] In step 1053, a second loss value for the prediction model to be trained is determined based on the hidden representation vector sequence and the identifier vector sequence for each sample object.

[0184] Here, the second loss value of the prediction model to be trained can be determined by the hidden representation vector of the props that the sample object browses or purchases at the current time, the identifier vector of the props that the sample object actually browses or purchases at the next time, and the negative sample identifier vector that the sample object does not actually browse or purchase at the next time.

[0185] In some embodiments, the hidden representation vector sequence includes T hidden representation vectors, and the identification vector sequence includes T item identification vectors, where T is an integer greater than 2. See also Figure 3K Step 1053 can be implemented through steps 10531 to 10534, including:

[0186] In step 10531, for each sample object, the negative sample identifier vector corresponding to the i-th hidden representation vector in the hidden representation vector sequence of the sample object is determined.

[0187] Here, i is an integer between 2 and T-1. The negative sample identification vector refers to the identification vector of the item that the sample object did not browse or purchase at the next moment corresponding to the i-th hidden representation vector.

[0188] In step 10532, the i-th second correlation value between the i-th hidden representation vector and the (i+1)-th item identification vector in the identification vector sequence, and the i-th third correlation value between the i-th hidden representation vector and the negative sample identification vector are determined, and the i-th comprehensive correlation value is determined based on the i-th second correlation value and the i-th third correlation value.

[0189] Here, the (i+1)-th item identification vector in the identification vector sequence can characterize the identification vector of the item that the sample object actually browsed or purchased at the next moment corresponding to the i-th hidden representation vector, that is, the positive sample identification vector. The second correlation value can characterize the correlation between the i-th hidden representation vector and the positive sample identification vector, and the third correlation value can characterize the correlation between the i-th hidden representation vector and the negative sample identification vector.

[0190] In step 10533, the sum of T-1 comprehensive correlation values is determined as the target correlation value of the sample object.

[0191] Here, the sum obtained by adding the T-1 comprehensive correlation values is taken as the target correlation value of the sample object.

[0192] In step 10534, the average value of the target correlation values corresponding to each sample object is determined as the second loss value of the prediction model to be trained.

[0193] Here, after the target correlation value corresponding to each sample object is determined, the average value of the target correlation values corresponding to all sample objects is calculated and determined as the second loss value of the prediction model to be trained.

[0194] For example, the second loss value of the prediction model to be trained may be determined by formula (3):

[0195]

[0196] Wherein, L aux represents the second loss value of the prediction model to be trained, represents the t-th second correlation value, represents the t-th third correlation value, represents the t-th comprehensive correlation value, and N represents the number of sample objects.

[0197] In this embodiment, the hidden representation vector sequence includes T hidden representation vectors, and the identifier vector sequence includes T prop identifier vectors. For each sample object, the negative sample identifier vector corresponding to the i-th hidden representation vector in the hidden representation vector sequence of the sample object is determined, where i is an integer between 2 and T-1. The i-th second correlation value between the i-th hidden representation vector and the (i+1)-th prop identifier vector in the identifier vector sequence, and the i-th third correlation value between the i-th hidden representation vector and the negative sample identifier vector are determined. Based on the i-th second correlation value and the i-th third correlation value, the i-th comprehensive correlation value is determined. The sum of the T-1 comprehensive correlation values ​​is determined as the target correlation value of the sample object. The average value of the target correlation value corresponding to each sample object is determined as the second loss value of the prediction model to be trained. In this way, by using the i-th hidden representation vector of the props that the sample object browses or purchases at time i, the i+1-th prop identifier vector that the sample object actually browses or purchases at the next time, and the negative sample identifier vector that the sample object does not actually browse or purchase at the next time, the second loss value of the prediction model to be trained can be determined together, which can improve the efficiency and accuracy of training the model.

[0198] In step 1054, based on the first loss value and the second loss value, the target loss value of the prediction model to be trained is determined, and the prediction model to be trained is trained based on the target loss value to obtain the trained prediction model.

[0199] Here, the first and second loss values ​​can be calculated using hyperparameters to determine the target loss value of the prediction model to be trained. Based on the target loss value, the parameters of the prediction model to be trained are adjusted using the gradient descent algorithm until the training termination condition is met, thus obtaining the trained prediction model. The training termination condition can be that the target loss value is lower than a loss threshold, or that the difference between the current target loss value and the previous adjacent target loss value is less than a preset difference. The target loss value of the prediction model to be trained can be determined by calculating the first and second loss values ​​using formula (9).

[0200] L = L target +α*L aux (9)

[0201] In formula (9), α is a hyperparameter, L target L is the first loss value. aux L is the second loss value, and L is the target loss value.

[0202] In this embodiment, a first loss value for the prediction model to be trained is determined based on the conversion probability of each sample object and the sample label corresponding to the sample object; multiple hidden representation vectors and label vector sequences corresponding to the intention item identifier sequence of each sample object are determined; a second loss value for the prediction model to be trained is determined based on the hidden representation vector sequence and label vector sequence of each sample object; a target loss value for the prediction model to be trained is determined based on the first loss value and the second loss value, and the prediction model to be trained is trained based on the target loss value to obtain the trained prediction model. Thus, by simultaneously training the prediction model to be trained using the first loss value and the second loss value, the training efficiency and accuracy of the model can be improved, thereby improving the efficiency and accuracy of item recommendation using the trained prediction model.

[0203] The following will describe the item recommendation method provided in this application embodiment, with reference to the exemplary application and implementation of the server provided in the embodiments of this application.

[0204] It should be noted that the item recommendation method provided in this application embodiment is applied to item recommendation processing in virtual scenes. The item recommendation examples in the following text are illustrated using virtual game items in game scenes. Based on the understanding of the following text, those skilled in the art can apply the item recommendation method provided in this application embodiment to the recommendation processing of other types of items or information in other scenes.

[0205] See Figure 4A , Figure 4A This is a flowchart illustrating the item recommendation method provided in the embodiments of this application, which will be combined with... Figure 4A The steps shown are explained.

[0206] In step 201, in response to detecting that the target object has entered the login state, a tool recommendation request for the target object is received.

[0207] Here, the target audience is the game player, who can log in to the game via a terminal. Upon logging in, a request for in-game items is generated and sent to the server. When the server detects that the target audience is logged in, it automatically receives the item recommendation request. This request is used to request recommendations of game items to the target audience.

[0208] In step 202, based on the item recommendation request, the target object's data to be predicted and the item recommendation list are obtained.

[0209] Here, the data to be predicted includes the target object's historical behavior data and attribute data in the game. This can be achieved by using all actions and behaviors generated by the target object within the game as historical behavior data. From this data, target object data, item data, item conversion context data, and historical identifier sequences of the target object's browsing or purchasing of items are extracted. The item recommendation list includes all items that can be pushed to the target object.

[0210] In step 203, for each second recommended item in the item recommendation list, the prediction result is obtained by using the trained prediction model based on the prediction data.

[0211] Here, the item recommendation list includes multiple second items to be recommended. These second items are items to be selected and can be sent to the target audience, or not sent to them. For each second item in the item recommendation list, the data to be predicted and the second item are input into a trained prediction model. The trained prediction model then predicts the second item to be recommended, obtaining a prediction result. The prediction result represents the conversion probability of the target audience towards the second item, and the probability of the target audience purchasing the second item after successful login. The value is between 0 and 1, with a higher value indicating a higher probability of the target audience purchasing the second item after successful login. The training data for the trained prediction model is obtained using the model training method provided in other embodiments of this application.

[0212] In step 204, based on the prediction results corresponding to each second recommended item, the target item is determined in the item recommendation list and pushed to the terminal corresponding to the target object.

[0213] Here, the target item refers to the item that needs to be pushed to the target object. In the prediction results corresponding to each second recommended item, the second recommended items corresponding to the top prediction results are selected as the target items, and then the target items are pushed to the terminal corresponding to the target object.

[0214] In this embodiment, in response to detecting that a target object has entered a logged-in state, an item recommendation request for the target object is received. Based on the item recommendation request, the target object's prediction data and item recommendation list are obtained. For each second item to be recommended in the item recommendation list, based on the prediction data, the second item to be recommended is predicted using a trained prediction model to obtain a prediction result. The prediction result is used to characterize the conversion probability of the target object for the second item to be recommended. The training data of the trained prediction model is obtained using the model training method provided in other embodiments of this application. Based on the prediction result corresponding to each second item to be recommended, the target item is determined in the item recommendation list and pushed to the terminal corresponding to the target object. In this way, using a trained prediction model for item recommendation can improve the efficiency and accuracy of item recommendation. For players, it is more convenient and faster to purchase their favorite game items, saving time costs and thus improving the player's gaming experience.

[0215] In some embodiments, see Figure 4B Step 204, "Based on the prediction results corresponding to each second recommended item, determine the target item in the item recommendation list," can be achieved through steps 2041 to 2043, including:

[0216] In step 2041, the prediction results corresponding to each second recommended item are sorted in descending order to obtain the sorted prediction results.

[0217] Here, the prediction results for each second recommended item are sorted in descending order, so the earlier the prediction result appears in the sorted results, the larger its value.

[0218] In step 2042, each prediction result whose sorting position is before the preset position in the sorted prediction results is determined as the target result.

[0219] Here, the preset position can be set according to actual needs. For example, if you plan to recommend 5 items to the target, the preset position can be set to 6. The 5 prediction results before the 6th position will be determined as the target results.

[0220] In step 2043, the second recommended item corresponding to each target result is determined as the target item.

[0221] Here, the second recommended item corresponding to each identified target result is designated as the target item, which is then recommended to the target audience.

[0222] In this embodiment, the prediction results corresponding to each second recommended item are sorted in descending order to obtain sorted prediction results. Each prediction result whose sorted position is before a preset position is determined as a target result. The second recommended item corresponding to each target result is determined as the target item. This accurately identifies the item most likely to be purchased by the target object as the target item, thereby improving the efficiency and accuracy of target item selection.

[0223] The following will describe an exemplary application of the embodiments of this application in a game scene.

[0224] This application provides a game item recommendation scheme based on the DMIN deep multiple interest network algorithm. This application is applicable to item sales in various similar games. The following description uses any game application scenario as an example.

[0225] First, each time a game player (corresponding to the target object in other embodiments) logs into the client, they send a personalized item recommendation request to the server (corresponding to the item recommendation request in other embodiments). After receiving the request, the server's recommendation service reads the player's pre-calculated item recommendation list (corresponding to the target items in other embodiments) from the remote dictionary server (Redis) and returns it to the client. After receiving the server's return result, the client displays the items to the player.

[0226] like Figure 5 The image shows the game interface after a player logs into the client. The interface includes several game components: Shop (51), Character (52), Items (53), Messages (54), Guilds (55), and More (56). Clicking on different game components triggers different game services. For example, clicking on the Shop (51) component displays various game items for players to purchase. Figure 6 The image shows the game item purchase interface, which includes several target items: Target Item 61, Target Item 62, Target Item 63, Target Item 64, Target Item 65, Target Item 66, Target Item 67, and Target Item 68. Furthermore, players can also recharge their game accounts using the recharge component 69.

[0227] This application embodiment is based on offline log data from a data warehouse and is written using the TensorFlow deep learning framework. Figure 7 This is a schematic diagram of the overall architecture of the prediction model provided in the embodiments of this application, as shown below. Figure 7As shown, the prediction model includes: prop embedding layer 71, player behavior extraction layer 72, player multi-interest modeling layer 73, vector splicing layer 74, fully connected network layer 75, and output layer 76.

[0228] In this embodiment, a database table recording all player actions within the game is used by the game server to extract player characteristics, item characteristics, player purchase context characteristics, and player browsing / purchasing item history sequence characteristics. Player characteristics include at least: gender, age stratification, level, historical cumulative spending, game currency reserves, and gameplay preferences; item characteristics include at least: item category, item price, and item availability days; player purchase context characteristics include at least: whether the purchase occurred during a promotional event, and the login terminal device; player item purchase history sequence characteristics include at least: the item ID sequence purchased by the player in the past four weeks. Feature mapping is performed on the extracted discrete features (gender, age, spending, gameplay preferences, item category, price, popularity, whether the purchase occurred during a promotional event, and login terminal device) to obtain player characteristics d. model 3D Embedding vector x u (Right now Figure 7 Player feature vector 711) and item feature d model 3D Embedding vector x i (Right now Figure 7 The prop feature vector 712 and the context feature d model 3D Embedding vector x c (Right now Figure 7 The prop transformation context feature vector in 713).

[0229] Item Identifier Embedding layer 71 is used to summarize the extracted item ID sequence of the player's browsing / purchasing in the past four weeks in chronological order of purchase time: [i1,i2,i3,…,i T Then, each item ID in the sequence is mapped to a d-dimensional embedding vector, ultimately generating the player browsing / purchasing item embedding sequence (corresponding to the identifier vector sequence in other embodiments): x b =[e1,e2,e3,…,e T ].

[0230] Player behavior extraction layer 72 is used to mine the various purchasing interests of players hidden in the player's browsing / purchasing history of items. First, the item embedding sequence x output by item identifier embedding layer 71 is used. b =[e1,e2,e3,…,e TThe input is fed into the multi-head self-attention module 77, primarily for two purposes: First, many mobile games are content-intensive games with a large action space and numerous items, which may lead to accidental actions by players (such as browsing items in the store that they don't want to buy). The self-attention mechanism can reduce the impact of these accidental actions. Second, players have different focuses on different items (for example, some players focus on the cost-effectiveness of items, some on their aesthetics, and some on their scarcity). The self-attention mechanism can deeply explore player interests. For the item identification embedding layer 71, which generates the player's browsing / purchasing item embedding sequence, the multi-head self-attention module 77 calculates HR outputs (corresponding to multiple first output vectors in other embodiments) for each browsed / purchased item in the sequence: [head1, head2, ..., head...]. HR ], where head h This represents the output of the h-th head in the multi-head self-attention module 77, calculated using formula (1):

[0231]

[0232] Where, x b For the identification vector sequence, To query the weight matrix, The key weight matrix is... Let d be the value weight matrix. h The dimensional information of the head.

[0233] Next, the outputs of HR items for each browsed / purchased item in the sequence are concatenated and then multiplied by the weight matrix W. O (Corresponding to the preset weight matrix in other embodiments), the hidden representation Z of each browsed / purchased item is obtained, and the calculation logic is formula (2):

[0234] Z = MultiHead(x) b )=Concat(head1,head2,…,head HR W O (2);

[0235] Among them, W O Let x represent the preset weight matrix. b For identifying vector sequences.

[0236] Furthermore, the hidden representation of items that players browse / purchase at any given moment is usually displayed. tThis information is usually related to the items actually viewed / purchased in the next moment. t+1 (Corresponding to the (i+1)th item identifier vector in other embodiments) strongly correlated, and based on this assumption, this embodiment introduces an auxiliary loss function. Furthermore, to more accurately calculate the hidden representation Z of items viewed / purchased by the player at each time point, some items not viewed / purchased by the player are also negatively sampled. (Corresponding to the negative sample identifier vector in other embodiments) is used to assist in the training of the auxiliary loss function. The specific calculation logic is as shown in formulas (3) and (4):

[0237]

[0238] here, This provides information on the items the player will actually view / purchase in the next moment. This contains information on items that players will not view or purchase at the next moment, where N is the total number of players.

[0239] Player multi-interest modeling layer 73 is used to extract the hidden representation sequence of player browsing / purchasing items output from player behavior extraction layer 73: Z = [z1, z2, ..., z T The hidden interests and their evolution trends of the player are extracted from the player behavior extraction layer 73. The hidden representation sequence of the player's browsing / purchasing items, output by the player behavior extraction layer 73, is input into the multi-head self-attention module 78. Through the calculation of the multi-head self-attention module 78, the hidden representation z of each item in the hidden representation sequence is calculated. i Each can output HE numbers: [head′1, head′2, ..., head′] HE ], where head′ h This represents the output of the h-th head in the multi-head self-attention module 78, calculated using formula (5):

[0240]

[0241] z is determined using formula (6) i The output of different heads in the middle head′ h The degree of relevance between the target item to be recommended (corresponding to the first item to be recommended in other embodiments), where e target The target item to be recommended, Embedding, indicates:

[0242]

[0243] The correlation w between the output of the h-th head at all times (t from 1 to T) and the target item to be recommended is obtained. j That is, a in formula (6) hThen, the h-th output of each head is weighted and calculated based on its relevance, and the weighted representations of the h-th head at all time points are summed and pooled to obtain the interest. h Let h represent the player's h-th interest representation, calculated using formula (7):

[0244]

[0245] Similarly, each player can obtain HE interest representations (corresponding to the sequence of tendency representation vectors in other embodiments) interest = [interest1, interest2, ..., interest HE ].

[0246] The vector concatenation layer 74 is used to concatenate the extracted numerical features (Dense Feature, corresponding to the target data of the preset type in other embodiments), the embedding of discrete features, the player's multiple interest embeddings obtained based on the player's historical browsing / purchase item sequence, and the embedding of the target item to be recommended, to obtain a concatenated vector, and then input the concatenated vector into the fully connected network layer 75.

[0247] Fully connected network layer 75 is used to perform fully connected processing on the concatenated vector to obtain the processed vector, and then input the processed vector into output layer 76.

[0248] Output layer 76 outputs the prediction result, which represents the probability that the player will purchase the target item (corresponding to the conversion probability of the sample object in other embodiments). Then, the actual purchase result of the player for the target item is obtained, and the model is trained based on the actual purchase result and the prediction result output by output layer 76 until a trained prediction model is obtained. The loss function of the prediction model consists of two parts: the cross-entropy 722L of the fully connected network layer. target (Corresponding to the first loss value in other embodiments) and the auxiliary loss function 721L proposed by the player behavior extraction layer in step 3.2). aux (Corresponding to the second loss value in other embodiments), α is a hyperparameter used to balance L target and L aux The calculation formulas are formula (8) and formula (9):

[0249]

[0250] L = L target +α*L aux (9);

[0251] After obtaining the trained prediction model, the data to be predicted is acquired, and the player's basic features, the contextual features of the player's browsing / purchasing of items, and the player's historical browsing / purchasing of items sequence features are extracted from the data to be predicted. Then, based on the item recommendation list to be recommended, the item identifier vector of the corresponding second item to be recommended is obtained. Next, the player's basic features, the contextual features of the player's browsing / purchasing of items, the historical browsing / purchasing of items sequence features, and the item identifier vector of the second item to be recommended are input into the trained prediction model. The trained prediction model is used to perform item recommendation based on the DMIN deep multiple interest network algorithm. The trained prediction model calculates the probability score of the player's purchase intention for each item in the item list to be recommended. Finally, the items are ranked according to their scores, and the Top N items with the highest purchase intention (corresponding to the target items in other embodiments) are recommended to the player (corresponding to the target objects in other embodiments).

[0252] The embodiments of this application improve upon other game recommendation schemes in the relevant art in terms of the average amount of game currency consumed and the average number of items purchased per player. For example... Figure 8 As shown, the item recommendation scheme provided in this application embodiment, compared with other game recommendation schemes in related technologies, increases the average number of game coins consumed by players by 83 (a relative increase of 24.3%) and the average number of items purchased by players by 2.5 (a relative increase of 43.9%). This application embodiment can more accurately capture players' multiple purchasing interests and preferences, thereby recommending more desirable items to players, increasing their purchasing desire, and ultimately enhancing the game's commercialization.

[0253] Compared to item recommendation algorithms in related technologies, the embodiments of this application can efficiently and accurately calculate multiple different purchasing interests and preferences of players based on their historical game purchase behavior records, thereby improving the accuracy of item recommendations. For players, this means they can purchase their desired game items more conveniently and quickly, saving the time cost of searching and then purchasing items, thus enhancing their gaming experience. For games, more targeted and personalized item recommendations will stimulate players' purchasing desires, thereby increasing the game's commercial value.

[0254] The following description continues to illustrate the exemplary structure of the model training device 233 provided in the embodiments of this application as a software module. In some embodiments, such as... Figure 2A As shown, the software modules stored in the model training device 233 of the memory 230-1 may include:

[0255] The first acquisition module 2331 is used to acquire the prediction model to be trained, the identifier of the first recommended prop, and the training data corresponding to each sample object. The training data includes training samples and sample labels.

[0256] The first acquisition module 2331 is further configured to, for each of the sample objects, acquire an intention prop identifier sequence from the training samples of the sample object through the prediction model to be trained;

[0257] The first determining module 2332 is used to determine the tendency representation vector sequence of the sample object based on the intention prop identifier sequence and the target vector of the first recommended prop identifier;

[0258] The first prediction module 2333 is used to perform prediction processing based on the training samples, the tendency representation vector sequence and the target vector to obtain the conversion probability of the sample object for the first recommended prop identifier;

[0259] The training module 2334 is used to train the prediction model to be trained based on the conversion probability of each sample object, the sample label corresponding to the sample object and the intention prop identifier sequence, so as to obtain the trained prediction model.

[0260] In some embodiments, the first determining module 2332 is further configured to: determine an identifier vector sequence corresponding to the intention item identifier sequence based on the intention item identifier sequence; determine a hidden representation vector sequence corresponding to the intention item identifier sequence based on the identifier vector sequence and the multi-head self-attention mechanism; and determine a tendency representation vector sequence based on the hidden representation vector sequence, the target vector, and the multi-head self-attention mechanism.

[0261] In some embodiments, the first determining module 2332 is further configured to determine the first time information corresponding to each intention item identifier in the intention item identifier sequence; sort each intention item identifier based on each first time information to obtain sorted intention item identifiers; and perform feature mapping on each intention item identifier in the sorted intention item identifiers to obtain the identifier vector sequence.

[0262] In some embodiments, the first determining module 2332 is further configured to perform attention calculation processing on the identifier vector sequence based on a multi-head self-attention layer to obtain multiple first output vectors corresponding to each item identifier vector; for each item identifier vector, concatenate the multiple first output vectors corresponding to the item identifier vector to obtain a concatenated output vector; perform weighted processing on the concatenated output vector based on a preset weight matrix to obtain a hidden representation vector corresponding to the item identifier vector; and construct a hidden representation vector sequence corresponding to the intention item identifier sequence from the hidden representation vectors corresponding to each item identifier vector.

[0263] In some embodiments, the first determining module 2332 is further configured to, for each attention head, determine the dimension information, query weight matrix, key weight matrix, and value weight matrix corresponding to the attention head; determine the query vector corresponding to the identifier vector sequence by multiplying the identifier vector sequence and the query weight matrix; determine the key vector corresponding to the identifier vector sequence by multiplying the identifier vector sequence and the key weight matrix; determine the value vector corresponding to the identifier vector sequence by multiplying the identifier vector sequence and the value weight matrix; determine the output vector of the attention head based on the query vector, the key vector, the value vector, and the dimension information; and determine the output vector of each attention head as the attention calculation result of the identifier vector sequence, wherein the attention calculation result includes multiple first output vectors corresponding to each item identifier vector.

[0264] In some embodiments, the first determining module 2332 is further configured to perform attention calculation processing on the hidden vector sequence based on the multi-head self-attention layer to obtain a plurality of second output vectors corresponding to each hidden representation vector, wherein each attention head in the multi-head self-attention layer outputs a second output vector for each hidden representation vector; determine a first correlation value between each second output vector and the target vector; determine a plurality of tendency representation vectors based on each second output vector and the first correlation value corresponding to the second output vector; and construct the plurality of tendency representation vectors into the tendency representation vector sequence.

[0265] In some embodiments, the first determining module 2332 is further configured to, for each attention head in the multi-head self-attention layer, multiply the second output vector output by the attention head for each hidden representation vector by the first correlation value corresponding to the second output vector, and determine the tendency representation vector corresponding to the attention head; and perform pooling processing on the tendency representation vector corresponding to each attention head to obtain the plurality of tendency representation vectors.

[0266] In some embodiments, the first prediction module 2333 is further configured to obtain target data of a preset type from the training samples, and perform feature extraction on the training samples to obtain discrete feature vectors; concatenate the target feature data, the discrete feature vectors, the tendency representation vector sequence and the target vector to obtain a concatenated vector; and perform prediction processing on the concatenated vector based on the fully connected network layer in the prediction model to be trained to obtain the conversion probability of the sample object for the first recommended prop identifier.

[0267] In some embodiments, the first prediction module 2333 is further configured to extract object data, item data, and item conversion context data of the sample object from the training samples; perform feature mapping on the object data, item data, and item conversion context data respectively to obtain object feature vector, item feature vector, and item conversion context feature vector; and determine the object feature vector, item feature vector, and item conversion context feature vector as discrete feature vectors.

[0268] In some embodiments, the training module 2334 is further configured to: determine a first loss value of the prediction model to be trained based on the conversion probability of each sample object and the sample label corresponding to the sample object; determine multiple hidden representation vectors and label vector sequences corresponding to the intention prop identifier sequence of each sample object; determine a second loss value of the prediction model to be trained based on the hidden representation vector sequence and label vector sequence of each sample object; determine a target loss value of the prediction model to be trained based on the first loss value and the second loss value; and train the prediction model to be trained based on the target loss value to obtain the trained prediction model.

[0269] In some embodiments, the training module 2334 is further configured to, for each sample object, determine the negative sample identifier vector corresponding to the i-th hidden representation vector in the hidden representation vector sequence of the sample object, where i is an integer between 2 and T-1; determine the i-th second correlation value between the i-th hidden representation vector and the (i+1)-th prop identifier vector in the identifier vector sequence, and the i-th third correlation value between the i-th hidden representation vector and the negative sample identifier vector, and determine the i-th comprehensive correlation value based on the i-th second correlation value and the i-th third correlation value; determine the sum of T-1 comprehensive correlation values ​​as the target correlation value of the sample object; and determine the average value of the target correlation values ​​corresponding to each sample object as the second loss value of the prediction model to be trained.

[0270] The following description continues to illustrate the exemplary structure of the prop recommendation device 234 provided in the embodiments of this application as a software module. In some embodiments, such as Figure 2B As shown, the software module stored in the prop recommendation device 234 in the memory 230-2 may include:

[0271] Receiving module 2341 is used to receive an item recommendation request for the target object in response to detecting that the target object has entered the login state;

[0272] The second acquisition module 2342 is used to acquire the data to be predicted and the list of recommended items for the target object based on the item recommendation request.

[0273] The second prediction module 2343 is used to predict each second item to be recommended in the item recommendation list based on the prediction data and through a trained prediction model to obtain a prediction result. The prediction result is used to characterize the conversion probability of the target object to the second item to be recommended. The training data of the trained prediction model is obtained using the model training method according to any one of claims 1 to 11.

[0274] The second determining module 2344 is used to determine the target item in the item recommendation list based on the prediction result corresponding to each of the second recommended items, and push the target item to the terminal corresponding to the target object.

[0275] In some embodiments, the second determining module 2344 is further configured to sort the prediction results corresponding to each of the second recommended props in descending order to obtain sorted prediction results; determine each prediction result whose sorting position is before a preset position in the sorted prediction results as a target result; and determine the second recommended prop corresponding to each target result as the target prop.

[0276] This application provides a computer program product, which includes a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of an electronic device reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device to perform the model training method or prop recommendation method described in this application.

[0277] This application provides a computer-readable storage medium storing computer-executable instructions or a computer program. When the computer-executable instructions or the computer program are executed by a processor, the processor will execute the model training method or prop recommendation method provided in this application embodiment, for example... Figure 3A The model training method shown, or, as Figure 4A The recommended methods for using the items shown.

[0278] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0279] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.

[0280] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored in a portion of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0281] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.

[0282] In summary, through the embodiments of this application, a prediction model to be trained, a first recommended item identifier, and training data corresponding to each sample object are obtained. The training data includes training samples and sample labels. Then, for each sample object, the intention item identifier sequence is obtained from the training samples of the sample object using the prediction model to be trained. Based on the intention item identifier sequence and the target vector of the first recommended item identifier, the tendency representation vector sequence of the sample object is determined. In this way, the tendency representation vector sequence of the sample object can fully explore the correlation between the intention item identifier sequence and the first recommended item identifier, thereby improving the accuracy of the analysis of the interest preferences of the sample object. Subsequently, prediction processing is performed based on the training samples, the tendency representation vector sequence, and the target vector to obtain the conversion probability of the sample object for the first recommended item identifier. Based on the conversion probability of each sample object, the sample label corresponding to the sample object, and the intention item identifier sequence, the prediction model to be trained is trained to obtain the trained prediction model. In this way, by simultaneously performing prediction processing on training samples, tendency representation vector sequences, and target vectors, the accuracy of the obtained conversion probabilities can be improved. By training the model using the conversion probabilities of each sample object, sample labels, and intention prop identifier sequences, the training efficiency of the model can be improved, as well as the generalization ability and prediction accuracy of the trained prediction model. This, in turn, improves the efficiency and accuracy of prop recommendation using the trained prediction model.

[0283] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.

Claims

1. A model training method, characterized in that, The method includes: Obtain the prediction model to be trained, the identifier of the first recommended prop, and the training data corresponding to each sample object. The training data includes training samples and sample labels. For each of the aforementioned sample objects, the intention prop identifier sequence is obtained from the training samples of the sample object using the prediction model to be trained; Based on the intended prop identifier sequence and the target vector of the first recommended prop identifier, determine the tendency representation vector sequence of the sample object; Based on the training samples, the tendency representation vector sequence, and the target vector, a prediction process is performed to obtain the conversion probability of the sample object for the first recommended item identifier; Based on the conversion probability of each sample object, the sample label corresponding to the sample object, and the intention prop identifier sequence, the prediction model to be trained is trained to obtain the trained prediction model.

2. The method according to claim 1, characterized in that, The step of determining the tendency representation vector sequence of the sample object based on the intention prop identifier sequence and the target vector of the first recommended prop identifier includes: Based on the intended item identifier sequence, determine the identifier vector sequence corresponding to the intended item identifier sequence; Based on the aforementioned identifier vector sequence and the multi-head self-attention mechanism, the hidden representation vector sequence corresponding to the intention prop identifier sequence is determined; The tendency representation vector sequence is determined based on the hidden representation vector sequence, the target vector, and the multi-head self-attention mechanism.

3. The method according to claim 2, characterized in that, The step of determining the identifier vector sequence corresponding to the intended item identifier sequence based on the intended item identifier sequence includes: Determine the first-time information corresponding to each intention prop identifier in the intention prop identifier sequence; Based on each of the first time information, each of the intended prop icons is sorted to obtain sorted intended prop icons; Each of the sorted intention item identifiers is subjected to feature mapping to obtain the identifier vector sequence.

4. The method according to claim 2, characterized in that, The identifier vector sequence includes an item identifier vector corresponding to each intended item identifier. The step of determining the hidden representation vector sequence corresponding to the intention prop identifier sequence based on the identifier vector sequence and the multi-head self-attention mechanism includes: Based on the multi-head self-attention layer, attention calculation processing is performed on the identification vector sequence to obtain multiple first output vectors corresponding to each item identification vector; For each item identifier vector, the multiple first output vectors corresponding to the item identifier vector are concatenated to obtain the concatenated output vector; The concatenated output vector is weighted based on a preset weight matrix to obtain the hidden representation vector corresponding to the prop identifier vector. The hidden representation vector corresponding to each of the aforementioned prop identifier vectors is used to construct a hidden representation vector sequence corresponding to the intended prop identifier sequence.

5. The method according to claim 4, characterized in that, The attention calculation processing of the identifier vector sequence based on the multi-head self-attention layer yields multiple first output vectors corresponding to each item identifier vector, including: For each attention head, determine the corresponding dimension information, query weight matrix, key weight matrix, and value weight matrix; The product of the identifier vector sequence and the query weight matrix is ​​used to determine the query vector corresponding to the identifier vector sequence; the product of the identifier vector sequence and the key weight matrix is ​​used to determine the key vector corresponding to the identifier vector sequence; and the product of the identifier vector sequence and the value weight matrix is ​​used to determine the value vector corresponding to the identifier vector sequence. Based on the query vector, the key vector, the value vector, and the dimension information, the output vector of the attention head is determined; The output vector of each attention head is determined as the attention calculation result of the identifier vector sequence, and the attention calculation result includes multiple first output vectors corresponding to each prop identifier vector.

6. The method according to claim 2, characterized in that, The step of determining the tendency representation vector sequence based on the hidden representation vector sequence, the target vector, and the multi-head self-attention mechanism includes: Based on the multi-head self-attention layer, attention calculation processing is performed on the hidden vector sequence to obtain multiple second output vectors corresponding to each hidden representation vector. Each attention head in the multi-head self-attention layer outputs a second output vector for each hidden representation vector. Determine a first correlation value between each of the second output vectors and the target vector; Based on each second output vector and the first correlation value corresponding to the second output vector, multiple tendency representation vectors are determined; The plurality of tendency representation vectors are constructed into a tendency representation vector sequence.

7. The method according to claim 6, characterized in that, The determination of multiple tendency representation vectors based on each second output vector and the corresponding first correlation value of the second output vector includes: For each attention head in the multi-head self-attention layer, the product of the second output vector output by the attention head for each hidden representation vector and the first correlation value corresponding to the second output vector is determined as the tendency representation vector corresponding to the attention head. Pooling is performed on the tendency representation vector corresponding to each attention head to obtain the plurality of tendency representation vectors.

8. The method according to claim 1, characterized in that, The prediction process based on the training samples, the tendency representation vector sequence, and the target vector to obtain the conversion probability of the sample object for the first recommended item identifier includes: Target data of a preset type is obtained from the training samples, and features are extracted from the training samples to obtain discrete feature vectors; The target feature data, the discrete feature vector, the tendency representation vector sequence, and the target vector are concatenated to obtain a concatenated vector. Based on the fully connected network layer in the prediction model to be trained, the concatenated vector is subjected to prediction processing to obtain the conversion probability of the sample object for the first recommended item identifier.

9. The method according to claim 8, characterized in that, The step of extracting features from the training samples to obtain discrete feature vectors includes: Extract the object data, item data, and item transformation context data of the sample object from the training samples; Feature mapping is performed on the object data, the item data, and the item transformation context data respectively to obtain the object feature vector, the item feature vector, and the item transformation context feature vector. The object feature vector, the prop feature vector, and the prop transformation context feature vector are determined as discrete feature vectors.

10. The method according to claim 1, characterized in that, The step of training the prediction model to be trained based on the conversion probability of each sample object, the sample label corresponding to the sample object, and the intention prop identifier sequence to obtain the trained prediction model includes: Based on the conversion probability of each sample object and the sample label corresponding to the sample object, the first loss value of the prediction model to be trained is determined; Determine multiple hidden representation vectors and identifier vector sequences corresponding to the intention prop identifier sequence for each of the sample objects; Based on the hidden representation vector sequence and the identifier vector sequence of each sample object, a second loss value is determined for the prediction model to be trained. Based on the first loss value and the second loss value, a target loss value is determined for the prediction model to be trained, and the prediction model to be trained is trained based on the target loss value to obtain the trained prediction model.

11. The method according to claim 10, characterized in that, The hidden representation vector sequence includes T hidden representation vectors, and the label vector sequence includes T prop label vectors, where T is an integer greater than 2. Determining the second loss value of the prediction model to be trained based on the hidden representation vector sequence and label vector sequence for each sample object includes: For each of the sample objects, determine the negative sample identifier vector corresponding to the i-th hidden representation vector in the hidden representation vector sequence of the sample object, where i is an integer between 2 and T-1; Determine the i-th second correlation value between the i-th hidden representation vector and the (i+1)-th prop identifier vector in the identifier vector sequence, and the i-th third correlation value between the i-th hidden representation vector and the negative sample identifier vector; and determine the i-th comprehensive correlation value based on the i-th second correlation value and the i-th third correlation value. The sum of T-1 comprehensive correlation values ​​and T-1 third correlation values ​​is determined as the target correlation value of the sample object; The average value of the target relevance value corresponding to each sample object is determined as the second loss value of the prediction model to be trained.

12. A method for recommending props, characterized in that, The method includes: In response to detecting that a target object has entered a logged-in state, a tool recommendation request is received for the target object; Based on the item recommendation request, obtain the target object's data to be predicted and the item recommendation list; For each second recommended item in the item recommendation list, based on the data to be predicted, the second recommended item is predicted by the trained prediction model to obtain a prediction result. The prediction result is used to characterize the conversion probability of the target object to the second recommended item. The training data of the trained prediction model is obtained using the model training method described in any one of claims 1 to 11. Based on the prediction results for each of the second recommended items, a target item is determined from the item recommendation list, and the target item is pushed to the terminal corresponding to the target object.

13. The method according to claim 12, characterized in that, The step of determining the target item from the item recommendation list based on the prediction result corresponding to each of the second recommended items includes: Sort the prediction results corresponding to each of the second recommended props in descending order to obtain the sorted prediction results; In the sorted prediction results, each prediction result whose sorting position is before the preset position is determined as the target result; The second recommended item corresponding to each of the aforementioned target results is determined as the target item.

14. A model training device, characterized in that, The device includes: The first acquisition module is used to acquire the prediction model to be trained, the identifier of the first recommended prop, and the training data corresponding to each sample object. The training data includes training samples and sample labels. The first acquisition module is further configured to, for each of the sample objects, acquire an intention prop identifier sequence from the training samples of the sample object through the prediction model to be trained; The first determining module is used to determine the tendency representation vector sequence of the sample object based on the intention prop identifier sequence and the target vector of the first recommended prop identifier; The first prediction module is used to perform prediction processing based on the training samples, the tendency representation vector sequence and the target vector to obtain the conversion probability of the sample object for the first recommended prop identifier; The training module is used to train the prediction model to be trained based on the conversion probability of each sample object, the sample label corresponding to the sample object, and the intention prop identifier sequence, so as to obtain the trained prediction model.

15. A prop recommendation device, characterized in that, The device includes: The receiving module is used to receive an item recommendation request for the target object in response to the detection that the target object has entered the login state; The second acquisition module is used to acquire the data to be predicted and the list of recommended items for the target object based on the item recommendation request. The second prediction module is used to predict each second item to be recommended in the item recommendation list based on the data to be predicted and through a trained prediction model to obtain a prediction result. The prediction result is used to characterize the conversion probability of the target object to the second item to be recommended. The training data of the trained prediction model is obtained using the model training method according to any one of claims 1 to 11. The second determining module is used to determine the target item in the item recommendation list based on the prediction result corresponding to each of the second recommended items, and push the target item to the terminal corresponding to the target object.

16. An electronic device, characterized in that, The electronic device includes: Memory is used to store executable instructions or computer programs. The processor, when executing computer-executable instructions or computer programs stored in the memory, implements the model training method according to any one of claims 1 to 11, or the prop recommendation method according to any one of claims 12 or 13.

17. A computer-readable storage medium storing computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, they implement the model training method according to any one of claims 1 to 11, or the prop recommendation method according to any one of claims 12 or 13.

18. A computer program product comprising computer-executable instructions or a computer program, characterized in that, When the computer-executable instructions or computer program are executed by a processor, they implement the model training method according to any one of claims 1 to 11, or the prop recommendation method according to any one of claims 12 or 13.