Method and device for predicting product purchaser, medium and electronic equipment

By assigning target weight parameters to the prediction model of products with fewer training samples, and using the data distribution of the second product to simulate the distribution of the first product, the problem of overfitting the deep learning model is solved and the prediction accuracy is improved.

CN119444294APending Publication Date: 2025-02-14BEIJING XIAOMI MOBILE SOFTWARE CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310969452.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-02
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

For products with less sales, fewer training samples lead to overfitting of deep learning models, resulting in large differences in the prediction results from the actual results.

Method used

By obtaining the labeling sample of the second product and the labeling sample of the first product, the target weight parameters of each first labeling sample are determined, and used to train the preset prediction model to obtain the target prediction model. This model uses the data distribution of the second product to better simulate the data distribution of the first product and avoids overfitting.

Benefits of technology

It improves the accuracy of predicting purchase probability results, avoids the problem of model overfitting, and enhances the prediction ability of products with fewer training samples.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119444294A_ABST
    Figure CN119444294A_ABST
Patent Text Reader

Abstract

The invention relates to a method and device for predicting a product purchaser, a medium and electronic equipment, and relates to the technical field of computers, and the method comprises the steps: determining a purchase probability corresponding to each piece of user data and aiming at a first product through a target prediction model, and determining a potential purchaser of the first product based on the purchase probability. Wherein the target prediction model corresponding to the potential purchaser of the first product is predicted, the first annotation sample of the second product and the second annotation sample of the first product are utilized, and the appropriate target weight parameter is given to the first annotation sample of the second product, so that the data distribution of the first product can be better simulated by the data distribution of the second product; according to the technical scheme, a large number of training samples are obtained based on the first labeled sample of the second product and the target weight parameter, so that the first labeled sample endowed with the target weight parameter is taken as the training sample, the target prediction model can be prevented from being over-fitted, and the accuracy of the purchase probability prediction result is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a method, device, medium and electronic device for predicting product purchasing population. Background Art

[0002] Digital marketing refers to the process of mobilizing enterprise resources to conduct marketing activities based on digital technology to realize the value of enterprise products and services through digital means. On the Internet, it is a very common marketing method to conduct business marketing to people based on Internet data. Predict the people who may buy products in the crowd, that is, use digital technology to select potential high-value purchasing users, and use them as a crowd package for precise advertising and telephone marketing, so as to achieve the purpose of reducing costs and increasing efficiency.

[0003] In related technologies, deep learning is used to predict the potential purchasing population of a product. However, for products with low sales, the small number of training samples can easily cause the deep learning model to overfit, resulting in a large difference between the predicted results and the actual results. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a method, device, medium and electronic device for predicting the group of people who will purchase a product.

[0005] According to a first aspect of an embodiment of the present disclosure, a method for predicting a group of people who will purchase a product is provided, comprising:

[0006] Get multiple user data;

[0007] Inputting the plurality of user data into a target prediction model respectively, obtaining a purchase probability for the first product corresponding to each of the user data, and determining a potential purchasing group for the first product based on the purchase probability;

[0008] The target prediction model is trained in the following way:

[0009] Obtain a first labeled sample of a second product and a second labeled sample of the first product, wherein the first labeled sample is sample user data labeled with a purchase result for the second product, and the second labeled sample is sample user data labeled with a purchase result for the first product;

[0010] Determine, according to the first annotated sample and the second annotated sample, a target weight parameter for each of the first annotated samples, wherein the target weight parameter is used to characterize the importance of the first annotated sample when training a preset prediction model;

[0011] The preset prediction model is trained according to the first labeled sample and the target weight parameter to obtain the target prediction model.

[0012] Optionally, determining a target weight parameter of each first labeled sample according to the first labeled sample and the second labeled sample includes:

[0013] For each of the first labeled samples, the following process is iteratively performed:

[0014] According to the second labeled sample and the objective function of meta-learning, the value of the model parameter corresponding to the first labeled sample in the objective function is updated using the gradient descent algorithm, and the objective function is solved with the goal of minimizing the loss value of the second labeled sample to obtain the target weight parameter of the first labeled sample.

[0015] Optionally, determining a target weight parameter of each first labeled sample according to the first labeled sample and the second labeled sample includes:

[0016] For each of the first labeled samples, the following process is iteratively performed:

[0017] According to the second labeled sample and the objective function of meta-learning, using the stochastic gradient descent algorithm, at each iteration step, the first labeled sample is randomly divided into multiple groups of sub-labeled samples, and according to the target sub-labeled samples in the multiple groups of sub-labeled samples, the gradient value of the model parameter corresponding to the first labeled sample in the objective function is determined, and the value of the new model parameter is determined according to the gradient value. According to the value of the new model parameter after each iteration step, the objective function is solved until the objective function meets the preset conditions, and the target weight parameter of the first labeled sample is obtained, and the target sub-labeled sample is any group of sub-labeled samples in the multiple groups of sub-labeled samples.

[0018] Optionally, determining a gradient value of a model parameter corresponding to the first labeled sample in the objective function includes:

[0019] For any iteration number, determining a target loss value of the first labeled sample in the iteration number according to the loss value of the first labeled sample in the target iteration number and the weight parameter of the first labeled sample, wherein the target iteration number is the previous iteration number of the iteration number;

[0020] The gradient value is determined according to the target loss value.

[0021] Optionally, determining a gradient value of a model parameter corresponding to the first labeled sample in the objective function includes:

