Model training method and device, electronic equipment and storage medium
By obtaining sample features and conducting supervised training user payment behavior estimate model, the problem of inaccurate payment amounts on the advertising platform is solved, and accurate prediction and compliance of advertisers' ROI is achieved.
Patent Information
- Application Number
- CN202510446157.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-08-05
AI Technical Summary
The accuracy of the advertising platform's estimated payment amount is insufficient, which affects the advertiser's ROI compliance.
By obtaining sample user characteristics, advertising characteristics and context characteristics, inputting the user payment behavior estimate model, calculating the predicted payment probability and conducting supervised training, the pre-trained user payment behavior estimate model is used to accurately estimate the payment amount.
Improve the estimated accuracy of paid amounts and ensure that advertisers' ROI meet standards.
Smart Images

Figure CN120430829A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and in particular to a model training method, device, electronic device and storage medium. Background Art
[0002] In performance-based advertising, advertisers strive for ROI (Return on Investment). To meet these demands, advertising platforms have launched products that guarantee advertiser ROI, namely the Day 1 ROI conversion model. With this model, advertisers specify their target ROI on the platform, and the platform automatically optimizes their advertising performance to ensure that their revenue / advertising investment exceeds their target ROI.
[0003] The Day 1 ROI conversion method works as follows: When a user request arrives, the advertising platform estimates the payment amount (i.e., the advertiser's advertising revenue) that the user will generate after the advertiser's ad is exposed. If the advertiser's ad is ultimately exposed, the advertising platform charges the advertiser based on the estimated payment amount and the target ROI, thus completing the ad exposure and billing process. Throughout this process, the accuracy of the advertising platform's estimated payment amount directly affects the advertiser's ROI achievement, necessitating a method for accurately estimating payment amounts. Summary of the Invention
[0004] In order to solve the technical problem of the accuracy of the payment amount estimated by the advertising platform in the entire process described above, which directly affects the advertiser's ROI, a method for accurately estimating the payment amount is urgently needed. This application provides a model training method, device, electronic device and storage medium. The specific technical solution is as follows:
[0005] In a first aspect, the present application provides a model training method, the method comprising:
[0006] Obtaining sample user features, sample advertisement features, and sample context features, wherein the sample user features are user features of the sample users when the sample advertisement is exposed to the sample users;
[0007] Inputting the sample user features, sample advertisement features, and sample context features into a user payment behavior prediction model to obtain a predicted first payment probability and a predicted second payment probability of the sample user for the sample advertisement;
[0008] Determining a first probability loss between the predicted first payment probability and the sample payment probability corresponding to the sample user feature;
[0009] Obtaining a sample payment amount corresponding to the sample user feature, and determining a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature based on the sample payment amount;
[0010] Based on the first probability loss and the second probability loss, a user payment behavior estimation model is supervised trained to obtain a pre-trained user payment behavior estimation model. The pre-trained user payment behavior estimation model is used to estimate the payment amount.
[0011] In an optional embodiment, the user payment behavior prediction model includes an Embedding layer, a first payment behavior prediction layer, and a second payment behavior prediction layer;
[0012] Inputting the sample user features, sample advertisement features, and sample context features into a user payment behavior prediction model to obtain a predicted first payment probability and a predicted second payment probability of the sample user for the sample advertisement includes:
[0013] Input the sample user features, sample advertising features, and sample context features into the Embedding layer to obtain the corresponding predicted Embedding vector;
[0014] Inputting the predicted Embedding vector into the first payment behavior prediction layer to obtain the predicted first payment probability of the sample user for the sample advertisement;
[0015] Inputting the predicted Embedding vector into the second payment behavior prediction layer to obtain the predicted second payment probability of the sample user for the sample advertisement;
[0016] The method of performing supervised training on a user payment behavior prediction model based on the first probability loss and the second probability loss to obtain a pre-trained user payment behavior prediction model includes:
[0017] Training the Embedding layer, the first payment behavior prediction layer, and the second payment behavior prediction layer according to the first probability loss and the second probability loss;
[0018] When the number of training times reaches a preset threshold, the training is stopped to obtain the pre-trained Embedding layer, the pre-trained first payment behavior prediction layer, and the pre-trained second payment behavior prediction layer;
[0019] The pre-trained user payment behavior prediction model is composed of a pre-trained Embedding layer, a pre-trained first payment behavior prediction layer, and a pre-trained second payment behavior prediction layer.
[0020] In an optional embodiment, determining, based on the sample payment amount, a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature includes:
[0021] determining an initial probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature;
[0022] Taking the sample payment amount as a sample weight, determining the product between the sample weight and the initial probability loss;
[0023] The product is determined as a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature.
[0024] In an optional embodiment, the method further comprises:
[0025] Obtaining user features of the target user, advertising features of the candidate advertisements, and context features;
[0026] Processing the user features, the advertisement features, and the context features using a pre-trained user payment behavior prediction model to obtain a payment probability of the target user for the candidate advertisement and a first pre-probability score;
[0027] An estimate of the payment amount of the target user when the candidate advertisement is exposed to the target user is made based on the payment probability and the first predicted probability score.
[0028] In an optional embodiment, the pre-trained user payment behavior prediction model includes a pre-trained Embedding layer, a pre-trained first payment behavior prediction layer, and a pre-trained second payment behavior prediction layer;
[0029] The method of processing the user features, the advertisement features, and the context features using the pre-trained user payment behavior prediction model to obtain the payment probability of the target user for the candidate advertisement and a first pre-probability score includes:
[0030] Input the user features, the advertisement features, and the context features into a pre-trained Embedding layer to obtain corresponding Embedding vectors;
[0031] Inputting the embedding vector into the pre-trained first payment behavior prediction layer to obtain the payment probability of the target user on the candidate advertisement;
[0032] The embedding vector is input into the pre-trained second payment behavior prediction layer, and the first pre-probability score of the target user on the candidate advertisement output by the pre-trained second multi-layer perceptron in the pre-trained second payment behavior prediction layer is obtained.
[0033] In an optional embodiment, the pre-trained first payment behavior prediction layer includes a pre-trained first deep cross network, a pre-trained first multi-layer perceptron, and a pre-trained first activation function;
[0034] Inputting the embedding vector into the pre-trained first payment behavior prediction layer to obtain the payment probability of the target user for the candidate advertisement includes:
[0035] Input the embedding vector into a pre-trained first deep cross network to obtain a first feature vector;
[0036] Inputting the first feature vector into a pre-trained first multilayer perceptron to obtain a second pre-probability score;
[0037] The second pre-probability score is activated using a pre-trained first activation function to obtain the payment probability of the target user for the candidate advertisement.
[0038] In an optional embodiment, the pre-trained second payment behavior prediction layer includes a pre-trained second deep cross network, a pre-trained second multi-layer perceptron, and a pre-trained second activation function;
[0039] Inputting the embedding vector into a pre-trained second payment behavior prediction layer, and obtaining a first pre-probability score of the target user on the candidate advertisement output by a pre-trained second multi-layer perceptron in the pre-trained second payment behavior prediction layer, includes:
[0040] Input the embedding vector into a pre-trained second deep cross network to obtain a second feature vector;
[0041] The second feature vector is input into a pre-trained second multi-layer perceptron, and a first pre-probability score of the target user on the candidate advertisement output by the pre-trained second multi-layer perceptron is obtained.
[0042] In an optional embodiment, estimating the payment amount of the target user when the candidate advertisement is exposed to the target user based on the payment probability and the first predicted probability score includes:
[0043] Inputting the payment probability and the first pre-probability score into the following formula to obtain the payment amount of the target user when the candidate advertisement is exposed to the target user;
[0044]
[0045] The mp is the payment amount of the target user, the p is the payment probability, and the θ T x is the first pre-probability score.
[0046] In a second aspect, the present application provides a model training device, comprising:
[0047] A feature acquisition module is used to acquire sample user features, sample advertisement features, and sample context features, wherein the sample user features are user features of the sample users when the sample advertisements are exposed to the sample users;
[0048] a probability prediction module, configured to input the sample user features, sample advertisement features, and sample context features into a user payment behavior prediction model to obtain a predicted first payment probability and a predicted second payment probability of the sample user for the sample advertisement;
[0049] A first probability loss determination module, configured to determine a first probability loss between the predicted first payment probability and the sample payment probability corresponding to the sample user feature;
[0050] A second probability loss determination module is configured to obtain a sample payment amount corresponding to the sample user feature, and determine a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature based on the sample payment amount;
[0051] The model training module is used to perform supervised training on the user payment behavior estimation model based on the first probability loss and the second probability loss to obtain a pre-trained user payment behavior estimation model, and the pre-trained user payment behavior estimation model is used to estimate the payment amount.
[0052] In a third aspect, an electronic device is provided, comprising a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0053] Memory for storing computer programs;
[0054] The processor is used to implement any model training method described in the first aspect above when executing the program stored in the memory.
[0055] In a fourth aspect, a storage medium is also provided, in which instructions are stored. When the storage medium is run on a computer, the computer executes any model training method described in the first aspect.
[0056] In a fifth aspect, a computer program product comprising instructions is also provided, which, when run on a computer, enables the computer to execute any of the above-mentioned model training methods.
[0057] The above-mentioned technical solution provided by the embodiment of the present application has the following advantages over the prior art: the method provided by the embodiment of the present application obtains sample user characteristics, sample advertising characteristics and sample context characteristics, the sample user characteristics are the sample advertisements exposed to the sample users, the user characteristics of the sample users, the sample user characteristics, the sample advertising characteristics and the sample context characteristics are input into the user payment behavior prediction model, the predicted first payment probability and the predicted second payment probability of the sample user on the sample advertisement are obtained, the first probability loss between the predicted first payment probability and the sample payment probability corresponding to the sample user characteristics is determined, the sample payment amount corresponding to the sample user characteristics is obtained, and the second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user characteristics is determined based on the sample payment amount, and the user payment behavior prediction model is supervised trained based on the first probability loss and the second probability loss to obtain a pre-trained user payment behavior prediction model, which is used to estimate the payment amount.
[0058] In this way, the payment amount is used to weight the sample user characteristics, participate in the supervised training of the user payment behavior estimation model, and obtain a pre-trained user payment behavior estimation model. The pre-trained user payment behavior estimation model can be used subsequently to accurately estimate the payment amount. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0061] One or more embodiments are exemplarily illustrated by pictures in the corresponding drawings. These exemplifications do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings are represented as similar elements. Unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0062] Figure 1 A schematic diagram of an implementation flow of a model training method provided in an embodiment of the present application;
[0063] Figure 2A schematic diagram of an implementation flow of a payment amount estimation method provided in an embodiment of the present application;
[0064] Figure 3 A schematic diagram of the model structure of a pre-trained user payment behavior prediction model provided in an embodiment of the present application;
[0065] Figure 4 A schematic diagram of an implementation flow of another payment amount estimation method provided in an embodiment of the present application;
[0066] Figure 5 A schematic diagram of the structure of a model training device provided in an embodiment of the present application;
[0067] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0068] To make the purpose, technical solutions, and advantages of the embodiments of this application more clear, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the drawings in the embodiments of this application. Obviously, the described embodiments are part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0069] The disclosure below provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and settings of specific examples are described below. Of course, these are merely examples and are not intended to limit the present application. In addition, the present application may repeat reference numbers and / or letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.
[0070] In the embodiment of the present application, for a binary classification neural network model, a sigmoid function is often used in the last layer of the model to convert the output of the MLP (multi-layer perceptron) to the range of [0, 1], and finally the probability p of the user's payment behavior is obtained, which is the following formula (1):
[0071] p=sigmoid(w1x1+w2x2+…+w n x n +b)=sigmoid(θ T x).
[0072] Among them, the sigmoid function is the following formula (2):
[0073]
[0074] After substituting the above formula (2) into the above formula (1), the following formula (3) can be obtained after conversion:
[0075]
[0076] In the above formula (3), p is the probability of the user paying. Assuming k samples, the number of positive samples is kp, and the number of negative samples is k-kp. Now weight the positive samples (sample user features), assuming the weight is m, and multiply the number of positive samples by m, the number of positive samples becomes mkp, and the number of negative samples remains k-kp. At this time, the probability of a positive sample occurring can be obtained as follows, that is, the following formula (4):
[0077]
[0078] Pnew is the probability of the positive sample occurring after adjustment. The adjusted event also satisfies equations (1) to (3). Substitute p_new in equation (4) into equation (3), replace p, and simplify to obtain the following equation (5):
[0079]
[0080] In formula (5), p is the probability of the original event occurring. The positive samples of the original event are weighted to satisfy formula (5).
[0081] In the advertising scenario, p is considered the probability of a user paying after a shallow conversion, and m is considered the actual amount paid after the payment occurs. MP can then be considered the amount of money paid after a shallow conversion. Transforming Equation (5) yields the following Equation (6).
[0082]
[0083] In formula (6), p is the probability of a positive sample occurring without weighting, θ T When x is the weighted positive sample, the output of the last layer of mlp of the model is estimated, so p and θ are estimated at the same time. T Substitute x into the above formula (6) to estimate the amount of payment.
[0084] Based on the above inventive concept, an embodiment of the present invention provides a model training method, which uses the payment amount to weight the sample user features, participates in the supervised training of the user payment behavior estimation model, and obtains a pre-trained user payment behavior estimation model. Subsequently, the pre-trained user payment behavior estimation model can be used to simultaneously estimate p and θ T Substitute x into the above formula (6) to estimate the amount of payment.
[0085] Based on this, Figure 1 FIG. 1 is a schematic diagram of an implementation flow of a model training method provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:
[0086] S101, obtaining sample user features, sample advertisement features, and sample context features, wherein the sample user features are user features of the sample user when the sample advertisement is exposed to the sample user.
[0087] In the embodiment of the present application, sample user features, sample advertisement features, and sample context features are obtained. Sample user features are user features of the sample user when the sample advertisement is exposed to the sample user. Sample advertisement features refer to advertisement features of the sample advertisement.
[0088] User features usually refer to features such as user ID, user age, user occupation, and user gender. Advertising features usually refer to features such as advertising ID, industry ID, advertising content ID, and advertiser ID. Sample context features usually refer to features such as time, location, and advertising position ID. The embodiments of this application do not limit this.
[0089] Among them, the sample user characteristics are divided into positive samples and negative samples. The sample payment probability corresponding to the sample user characteristics belonging to the positive sample is, for example, 1, and the corresponding sample payment amount is the actual payment amount. The sample payment probability of the sample user characteristics belonging to the negative sample is, for example, 0, and the corresponding sample payment amount is, for example, 0.
[0090] S102: Input the sample user features, sample advertisement features, and sample context features into a user payment behavior prediction model to obtain a predicted first payment probability and a predicted second payment probability of the sample user for the sample advertisement.
[0091] In an embodiment of the present application, the sample user characteristics, sample advertising characteristics and sample context characteristics can be input into a user payment behavior prediction model to obtain the predicted first payment probability and the predicted second payment probability of the sample user for the sample advertisement.
[0092] The user payment behavior prediction model consists of an embedding layer, a first payment behavior prediction layer, and a second payment behavior prediction layer. Sample user features, sample ad features, and sample context features can be input into the embedding layer to obtain the corresponding predicted embedding vector.
[0093] The predicted embedding vector obtained in the above steps can be input into the first payment behavior prediction layer to obtain the predicted first payment probability of the sample user for the sample ad. The predicted embedding vector can be input into the second payment behavior prediction layer to obtain the predicted second payment probability of the sample user for the sample ad. For the internal processing of the first and second payment behavior prediction layers, please refer to the subsequent processing procedures.
[0094] S103: Determine a first probability loss between the predicted first payment probability and the sample payment probability corresponding to the sample user feature.
[0095] In an embodiment of the present application, a first probability loss between a predicted first payment probability and a sample payment probability corresponding to a sample user feature is determined.
[0096] Among them, for the sample user features, the sample payment probability corresponding to the sample user features belonging to the positive sample is, for example, 1, and the sample payment probability corresponding to the sample user features belonging to the negative sample is, for example, 0. Then, for example, the cross entropy loss function can be used to calculate the first probability loss between the predicted first payment probability and the sample payment probability corresponding to the sample user features.
[0097] S104: Obtain a sample payment amount corresponding to the sample user feature, and determine a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature based on the sample payment amount.
[0098] In an embodiment of the present application, a sample payment amount corresponding to the sample user feature is obtained, and based on the sample payment amount, a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature is determined.
[0099] Among them, for the sample user characteristics, the sample payment probability corresponding to the sample user characteristics belonging to the positive sample is, for example, 1, and the corresponding sample payment amount is the actual payment amount; the sample payment probability of the sample user characteristics belonging to the negative sample is, for example, 0, and the corresponding sample payment amount is, for example, 0.
[0100] Then, a weighted cross entropy loss function, for example, can be used to calculate the second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature. To this end, an initial probability loss is determined between the predicted second payment probability and the sample payment probability corresponding to the sample user feature, the sample payment amount is used as a sample weight, and the product between the sample weight and the initial probability loss is determined. The product is then determined as the second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature.
[0101] It should be noted that for the sample user features belonging to positive samples, the corresponding sample payment amount is the actual payment amount, so the actual payment amount is used as the sample weight. For the sample user features belonging to negative samples, there is no need to set the sample weight according to the sample payment amount, and the sample weight can be kept at 1.
[0102] Therefore, the above-mentioned method first detects whether the sample user feature is the sample user feature of a positive sample. If so, the initial probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature is determined, and the sample payment amount is used as the sample weight. The product between the sample weight and the initial probability loss is determined, and the product is determined as the second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature. Otherwise, 1 is used as the sample weight, and the product between the sample weight and the initial probability loss is determined, and the product is determined as the second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature.
[0103] S105 , performing supervised training on a user payment behavior estimation model based on the first probability loss and the second probability loss to obtain a pre-trained user payment behavior estimation model, and the pre-trained user payment behavior estimation model is used to estimate the payment amount.
[0104] In the embodiment of the present application, after the above steps, the first probability loss and the second probability loss can be obtained. According to the first probability loss and the second probability loss, the user payment behavior prediction model is supervised trained to obtain a pre-trained user payment behavior prediction model. The pre-trained user payment behavior prediction model can simultaneously estimate p and θ T Substitute x into the above formula (6) to estimate the amount of payment.
[0105] Wherein, for the user payment behavior prediction model including the Embedding layer, the first payment behavior prediction layer, and the second payment behavior prediction layer, the Embedding layer, the first payment behavior prediction layer, and the second payment behavior prediction layer are trained based on the first probability loss and the second probability loss. When the number of training times reaches a preset threshold, the training is stopped to obtain the pre-trained Embedding layer, the pre-trained first payment behavior prediction layer, and the pre-trained second payment behavior prediction layer. Wherein, the pre-trained user payment behavior prediction model is composed of the pre-trained Embedding layer, the pre-trained first payment behavior prediction layer, and the pre-trained second payment behavior prediction layer.
[0106] Among them, the first probability loss and the second probability loss can be weighted and summed to obtain a weighted sum, and the Embedding layer, the first payment behavior prediction layer and the second payment behavior prediction layer can be trained according to the weighted sum. When the number of training times reaches a preset threshold, the training is stopped to obtain a pre-trained Embedding layer, a pre-trained first payment behavior prediction layer and a pre-trained second payment behavior prediction layer.
[0107] After the above training, we can obtain the pre-trained Embedding layer, the pre-trained first payment behavior prediction layer, and the pre-trained second payment behavior prediction layer. We can use the pre-trained Embedding layer and the pre-trained first payment behavior prediction layer to estimate the payment probability p, and obtain the output θ of mlp in the pre-trained second payment behavior prediction layer. T x, and obtain the first predicted probability score. Through the payment probability and the first predicted probability score, the payment amount of the target user can be accurately estimated.
[0108] After the above steps, a pre-trained user payment behavior estimation model can be obtained. The pre-trained user payment behavior estimation model can be used to simultaneously estimate p and θ T Substitute x into the above formula (6) to estimate the amount of payment.
[0109] Based on this, Figure 2 FIG. 1 is a schematic diagram of an implementation flow of a payment amount estimation method provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:
[0110] S201 , obtaining user features of a target user, advertisement features and context features of candidate advertisements.
[0111] In the embodiment of the present application, the user characteristics of the target user, the advertisement characteristics and the context characteristics of the candidate advertisements are obtained, wherein the candidate advertisement refers to any candidate advertisement in the current advertisement list.
[0112] User features usually refer to features such as user ID, user age, user occupation, and user gender. Advertising features usually refer to features such as advertising ID, industry ID, advertising content ID, and advertiser ID. Contextual features usually refer to features such as time, location, and advertising position ID. The embodiments of this application do not limit this.
[0113] It should be noted that in addition to obtaining the user characteristics of the target user, the advertising characteristics and context characteristics of the candidate advertisements, other characteristics related to advertisement delivery may also be obtained, which is not limited in the embodiments of the present application.
[0114] S202 : Processing user features, advertisement features, and context features using a pre-trained user payment behavior prediction model to obtain a target user's payment probability for the candidate advertisement and a first pre-probability score.
[0115] In the embodiment of the present application, the user features, advertising features, and context features obtained in the above steps can be processed using a pre-trained user payment behavior prediction model to obtain the target user's payment probability for the candidate advertisement and a first pre-probability score. The payment probability here is the probability that the target user will pay, that is, the above p, and the first pre-probability score is the above θ. T x. Here θ refers to the model parameters in the above MLP, and x refers to the input features in the above MLP.
[0116] S203 , estimating the payment amount of the target user when the candidate advertisement is exposed to the target user based on the payment probability and the first pre-probability score.
[0117] In the embodiment of the present application, after the above steps, the payment probability of the target user on the candidate advertisement and the first pre-probability score can be obtained, that is, p and θ can be obtained. T x. Based on the payment probability and the first predicted probability score, it is possible to estimate the payment amount of the target user when the candidate ad is exposed.
[0118] The payment probability and the first pre-probability score may be input into the following formula (ie, the above-mentioned (Formula) 6) to obtain the payment amount of the target user when the candidate advertisement is exposed to the target user.
[0119]
[0120] The mp is the payment amount of the target user, the p is the payment probability, and the θ T x is the first pre-probability score.
[0121] After the above steps, there is a corresponding payment amount for each candidate advertisement. The candidate advertisements can be sorted according to the payment amount, for example, from large to small, and then the candidate advertisement ranked first is selected and exposed to the target user.
[0122] Through the above description of the technical solution provided in the embodiment of the present application, the user characteristics of the target user, the advertising characteristics and context characteristics of the candidate advertisement are obtained, and the user characteristics, advertising characteristics and context characteristics are processed using a pre-trained user payment behavior prediction model to obtain the payment probability of the target user for the candidate advertisement and a first pre-probability score. Based on the payment probability and the first pre-probability score, the payment amount of the target user when the candidate advertisement is exposed to the target user is estimated.
[0123] In this way, the pre-trained user payment behavior prediction model is used to process user characteristics, advertising characteristics of candidate ads, and contextual characteristics to obtain the target user's payment probability for the candidate ad and a first pre-probability score. Based on the payment probability and the first pre-probability score, the target user's payment amount after the candidate ad is exposed can be accurately estimated.
[0124] In addition, in an embodiment of the present application, a model structure of a pre-trained user payment behavior prediction model is provided. The pre-trained user payment behavior prediction model includes a pre-trained Embedding layer, a pre-trained first payment behavior prediction layer, and a pre-trained second payment behavior prediction layer. The pre-trained first payment behavior prediction layer includes a pre-trained first deep cross network, a pre-trained first multi-layer perceptron, and a pre-trained first activation function. The pre-trained second payment behavior prediction layer includes a pre-trained second deep cross network, a pre-trained second multi-layer perceptron, and a pre-trained second activation function. Figure 3 As shown. The model has two tasks. The first task is to estimate the payment probability p, and the second task is to obtain the output of mlp, which is the above θ T x, which is the first pre-probability score.
[0125] Based on this, Figure 4 FIG. 1 is a schematic diagram of an implementation flow of another payment amount estimation method provided in an embodiment of the present application. The method is applied to an electronic device and may specifically include the following steps:
[0126] S401 , obtaining user characteristics of a target user, advertisement characteristics and context characteristics of candidate advertisements.
[0127] In the embodiment of the present application, this step is similar to the above-mentioned step S201, and the embodiment of the present application will not be described in detail here.
[0128] S402: Input user features, advertising features, and context features into the pre-trained Embedding layer to obtain corresponding Embedding vectors.
[0129] In the embodiment of the present application, the user features, advertising features, and context features obtained in the above steps can be input into the pre-trained Embedding layer to obtain the corresponding Embedding vectors. The internal processing of the pre-trained Embedding layer can refer to existing ones, and the embodiment of the present application will not be further described here.
[0130] S403: Input the embedding vector into the pre-trained first payment behavior prediction layer to obtain the payment probability of the target user for the candidate advertisement.
[0131] In an embodiment of the present application, the Embedding vector obtained in the above step can be input into the pre-trained first payment behavior prediction layer to obtain the payment probability p of the target user for the candidate advertisement.
[0132] Among them, such as Figure 3 As shown, the pre-trained first payment behavior prediction layer includes a pre-trained first deep cross network (DCN), a pre-trained first multi-layer perceptron (MLP), and a pre-trained first activation function (e.g., a sigmoid function). The pre-trained first deep cross network (DCN) and the subsequent pre-trained second deep cross network (DCN) refer to model structures that combine the characteristics of a deep neural network (DNN) and a cross network (Cross Network), aiming to simultaneously capture high-order feature interactions and deep semantic information in the data to improve the performance and expressiveness of the model.
[0133] In this way, the embedding vector is input into the pre-trained first deep cross network to obtain a first feature vector, the first feature vector is input into the pre-trained first multi-layer perceptron to obtain a second pre-probability score, and the second pre-probability score is activated using the pre-trained first activation function to obtain the payment probability p of the target user for the candidate advertisement.
[0134] Among them, the structure of the pre-trained first deep cross network (DCN) and the pre-trained first multi-layer perceptron (MLP) can refer to the existing structure and can be replaced with other neural network structures, such as transformer, etc., which is not limited in the embodiment of the present application.
[0135] S404: Input the Embedding vector into the pre-trained second payment behavior prediction layer, and obtain the first pre-probability score of the target user on the candidate advertisement output by the pre-trained second multi-layer perceptron in the pre-trained second payment behavior prediction layer.
[0136] In the embodiment of the present application, the Embedding vector obtained in the above step can be input into the pre-trained second payment behavior prediction layer to obtain the first pre-probability score θ of the target user on the candidate advertisement output by the pre-trained second multi-layer perceptron in the pre-trained second payment behavior prediction layer. T x.
[0137] Among them, such as Figure 3As shown, the pre-trained second payment behavior prediction layer includes a pre-trained second deep cross network, a pre-trained second multi-layer perceptron, and a pre-trained second activation function. When estimating the payment amount, the first pre-probability score θ of the target user on the candidate advertisement output by the pre-trained second multi-layer perceptron is directly obtained. T x.
[0138] In this way, the embedding vector is input into the pre-trained second deep cross network to obtain a second feature vector, and the second feature vector is input into the pre-trained second multi-layer perceptron to obtain the first pre-probability score θ of the target user on the candidate advertisement output by the pre-trained second multi-layer perceptron T x.
[0139] S405 , estimating the payment amount of the target user when the candidate advertisement is exposed to the target user based on the payment probability and the first pre-probability score.
[0140] In the embodiment of the present application, the payment probability p of the target user on the candidate advertisement and the first pre-probability score θ are obtained through the above steps. T x, the payment probability p and the first pre-probability score θ T x is input into the following formula (i.e., the above formula 6) to obtain the payment amount of the target user when the candidate advertisement is exposed.
[0141]
[0142] The mp is the payment amount of the target user, the p is the payment probability, and the θ T x is the first pre-probability score.
[0143] Corresponding to the above method embodiment, the present application embodiment also provides a model training device, such as Figure 5 As shown, the device may include: a feature acquisition module 510, a probability prediction module 520, a first probability loss determination module 530, a second probability loss determination module 540, and a model training module 550.
[0144] A feature acquisition module 510 is configured to acquire sample user features, sample advertisement features, and sample context features. The sample user features are user features of the sample user after the sample advertisement is exposed to the sample user.
[0145] Probability prediction module 520, configured to input the sample user features, sample advertisement features, and sample context features into a user payment behavior prediction model to obtain a predicted first payment probability and a predicted second payment probability of the sample user for the sample advertisement;
[0146] A first probability loss determination module 530 is configured to determine a first probability loss between the predicted first payment probability and the sample payment probability corresponding to the sample user feature;
[0147] A second probability loss determination module 540 is configured to obtain a sample payment amount corresponding to the sample user feature, and determine a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature based on the sample payment amount;
[0148] The model training module 550 is used to perform supervised training on the user payment behavior estimation model based on the first probability loss and the second probability loss to obtain a pre-trained user payment behavior estimation model, and the pre-trained user payment behavior estimation model is used to estimate the payment amount.
[0149] The present application also provides an electronic device, such as Figure 6 As shown, it includes a processor 61, a communication interface 62, a memory 63 and a communication bus 64, wherein the processor 61, the communication interface 62, and the memory 63 communicate with each other through the communication bus 64.
[0150] Memory 63, for storing computer programs;
[0151] The processor 61 is configured to execute the program stored in the memory 63 by performing the following steps:
[0152] Obtain sample user characteristics, sample advertising characteristics and sample context characteristics, wherein the sample user characteristics are the user characteristics of the sample user when the sample advertisement is exposed to the sample user; input the sample user characteristics, sample advertising characteristics and sample context characteristics into a user payment behavior prediction model to obtain a predicted first payment probability and a predicted second payment probability of the sample user for the sample advertisement; determine a first probability loss between the predicted first payment probability and the sample payment probability corresponding to the sample user characteristics; obtain a sample payment amount corresponding to the sample user characteristics, and determine a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user characteristics based on the sample payment amount; perform supervised training on the user payment behavior prediction model based on the first probability loss and the second probability loss to obtain a pre-trained user payment behavior prediction model, and the pre-trained user payment behavior prediction model is used to estimate the payment amount.
[0153] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.
[0154] The communication interface is used for communication between the above electronic device and other devices.
[0155] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.
[0156] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.
[0157] In another embodiment provided in the present application, a storage medium is also provided, which stores instructions. When the storage medium is run on a computer, it enables the computer to execute the model training method described in any of the above embodiments.
[0158] In another embodiment provided in the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the model training method described in any one of the above embodiments.
[0159] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a storage medium or transmitted from one storage medium to another. For example, the computer instructions can be transmitted from a website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0160] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.
[0161] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.
[0162] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the scope of protection of the present application.
Claims
1. A model training method, characterized in that: The method comprises: Obtaining sample user features, sample advertisement features, and sample context features, wherein the sample user features are user features of the sample users when the sample advertisement is exposed to the sample users; Inputting the sample user features, sample advertisement features, and sample context features into a user payment behavior prediction model to obtain a predicted first payment probability and a predicted second payment probability of the sample user for the sample advertisement; Determining a first probability loss between the predicted first payment probability and the sample payment probability corresponding to the sample user feature; Obtaining a sample payment amount corresponding to the sample user feature, and determining a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature based on the sample payment amount; Based on the first probability loss and the second probability loss, a user payment behavior estimation model is supervised trained to obtain a pre-trained user payment behavior estimation model. The pre-trained user payment behavior estimation model is used to estimate the payment amount.
2. The method according to claim 1, characterized in that The user payment behavior prediction model includes an embedding layer, a first payment behavior prediction layer, and a second payment behavior prediction layer; Inputting the sample user features, sample advertisement features, and sample context features into a user payment behavior prediction model to obtain a predicted first payment probability and a predicted second payment probability of the sample user for the sample advertisement includes: Input the sample user features, sample advertising features, and sample context features into the Embedding layer to obtain the corresponding predicted Embedding vector; Inputting the predicted Embedding vector into the first payment behavior prediction layer to obtain the predicted first payment probability of the sample user for the sample advertisement; Inputting the predicted Embedding vector into the second payment behavior prediction layer to obtain the predicted second payment probability of the sample user for the sample advertisement; The method of performing supervised training on a user payment behavior prediction model based on the first probability loss and the second probability loss to obtain a pre-trained user payment behavior prediction model includes: Training the Embedding layer, the first payment behavior prediction layer, and the second payment behavior prediction layer according to the first probability loss and the second probability loss; When the number of training times reaches a preset threshold, the training is stopped to obtain the pre-trained Embedding layer, the pre-trained first payment behavior prediction layer, and the pre-trained second payment behavior prediction layer; The pre-trained user payment behavior prediction model is composed of a pre-trained Embedding layer, a pre-trained first payment behavior prediction layer, and a pre-trained second payment behavior prediction layer.
3. The method according to claim 1, characterized in that The determining, based on the sample payment amount, a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature includes: determining an initial probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature; Taking the sample payment amount as a sample weight, determining the product between the sample weight and the initial probability loss; The product is determined as a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature.
4. The method according to claim 1, wherein The method further comprises: Obtaining user features of the target user, advertising features of the candidate advertisements, and context features; Processing the user features, the advertisement features, and the context features using a pre-trained user payment behavior prediction model to obtain a payment probability of the target user for the candidate advertisement and a first pre-probability score; An estimate of the payment amount of the target user when the candidate advertisement is exposed to the target user is made based on the payment probability and the first predicted probability score.
5. The method according to claim 4, characterized in that The pre-trained user payment behavior prediction model includes a pre-trained embedding layer, a pre-trained first payment behavior prediction layer, and a pre-trained second payment behavior prediction layer; The method of processing the user features, the advertisement features, and the context features using the pre-trained user payment behavior prediction model to obtain the payment probability of the target user for the candidate advertisement and a first pre-probability score includes: Input the user features, the advertisement features, and the context features into a pre-trained Embedding layer to obtain corresponding Embedding vectors; Inputting the embedding vector into the pre-trained first payment behavior prediction layer to obtain the payment probability of the target user on the candidate advertisement; The embedding vector is input into the pre-trained second payment behavior prediction layer, and the first pre-probability score of the target user on the candidate advertisement output by the pre-trained second multi-layer perceptron in the pre-trained second payment behavior prediction layer is obtained.
6. The method according to claim 5, characterized in that The pre-trained first payment behavior prediction layer includes a pre-trained first deep cross network, a pre-trained first multi-layer perceptron, and a pre-trained first activation function; Inputting the embedding vector into the pre-trained first payment behavior prediction layer to obtain the payment probability of the target user for the candidate advertisement includes: Input the embedding vector into a pre-trained first deep cross network to obtain a first feature vector; Inputting the first feature vector into a pre-trained first multilayer perceptron to obtain a second pre-probability score; The second pre-probability score is activated using a pre-trained first activation function to obtain the payment probability of the target user for the candidate advertisement.
7. The method according to claim 5, characterized in that The pre-trained second payment behavior prediction layer includes a pre-trained second deep cross network, a pre-trained second multi-layer perceptron, and a pre-trained second activation function; Inputting the embedding vector into a pre-trained second payment behavior prediction layer, and obtaining a first pre-probability score of the target user on the candidate advertisement output by a pre-trained second multi-layer perceptron in the pre-trained second payment behavior prediction layer, includes: Input the embedding vector into a pre-trained second deep cross network to obtain a second feature vector; The second feature vector is input into a pre-trained second multi-layer perceptron, and a first pre-probability score of the target user on the candidate advertisement output by the pre-trained second multi-layer perceptron is obtained.
8. The method according to claim 4, characterized in that The estimating, based on the payment probability and the first predicted probability score, the payment amount of the target user when the candidate advertisement is exposed to the target user includes: Inputting the payment probability and the first pre-probability score into the following formula to obtain the payment amount of the target user when the candidate advertisement is exposed to the target user; The mp is the payment amount of the target user, the p is the payment probability, and the θ T x is the first pre-probability score.
9. A model training device, characterized in that: The device comprises: A feature acquisition module is used to acquire sample user features, sample advertisement features, and sample context features, wherein the sample user features are user features of the sample users when the sample advertisements are exposed to the sample users; a probability prediction module, configured to input the sample user features, sample advertisement features, and sample context features into a user payment behavior prediction model to obtain a predicted first payment probability and a predicted second payment probability of the sample user for the sample advertisement; A first probability loss determination module, configured to determine a first probability loss between the predicted first payment probability and the sample payment probability corresponding to the sample user feature; A second probability loss determination module is configured to obtain a sample payment amount corresponding to the sample user feature, and determine a second probability loss between the predicted second payment probability and the sample payment probability corresponding to the sample user feature based on the sample payment amount; The model training module is used to perform supervised training on the user payment behavior estimation model based on the first probability loss and the second probability loss to obtain a pre-trained user payment behavior estimation model, and the pre-trained user payment behavior estimation model is used to estimate the payment amount.
10. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 8 when executing a program stored in a memory.
11. A storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 8 is implemented.