[0022] For any iteration step, determine the target loss value of the first labeled sample in the iteration step according to the loss value of the first labeled sample in the target iteration step and the weighted loss function, wherein the target iteration step is the previous iteration step of the iteration step, and the weight coefficient of the weighted loss function is a non-negative number;

[0023] The gradient value is determined according to the target loss value.

[0024] Optionally, training the preset prediction model according to the first labeled sample and the target weight parameter to obtain the target prediction model includes:

[0025] Weighting the first labeled sample and the target weight parameter corresponding to the first labeled sample to obtain a training sample;

[0026] The training samples are used to train the preset prediction model to update the parameters of the preset prediction model to obtain the target prediction model.

[0027] Optionally, training the preset prediction model according to the first labeled sample and the target weight parameter to obtain the target prediction model includes:

[0028] Weighting the first labeled sample and the target weight parameter corresponding to the first labeled sample to obtain a training sample;

[0029] Using the training samples to train the preset prediction model to update the parameters of the preset prediction model to obtain an intermediate prediction model;

[0030] The parameters of the intermediate prediction model are adjusted using the second labeled sample to obtain the target prediction model.

[0031] According to a second aspect of an embodiment of the present disclosure, there is provided a device for predicting a group of people who purchase a product, comprising:

[0032] A first acquisition module is configured to acquire a plurality of user data;

[0033] The first determination module is configured to input the multiple user data into the target prediction model respectively, obtain the purchase probability for the first product corresponding to each user data, and determine the potential purchasing group of the first product based on the purchase probability.

[0034] Wherein, the device further comprises:

[0035] A second acquisition module is configured to acquire a first labeled sample of a second product and a second labeled sample of the first product, wherein the first labeled sample is sample user data labeled with a purchase result for the second product, and the second labeled sample is sample user data labeled with a purchase result for the first product;

[0036] A second determination module is configured to determine a target weight parameter of each of the first labeled samples according to the first labeled samples and the second labeled samples, wherein the target weight parameter is used to characterize the importance of the first labeled samples when training a preset prediction model;

[0037] The training module is configured to train the preset prediction model according to the first labeled sample and the target weight parameter to obtain the target prediction model.

[0038] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the method for predicting a group of people who purchase a product provided by the first aspect of an embodiment of the present disclosure is implemented.

[0039] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0040] a storage device including a computer program;

[0041] A processing device is used to execute the computer program to implement the method for predicting the product purchasing population provided in the first aspect of the embodiment of the present disclosure.

[0042] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0043] The present disclosure determines the purchase probability of the first product corresponding to each user data through a target prediction model for a first product with fewer training samples, and determines the potential purchasing population of the first product based on the purchase probability. Among them, the target prediction model corresponding to the potential purchasing population of the first product is predicted, and the first labeled sample of the second product and the second labeled sample of the first product are used to assign appropriate target weight parameters to the first labeled sample of the second product, so that the data distribution of the second product can better simulate the data distribution of the first product, and a large number of training samples are obtained based on the first labeled sample of the second product and the target weight parameter. In this way, by using the first labeled sample assigned with the target weight parameter as a training sample, the overfitting of the target prediction model can be avoided, thereby improving the accuracy of the predicted purchase probability result.

[0044] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0046] Figure 1 is an architecture diagram of an xDeepFM model in related art according to an exemplary embodiment.

[0047] Figure 2 The present invention is a structural diagram of a system for predicting a group of people who will purchase a product according to an exemplary embodiment.

[0048] Figure 3 The present invention is a flowchart showing a method for predicting a group of people who will purchase a product according to an exemplary embodiment.

[0049] Figure 4 The present invention is a flowchart of a method for obtaining a target prediction model according to an exemplary embodiment.

[0050] Figure 5 The present invention is a block diagram of a device for predicting a group of people who will purchase a product according to an exemplary embodiment.

[0051] Figure 6 The present invention is a block diagram of a device for predicting a group of people who will purchase a product according to an exemplary embodiment.

[0052] Figure 7 The invention is a block diagram of a device for implementing a method for predicting a group of people who will purchase a product, according to an exemplary embodiment. DETAILED DESCRIPTION

[0053] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0054] The task of predicting the purchasing population can be formalized as a classification problem or a regression problem. It can use traditional models such as LR (Logistic Regression), SVM (Support Vector Machine), Xgboost (Distributed Gradient Boosting Library), FM (Factor Machine), etc., and can also use deep learning models such as DeepFM model, xDeepFM model, etc. The target task of predicting the probability of users purchasing products uses the characteristic data such as the user's age, gender, occupation, and the interactive behavior between the user and the product as model input. Deep learning models represented by the xDeepFM model can be selected as candidate models for predicting the probability of users purchasing products. These candidate models can fully cross the above-mentioned characteristic data, giving the model stronger expression ability, thereby achieving better prediction results.

[0055] See also Figure 1 The architecture diagram of the xDeepFM model in the related technology shown in the figure, xDeepFM consists of an input layer (Input features), an embedding layer (Embedding layer), a Linear sub-model, a CIN (Compressed Interaction Network) sub-model, a Plain DNN (Deep Neural Network) sub-model and an output unit (Output unit). Among them, the data input by the input layer includes features 1 to x, which can include both discrete features and continuous features; the embedding layer makes the discrete features continuous and transforms them into vector representations; the Linear sub-model can be used to introduce artificially designed features; the CIN sub-model can be used to introduce explicit cross-feature combinations; and the Plain DNN sub-model can be used to introduce implicit feature combinations. After the output results of the three sub-models are added together, they are passed through the sigmoid function to output the prediction score.

[0056] As a general model, the xDeepFM model can be applied in single-task scenarios, for example, predicting the purchase probability of users buying a range hood or a newly launched mobile device. When the xDeepFM model is applied to complex scenarios, some customization can be done to meet the personalized needs of complex scenarios.

[0057] It is understandable that the positive samples of the model trained to predict the purchase probability of users in a single-task scenario are users who have purchased within a period of time, and the negative samples are users who have not purchased within a period of time. In the actual model training process, the number of positive samples of different categories varies greatly. For example, a certain model of mobile device that has been on the market for a period of time belongs to the best-selling category, and the number of positive samples is sufficient; while the best-selling category has fewer positive samples in the period of time after it is launched, or non-best-selling products such as range hoods have fewer sales per day, and even if the sampling time is extended, the number of positive samples is also limited. In actual scenarios, the limited sample size makes it easy for deep learning models to overfit, which seriously restricts the prediction effect of deep learning models.

[0058] To address the above problems, the transfer learning method can utilize the labeled data in the data-rich source domain, thereby effectively alleviating the data famine problem in the target domain with less data. First, the model is trained using all the labeled data in the source domain, and then the Fine-tune method is used to fine-tune the model based on a small amount of labeled data in the target domain. However, the above method is prone to negative transfer problems, where negative transfer refers to the knowledge learned in the source domain having a negative effect on the target domain. In order to alleviate the negative transfer problem, a variety of metrics can be used to select a part of the labeled data that is useful to the target domain from the source domain, and then the model is trained. Specifically, a reinforced data selector can be used to improve the prediction effect of the model in the target domain, thereby effectively alleviating the negative transfer problem. However, the instance selection method based on reinforcement learning regards some of the samples selected in the source domain as equally important and assigns equal weights, making it difficult to fit the data distribution in the target domain. In addition, the design and training of reinforcement data selectors consumes a lot of effort. For example, the design of the reinforcement data selector network structure, the selection of state features and reward functions in the reinforcement learning framework, and the careful design of training strategies such as warm up inevitably increase the cost of use, making it difficult to generalize to other task scenarios.

[0059] As described above, the embodiments of the present disclosure provide a method, device, medium, and electronic device for predicting a group of people who will purchase a product, so as to solve the problems existing in the related art.

[0060] See also Figure 2The structural diagram of the system for predicting the population purchasing a product is shown, wherein the system for predicting the population purchasing a product includes a feature engineering module, a model training module and a model prediction module, user data is input into the feature engineering module, the feature engineering module processes the user data into a feature vector and inputs the feature vector into the model training module for training, and a trained model prediction module for predicting the purchase probability of a product is obtained, the feature vector processed by the feature engineering module is input into the trained model prediction module, and the purchase probability prediction result of the user can be obtained, and the purchase probability is sorted from high to low, and the information of the users corresponding to the purchase probability before the preset order is output as a population package to the operator and seller of the product.

[0061] Specifically, the feature engineering module is used to digitize the original input user data. The original input data includes enumerated data such as user age, gender, occupation, etc., as well as user interaction behaviors such as clicks, browsing, adding to cart, favorites, and purchases on the mall, user purchase records, coupon usage, and other statistical data. Among them, the enumerated data can be encoded into a feature vector of fixed dimension by querying the feature mapping table, and the statistical data can be directly constructed into a feature vector. For each user, a purchase probability between 0 and 1 is output, and then the purchase probabilities are sorted from high to low. The information of the users corresponding to the purchase probabilities before the preset rank is output as a population package to the operator and seller of the product. For example, the information of the users corresponding to the purchase probabilities before the rank K is output as a population package.

[0062] Figure 3 is a flow chart showing a method for predicting a product purchasing population according to another exemplary embodiment. Figure 3 As shown, the method for predicting product purchasing population includes the following steps.

[0063] In step S301, a plurality of user data is obtained.

[0064] For example, user data is data that may characterize or influence user purchasing behavior, such as enumerated data of user age, gender, occupation, etc., such as user interaction behaviors such as clicking, browsing, adding to cart, collecting, purchasing, etc. of products on the mall, user purchase records, coupon usage, etc., which can be obtained by processing the original acquired data, such as preprocessing, feature engineering, etc. Preprocessing can include processing operations such as classifying the data of user purchasing behavior or removing invalid data, and feature engineering is processing the original data into feature vectors that can be input into the prediction model.

[0065] In step S302, multiple user data are respectively input into the target prediction model to obtain the purchase probability for the first product corresponding to each user data, and based on the purchase probability, the potential purchasing population of the first product is determined.

[0066] For example, the target prediction model is used to predict the probability that the user may purchase the first product. The first product may be a product with fewer training samples, such as a best-selling category that has just been on the market for a period of time, or a non-best-selling product such as a smoke stove, etc., or a product with more training samples, such as a best-selling category after being on the market for a period of time. In the embodiment of the present disclosure, a product with fewer training samples can be used as the first product, and the remaining products with more training samples can use the training samples of the product itself to train the prediction model for the product. Specifically, the product with fewer training samples can be a product whose sales volume is less than or equal to a preset threshold in the first time, and the product with more training samples can be a product whose sales volume is greater than the preset threshold in the first time. For example, a product with a sales volume less than or equal to 50 within ten days is a product with fewer training samples, and a product with a sales volume greater than 50 within ten days is a product with fewer training samples. Alternatively, a product with fewer training samples can also be a product with a sales volume less than the first threshold in the second time, and a product with more training samples can be a product with a sales volume greater than the second threshold in the second time, and the first threshold is less than the second threshold. For example, a product with a sales volume less than 200 within thirty days is a product with fewer training samples, and a product with a sales volume greater than 3000 within thirty days is a product with more training samples.

[0067] For example, the potential purchasing group is the user with a high probability of purchasing the first product. According to the purchase probability of the first product corresponding to the user data determined by the target prediction model, the user data corresponding to the purchase probability greater than the preset probability threshold is selected as the potential purchasing group, and the preset probability threshold is, for example, 50%. It can also be sorted from high to low according to the purchase probability, and the user data corresponding to the purchase probability before the preset position sequence is selected as the potential purchasing group, and the user data before the preset position sequence is, for example, the first K. Outputting the user data corresponding to the potential purchasing group as a group package to the operator and seller of the product can achieve accurate advertising and telephone marketing, thereby achieving the purpose of reducing costs and increasing efficiency.

[0068] Specifically, the target prediction model is trained in the following way:

[0069] Obtain a first labeled sample of the second product and a second labeled sample of the first product, wherein the first labeled sample is sample user data labeled with a purchase result for the second product, and the second labeled sample is sample user data labeled with a purchase result for the first product;

[0070] Determine a target weight parameter for each first labeled sample according to the first labeled sample and the second labeled sample, where the target weight parameter is used to characterize the importance of the first labeled sample when training a preset prediction model;

[0071] According to the first labeled sample and the target weight parameter, the preset prediction model is trained to obtain the target prediction model.

[0072] For example, the second product is a product with richer training samples than the first product, and the field to which the second product belongs may be the same as the field of the first product. For example, the first product is a certain model of mobile device that has just been on the market for a period of time, and the second product is another model of mobile device that has been on the market for a period of time. The field to which the second product belongs may also be different from the field to which the first product belongs but the fields are related. For example, the first product is a household appliance with low sales volume that has just been on the market for a period of time, and the second product is a mobile device with high sales volume that has been on the market for a period of time.

[0073] For example, the sample user data includes positive samples and negative samples. In the sample construction stage, the sampling period can be determined to be T days, and the purchasing users within the T days are selected as positive samples, and the non-purchasing users within the T days are randomly sampled as negative samples in a ratio of 1:1 between positive and negative samples.

[0074] For example, the target weight parameter of each first labeled sample is used to characterize the importance of the first labeled sample when training a preset prediction model. The corresponding first labeled samples are weighted by the target weight parameter and used as training samples to train the preset prediction model, so that the data distribution of the user data of the second product can better fit the data distribution of the corresponding user data of the first product.

[0075] The present disclosure determines the purchase probability of the first product corresponding to each user data through a target prediction model for a first product with fewer training samples, and determines the potential purchasing population of the first product based on the purchase probability. Among them, the target prediction model corresponding to the potential purchasing population of the first product is predicted, and the first labeled sample of the second product and the second labeled sample of the first product are used to assign appropriate target weight parameters to the first labeled sample of the second product, so that the data distribution of the second product can better simulate the data distribution of the first product, and a large number of training samples are obtained based on the first labeled sample of the second product and the target weight parameter. In this way, by using the first labeled sample assigned with the target weight parameter as a training sample, the overfitting of the target prediction model can be avoided, thereby improving the accuracy of the predicted purchase probability result.

[0076] In some embodiments, determining a target weight parameter of each first labeled sample according to the first labeled sample and the second labeled sample includes:

[0077] For each first labeled sample, the following process is iterated:

[0078] According to the second labeled sample and the objective function of meta-learning, the gradient descent algorithm is used to update the value of the model parameter corresponding to the first labeled sample in the objective function, and the objective function is solved with the goal of minimizing the loss value of the second labeled sample to obtain the target weight parameter of the first labeled sample.

[0079] For example, the gradient descent algorithm is an iterative method that can be used to solve linear or nonlinear least squares problems. When solving the model parameters of the machine learning algorithm, that is, the unconstrained optimization problem, the gradient descent method can be used to iterate step by step to obtain the minimized loss function and model parameter value.

[0080] For example, the traditional model of machine learning is to obtain a large data set for a specific task and use it to train the model from scratch. Meta-learning enables the model to acquire the ability to learn to adjust the parameters of the model, so that it can quickly learn new tasks based on the existing knowledge. Machine learning is to manually adjust the parameters first, and then directly train the deep model for a specific task. Meta-learning is to first train a better hyperparameter through other tasks, and then train for a specific task.

[0081] For example, in the embodiment of the present disclosure, the objective function of meta-learning is as shown in the following calculation formula 1.

[0082] Calculation formula 1:

[0083] Among them, w * is the target weight parameter; θ * (w) is the model parameter corresponding to the target weight parameter; M is the number of second labeled samples of the first product; is the loss value of the jth second labeled sample; argmin() is a function The variable value when the minimum value is taken. The model parameters are calculated as shown in the following formula 2.

[0084] Calculation 2:

[0085] Where N is the number of first labeled samples of the second product, M is much smaller than N; argmin() is the function f i (θ) is the variable value when it takes the minimum value; f i (θ) is the loss value of the first labeled sample of the i-th order; l() is the loss function, which can use the cross entropy loss function; X i is the i-th sample user data of the second product; w i is the learnable weight parameter for the i-th sample user data of the second product; b i is the training label of the i-th sample user data. When the training label is 1, X iis a positive sample, and the training label is 0 when X i is a negative sample; The prediction model is a preset prediction model, an iterative preset prediction model, or a target prediction model.

[0086] For example, for formula 1, after initializing the objective function, the initial value of the model parameter θ 1 (w) and the initial value w of the learnable weight parameter, the initial value θ of the model parameter 1 Substitute (w) into the objective function to solve the weight parameter w'. For formula 2, the sample weight parameter w of the i-th first labeled sample is i For known parameters, by minimizing the weighted empirical risk Use the gradient descent algorithm to obtain the new model parameters θ 2 (w), repeat the above steps until the optimal model parameter θ is obtained * In this way, the target weight parameter w of each first labeled data can be determined by calculation formula 1 and calculation formula 2: * , where the target weight parameter w * It can be understood as a data set of target weight parameters of multiple first labeled data.

[0087] In some embodiments, determining a target weight parameter of each first labeled sample according to the first labeled sample and the second labeled sample includes:

[0088] For each first labeled sample, the following process is iterated:

[0089] According to the second labeled sample and the objective function of meta-learning, the stochastic gradient descent algorithm is used to randomly divide the first labeled sample into multiple groups of sub-labeled samples at each iteration step. The gradient value of the model parameter corresponding to the first labeled sample in the objective function is determined according to the target sub-labeled sample in the multiple groups of sub-labeled samples, and the value of the new model parameter is determined according to the gradient value. The objective function is solved according to the value of the new model parameter after each iteration until the objective function meets the preset conditions, and the target weight parameter of the first labeled sample is obtained. The target sub-labeled sample is any group of sub-labeled samples in the multiple groups of sub-labeled samples.

[0090] For example, in the traditional gradient descent algorithm, the average gradient of the loss function in each sample needs to be calculated each time a judgment is made. It can be concluded that when the number of samples is large, the calculation process of the gradient descent algorithm one by one will take a lot of time. At the same time, if all the calculation results are saved, the storage space occupied is also very large. Therefore, the traditional gradient descent algorithm is improved to obtain the stochastic gradient descent algorithm (SDG). The stochastic gradient algorithm uses the average gradient of a small number of samples that are not repeated each time to update the model, which significantly improves efficiency.

[0091] For example, the preset condition may be that the number of iterations of the objective function meets a preset iteration threshold, such as 5000 times, or that the objective function converges, for example, before the preset iteration threshold, it is determined that the calculated loss value is less than the preset loss value.

[0092] For example, the first labeled samples are randomly divided into multiple groups of sub-labeled samples. For example, 1000 first labeled samples are divided into 10 groups of sub-labeled samples, and one group of sub-labeled samples includes 100 first labeled samples.

[0093] In some embodiments, determining a gradient value of a model parameter corresponding to a first labeled sample in an objective function includes:

[0094] For any iteration number, according to the loss value of the first labeled sample in the target iteration number and the weight parameter of the first labeled sample, determine the target loss value of the first labeled sample in the iteration number, and the target iteration number is the previous iteration number of the iteration number;

[0095] According to the target loss value, the gradient value is determined.

[0096] For example, in each iteration step, the target loss value of the first labeled sample in the iteration step can be determined based on the loss value of the first labeled sample in the previous iteration step and the weight parameter of the first labeled sample. According to the target loss value, the gradient value of the model parameter is determined, and the value of the new model parameter is determined according to the gradient value to solve the objective function calculation formula 1 and proceed to the next iteration process.

[0097] Specifically, a group of sub-labeled samples can be called a mini-batch. In a mini-batch, the parameter update process for the objective function is as shown in Formula 3 and Formula 4.

[0098] Calculation 3: f i,w (θ) = w i f i (θ)

[0099] Calculation 4:

[0100] Among them, w i is the learnable weight parameter for the i-th sample user data of the second product; n is the size of the mini-batch of the first labeled data of the second product; α is the learning rate; t is the number of iterations; is the gradient value of the model parameters; θ t (w) is the model parameter value at the tth iteration; θ t+1 (w) is the model parameter value at the t+1th iteration, and θ in Equation 3 is θ in Equation 4 t (w).

[0101] Therefore, the objective function for solving the target weight parameter can be expressed as the following calculation formula 5.

[0102] Calculation 5:

[0103] Among them, w t * is the target weight parameter; m is the size of the mini-batch of the second labeled data of the first product; is the loss value of the jth second labeled sample.

[0104] For w t * The target weight parameter of each first labeled data in can be generalized as follows:

[0105] Calculation 6:

[0106] Among them, w t i is the weight parameter of the first labeled data in each iteration, where w t i The initial value of is 0; η is the learning rate; θ t+1 (w) is the model parameter value at the t+1th iteration; is the loss value of the jth second labeled sample.

[0107] In some embodiments, the weighted loss function is a loss function obtained by weighting the weight coefficients of different first labeled samples. During the training process, the weight coefficient of the weighted loss function may be negative or non-negative, which may lead to instability in the training process. Therefore, in other embodiments, determining the gradient value of the model parameter corresponding to the first labeled sample in the objective function includes:

[0108] For any iteration number, determine the target loss value of the first labeled sample in the iteration number according to the loss value of the first labeled sample in the target iteration number and the weighted loss function, the target iteration number is the previous iteration number of the iteration number, and the weight coefficient of the weighted loss function is a non-negative number;

[0109] According to the target loss value, the gradient value is determined.

[0110] For example, in the above scheme, in order to ensure the stability of the training process, the weight parameter w can be controlled t i The value of is a non-negative value. The embodiment of the present disclosure proposes a new weighted loss function based on the re-weighting method. The new weighted loss function replaces the weight parameter w in the above calculation formula 3 with a non-negative weight coefficient. i , the weight parameter w can be controlled t i is a non-negative value. The weighted loss function is calculated as follows:

[0111] Calculation 7:

[0112] Among them, ∈={∈ i ,1≤i≤n},∈ is a trainable weight parameter; β is a parameter used to control∈ i Hyperparameters for sensitivity to single-step gradient updates; is the weight coefficient; sigmoid() is the sigmoid function; n is the size of the mini-batch of the first labeled data of the second product, f i (θ) is the loss value of the i-th first labeled sample in a mini-batch of the second product; f i,∈ (θ) is the loss value of the i-th first labeled sample in a mini-batch of the second product after being updated by the stochastic gradient descent algorithm.

[0113] As shown above, the weight parameter w i After replacement, the trainable weight parameter v i The initial value of can be set to 0, in which case the initial value of the weight coefficient is 1 / n. Accordingly, for the parameter w in equations 4 to 6, i After replacing with ∈, we can obtain the following calculation formulas 8 to 10.

[0114] Calculation formula 8:

[0115] Calculation formula 9:

[0116] Calculation formula 10:

[0117] In some embodiments, a preset prediction model is trained according to the first labeled sample and the target weight parameter to obtain a target prediction model, including:

[0118] Weighting the first labeled sample and the target weight parameter corresponding to the first labeled sample to obtain a training sample;

[0119] The training samples are used to train the preset prediction model to update the parameters of the preset prediction model and obtain the target prediction model.

[0120] For example, after determining the target weight parameter of each first labeled sample, the first labeled sample is weighted by the target weight parameter corresponding to the first labeled sample to obtain a training sample for training a preset prediction model. By iteratively training the preset prediction model with the training samples, the parameters of the preset prediction model can be iteratively updated. After the training is completed, a target prediction model for predicting the user's purchase probability of the first product can be obtained.

[0121] In some embodiments, a preset prediction model is trained according to the first labeled sample and the target weight parameter to obtain a target prediction model, including:

[0122] Weighting the first labeled sample and the target weight parameter corresponding to the first labeled sample to obtain a training sample;

[0123] Using the training samples to train a preset prediction model to update the parameters of the preset prediction model to obtain an intermediate prediction model;

[0124] The second labeled sample is used to adjust the parameters of the intermediate prediction model to obtain the target prediction model.

[0125] For example, in the above embodiment, the training samples obtained by weighting the first labeled samples by the target weight parameter are used to train the preset prediction model, and the target prediction model can be directly obtained. However, the weighted first labeled samples are still sample user data belonging to the second product, and the target prediction model is used to predict the user's purchase probability of the first product. The weighted data distribution of the second product may also be quite different from the actual data distribution of the first product. Therefore, after the preset prediction model is trained by using the weighted first labeled samples as training samples to obtain the intermediate prediction model, the actual second sample data of the first product is used as reference data to adjust the parameters of the intermediate prediction model to obtain the target prediction model for predicting the user's purchase probability of the first product, which can simulate the actual distribution of the user data of the first product as much as possible. For example, the parameters of the intermediate prediction model can be adjusted by the Fine-tune method.

[0126] like Figure 4As shown, the method for obtaining the target prediction model in the embodiment of the present disclosure includes two iterative training stages, specifically including an instance weighting stage and a model training stage. In the instance weighting stage, a meta-optimizer based on gradient descent is used, and under a meta-learning framework, the second labeled data of the first product is used for guidance to determine the weight of the first labeled data of the second product. In the model training stage, the preset prediction model is trained using the weighted first labeled data of the second product until the model converges to obtain an intermediate prediction model. The parameters of the intermediate prediction model are fine-tuned by referring to the second labeled data of the first product to obtain the final target prediction model. In the process of the method for obtaining the target prediction model, too much manual intervention is not required, so it is easy to generalize to other application scenarios.

[0127] Figure 5 is a block diagram of a device 500 for predicting a group of people who purchase a product according to an exemplary embodiment. Figure 5 The device 500 for predicting a product purchasing population includes a first acquisition module 510 and a first determination module 520 .

[0128] The first acquisition module 510 is configured to acquire a plurality of user data;

[0129] The first determination module 520 is configured to input multiple user data into the target prediction model respectively, obtain the purchase probability for the first product corresponding to each user data, and determine the potential purchasing population of the first product based on the purchase probability.

[0130] The device 500 for predicting the product purchasing population further includes:

[0131] A second acquisition module is configured to acquire a first annotated sample of the second product and a second annotated sample of the first product, the first annotated sample being sample user data annotated with a purchase result for the second product, and the second annotated sample being sample user data annotated with a purchase result for the first product;

[0132] A second determination module is configured to determine a target weight parameter of each first labeled sample according to the first labeled sample and the second labeled sample, wherein the target weight parameter is used to characterize the importance of the first labeled sample when training a preset prediction model;

[0133] The training module is configured to train a preset prediction model according to the first labeled sample and the target weight parameter to obtain a target prediction model.

[0134] The present disclosure determines the purchase probability of the first product corresponding to each user data through a target prediction model for a first product with fewer training samples, and determines the potential purchasing population of the first product based on the purchase probability. Among them, the target prediction model corresponding to the potential purchasing population of the first product is predicted, and the first labeled sample of the second product and the second labeled sample of the first product are used to assign appropriate target weight parameters to the first labeled sample of the second product, so that the data distribution of the second product can better simulate the data distribution of the first product, and a large number of training samples are obtained based on the first labeled sample of the second product and the target weight parameter. In this way, by using the first labeled sample assigned with the target weight parameter as a training sample, the overfitting of the target prediction model can be avoided, thereby improving the accuracy of the predicted purchase probability result.

[0135] In some embodiments, the second determining module includes:

[0136] The first iteration submodule is configured to iteratively perform the following process for each first labeled sample:

[0137] According to the second labeled sample and the objective function of meta-learning, the gradient descent algorithm is used to update the value of the model parameter corresponding to the first labeled sample in the objective function, and the objective function is solved with the goal of minimizing the loss value of the second labeled sample to obtain the target weight parameter of the first labeled sample.

[0138] In some embodiments, the second determining module includes:

[0139] The second iteration submodule is configured to iteratively perform the following process for each first labeled sample:

[0140] According to the second labeled sample and the objective function of meta-learning, the stochastic gradient descent algorithm is used to randomly divide the first labeled sample into multiple groups of sub-labeled samples at each iteration step. The gradient value of the model parameter corresponding to the first labeled sample in the objective function is determined according to the target sub-labeled sample in the multiple groups of sub-labeled samples, and the value of the new model parameter is determined according to the gradient value. The objective function is solved according to the value of the new model parameter after each iteration until the objective function meets the preset conditions, and the target weight parameter of the first labeled sample is obtained. The target sub-labeled sample is any group of sub-labeled samples in the multiple groups of sub-labeled samples.

[0141] In some embodiments, the second iterator module is specifically configured as follows:

[0142] For any iteration number, according to the loss value of the first labeled sample in the target iteration number and the weight parameter of the first labeled sample, determine the target loss value of the first labeled sample in the iteration number, and the target iteration number is the previous iteration number of the iteration number;

[0143] According to the target loss value, the gradient value is determined.

[0144] In some embodiments, the second iterator module is specifically configured as follows:

[0145] For any iteration number, determine the target loss value of the first labeled sample in the iteration number according to the loss value of the first labeled sample in the target iteration number and the weighted loss function, the target iteration number is the previous iteration number of the iteration number, and the weight coefficient of the weighted loss function is a non-negative number;

[0146] According to the target loss value, the gradient value is determined.

[0147] In some embodiments, the training module includes:

[0148] A first obtaining submodule is configured to weight the first labeled sample and the target weight parameter corresponding to the first labeled sample to obtain a training sample;

[0149] The second acquisition submodule is configured to use the training samples to train a preset prediction model to update the parameters of the preset prediction model to obtain a target prediction model.

[0150] In some embodiments, the training module includes:

[0151] A third obtaining submodule is configured to weight the first labeled sample and the target weight parameter corresponding to the first labeled sample to obtain a training sample;

[0152] A fourth obtaining submodule is configured to use the training samples to train a preset prediction model to update parameters of the preset prediction model to obtain an intermediate prediction model;

[0153] The fifth obtaining submodule is configured to adjust the parameters of the intermediate prediction model using the second labeled sample to obtain the target prediction model.

[0154] Regarding the device 500 for predicting a group of people who will purchase a product in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method for predicting a group of people who will purchase a product, and will not be elaborated on here.

[0155] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implements the method for predicting a group of people who will purchase a product provided by an embodiment of the present disclosure.

[0156] The present disclosure also provides an electronic device, comprising:

[0157] a storage device including a computer program;

[0158] A processing device is used to execute a computer program to implement the method for predicting product purchasing population provided by the embodiment of the present disclosure.

[0159] Figure 6 6 is a block diagram of a device 600 for predicting a group of people who will purchase a product according to an exemplary embodiment. Figure 6 , the device 600 may include one or more of the following components: a first processing component 602 , a first memory 604 , a first power component 606 , a multimedia component 608 , an audio component 610 , a first input / output interface 612 , a sensor component 614 , and a communication component 616 .

[0160] The first processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The first processing component 602 may include one or more first processors 620 to execute instructions to complete all or part of the steps of the method for predicting product purchase groups described above. In addition, the first processing component 602 may include one or more modules to facilitate interaction between the first processing component 602 and other components. For example, the first processing component 602 may include a multimedia module to facilitate interaction between the multimedia component 608 and the first processing component 602.

[0161] The first memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions, messages, etc. for any application or method operating on the device 600. The first memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0162] The first power source component 606 provides power to various components of the device 600. The first power source component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.

[0163] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and / or a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user.

[0164] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the first memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.

[0165] The first input / output interface 612 provides an interface between the first processing component 602 and a peripheral interface module, which may be a keyboard, a click wheel, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0166] The sensor assembly 614 includes one or more sensors for providing various aspects of the status assessment for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, such as the display of the device 600. The sensor assembly 614 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications.

[0167] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0168] In an exemplary embodiment, the device 600 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned air conditioning control method.

[0169] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of the device 600 to complete the above-mentioned air conditioning control method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0170] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device. The computer program has a code portion for executing the above-mentioned air conditioning control method when executed by the programmable device.

[0171] Figure 7 700 is a block diagram of a device 700 for implementing a method for predicting a product purchasing population according to an exemplary embodiment. For example, the device 700 may be provided as a server. Figure 7 , the apparatus 700 may include a second processing component 722, which further includes one or more second processors, and a memory resource represented by a second memory 732, for storing instructions executable by the second processing component 722, such as an application. The application stored in the second memory 732 may include one or more modules, each corresponding to a set of instructions. In addition, the second processing component 722 is configured to execute instructions to perform the above-mentioned method for predicting product purchasing groups.

[0172] The device 700 may also include a second power supply component 726 configured to perform power management of the device 700, a wired or wireless network interface 750 configured to connect the device 700 to a network, and a second input / output interface 758. The device 700 may operate based on an operating system stored in the memory 732, such as Windows Server™, Mac OSX™, Unix™, Linux™, FreeBSD™ or the like.

[0173] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0174] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for predicting product purchasing population, characterized in that: include: Get multiple user data; Inputting the plurality of user data into a target prediction model respectively, obtaining a purchase probability for the first product corresponding to each of the user data, and determining a potential purchasing group for the first product based on the purchase probability; The target prediction model is trained in the following way: Obtain a first labeled sample of a second product and a second labeled sample of the first product, wherein the first labeled sample is sample user data labeled with a purchase result for the second product, and the second labeled sample is sample user data labeled with a purchase result for the first product; Determine, according to the first annotated sample and the second annotated sample, a target weight parameter for each of the first annotated samples, wherein the target weight parameter is used to characterize the importance of the first annotated sample when training a preset prediction model; The preset prediction model is trained according to the first labeled sample and the target weight parameter to obtain the target prediction model.

2. The method according to claim 1, characterized in that Determining a target weight parameter of each of the first labeled samples according to the first labeled samples and the second labeled samples includes: For each of the first labeled samples, the following process is iteratively performed: According to the second labeled sample and the objective function of meta-learning, the value of the model parameter corresponding to the first labeled sample in the objective function is updated using the gradient descent algorithm, and the objective function is solved with the goal of minimizing the loss value of the second labeled sample to obtain the target weight parameter of the first labeled sample.

3. The method according to claim 1, characterized in that Determining a target weight parameter of each of the first labeled samples according to the first labeled samples and the second labeled samples includes: For each of the first labeled samples, the following process is iteratively performed: According to the second labeled sample and the objective function of meta-learning, using the stochastic gradient descent algorithm, at each iteration step, the first labeled sample is randomly divided into multiple groups of sub-labeled samples, and according to the target sub-labeled samples in the multiple groups of sub-labeled samples, the gradient value of the model parameter corresponding to the first labeled sample in the objective function is determined, and the value of the new model parameter is determined according to the gradient value. According to the value of the new model parameter after each iteration step, the objective function is solved until the objective function meets the preset conditions, and the target weight parameter of the first labeled sample is obtained, and the target sub-labeled sample is any group of sub-labeled samples in the multiple groups of sub-labeled samples.

4. The method according to claim 3, characterized in that Determining a gradient value of a model parameter corresponding to the first labeled sample in the objective function includes: For any iteration number, determining a target loss value of the first labeled sample in the iteration number according to the loss value of the first labeled sample in the target iteration number and the weight parameter of the first labeled sample, wherein the target iteration number is the previous iteration number of the iteration number; The gradient value is determined according to the target loss value.

5. The method according to claim 3, characterized in that: Determining a gradient value of a model parameter corresponding to the first labeled sample in the objective function includes: For any iteration step, determine the target loss value of the first labeled sample in the iteration step according to the loss value of the first labeled sample in the target iteration step and the weighted loss function, wherein the target iteration step is the previous iteration step of the iteration step, and the weight coefficient of the weighted loss function is a non-negative number; The gradient value is determined according to the target loss value.

6. The method according to any one of claims 1 to 5, characterized in that: The preset prediction model is trained according to the first labeled sample and the target weight parameter to obtain the target prediction model, including: Weighting the first labeled sample and the target weight parameter corresponding to the first labeled sample to obtain a training sample; The training samples are used to train the preset prediction model to update the parameters of the preset prediction model to obtain the target prediction model.

7. The method according to any one of claims 1 to 5, characterized in that: The preset prediction model is trained according to the first labeled sample and the target weight parameter to obtain the target prediction model, including: Weighting the first labeled sample and the target weight parameter corresponding to the first labeled sample to obtain a training sample; Using the training samples to train the preset prediction model to update the parameters of the preset prediction model to obtain an intermediate prediction model; The parameters of the intermediate prediction model are adjusted using the second labeled sample to obtain the target prediction model.

8. A device for predicting product purchasing population, characterized in that: include: A first acquisition module is configured to acquire a plurality of user data; A first determination module is configured to input the plurality of user data into a target prediction model respectively, obtain a purchase probability for a first product corresponding to each of the user data, and determine a potential purchase group of the first product based on the purchase probability; Wherein, the device further comprises: A second acquisition module is configured to acquire a first labeled sample of a second product and a second labeled sample of the first product, wherein the first labeled sample is sample user data labeled with a purchase result for the second product, and the second labeled sample is sample user data labeled with a purchase result for the first product; A second determination module is configured to determine a target weight parameter of each of the first labeled samples according to the first labeled samples and the second labeled samples, wherein the target weight parameter is used to characterize the importance of the first labeled samples when training a preset prediction model; The training module is configured to train the preset prediction model according to the first labeled sample and the target weight parameter to obtain the target prediction model.

9. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the method for predicting the product purchasing population described in any one of claims 1-7 is implemented.

10. An electronic device, characterized in that: include: a storage device including a computer program; A processing device is used to execute the computer program to implement the method for predicting the product purchasing population as described in any one of claims 1-7.