User prediction method, apparatus, computing device, and computer storage medium
By combining the LightGBM model and neural network to process user feature data, generate sparse features and merge the outputs, the problem of inaccurate user prediction is solved and higher prediction accuracy is achieved.
Patent Information
- Application Number
- CN202211354908.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-01
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2042-11-01
AI Technical Summary
In the existing technology, user prediction is inaccurate, making it difficult to accurately mine potential target users, which affects the success rate of promotional information push.
A user prediction model that combines the LightGBM model with a neural network is used to process categorical and continuous user feature data separately, generate sparse features, and merge them to improve prediction accuracy.
The accuracy of user prediction is improved by 8% compared to existing technologies, and target users can be better identified.
Smart Images

Figure CN115564493B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a user prediction method, apparatus, computing device, and computer storage medium. Background Art
[0002] Currently, major websites have introduced paid membership models. This not only increases the platform's own revenue, but also provides users with a better viewing experience after purchasing membership services. For example, when watching videos or playing games, users may be exposed to advertisements, which can affect the viewing experience. Major websites offer paid ad-free services. Accurately predicting potential target users allows for targeted promotional information push, increasing the success rate of promotions. Therefore, accurately identifying potential target users is a pressing issue. Summary of the Invention
[0003] The purpose of this application is to provide a user prediction method, apparatus, computing device and computer storage medium to solve the problems of inaccurate prediction of potential target users in the prior art.
[0004] According to one aspect of an embodiment of the present application, a user prediction method is provided, comprising:
[0005] Obtaining user feature data of the user to be predicted, where the user feature data includes categorical user feature data and continuous user feature data;
[0006] Performing a first prediction process on the user feature data using a first model in the pre-trained user prediction model to obtain a first output result;
[0007] Using the second model in the user prediction model, a first preset processing is performed on the continuous user feature data to generate a first sparse feature; a second preset processing is performed on the categorical user feature data to generate a second sparse feature; and a second prediction processing is performed on the first sparse feature and the second sparse feature to obtain a second output result.
[0008] Determine whether the user to be predicted is a target user based on a combination of the first output result and the second output result.
[0009] Optionally, determining whether the user to be predicted is a target user according to a combination of the first output result and the second output result further includes:
[0010] Inputting the target output result obtained by combining the first output result and the second output result into the output layer of the user prediction model;
[0011] The output layer determines the prediction probability corresponding to the user to be predicted based on the target output result;
[0012] Determine whether the user to be predicted is the target user based on the predicted probability.
[0013] Optionally, determining whether the user to be predicted is a target user according to the predicted probability further includes:
[0014] Determine whether the predicted probability is greater than or equal to a preset threshold;
[0015] If so, the user to be predicted is determined to be the target user;
[0016] If not, it is determined that the user to be predicted is a non-target user.
[0017] Optionally, performing a first preset processing on the continuous user feature data to generate a first sparse feature further includes:
[0018] Discretize the continuous user feature data to obtain discrete user feature data;
[0019] The discretized user feature data is one-hot encoded to generate the first sparse feature.
[0020] Optionally, performing a second preset processing on the categorical user feature data to generate a second sparse feature further includes:
[0021] Perform one-hot encoding on the categorical user feature data to generate the second sparse feature.
[0022] Optionally, the user prediction model training process includes:
[0023] Obtain sample user feature data and corresponding label information;
[0024] The first model and the second model are trained according to the sample user feature data and label information to obtain a user prediction model.
[0025] Optionally, training the first model and the second model according to the sample user feature data and label information to obtain the user prediction model further includes:
[0026] Construct a decision tree for the first model, and split the sample user feature data according to a preset splitting path through the decision tree to obtain corresponding splitting results;
[0027] Determine the splitting result with the largest splitting gain as the first output result;
[0028] Training the second model according to the sample user feature data to obtain a second output result;
[0029] Processing a combination of the first output result and the second output result to obtain a processing result;
[0030] Calculate the loss between the processing result and the label information to obtain a model loss function, and update the model parameters of the first model and the model parameters of the second model according to the model loss function;
[0031] The above steps are iterated until the number of iterations reaches a preset number of iterations and / or the output value of the model loss function is less than a preset threshold, thereby obtaining a user prediction model.
[0032] Optionally, the second output result is a dense vector converted after being embedded in the second model.
[0033] According to another aspect of an embodiment of the present application, a user prediction device is provided, comprising:
[0034] An acquisition module adapted to acquire user feature data of a user to be predicted, wherein the user feature data includes categorical user feature data and continuous user feature data;
[0035] The processing module is adapted to perform a first prediction process on the user feature data using a first model in a pre-trained user prediction model to obtain a first output result; perform a first preset process on the continuous user feature data using a second model in the user prediction model to generate a first sparse feature; perform a second preset process on the categorical user feature data to generate a second sparse feature; and perform a second prediction process on the first sparse feature and the second sparse feature to obtain a second output result;
[0036] The determination module is adapted to determine whether the user to be predicted is a target user according to a combination of the first output result and the second output result.
[0037] According to another aspect of an embodiment of the present application, a computing device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus;
[0038] The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute operations corresponding to the above-mentioned user prediction method.
[0039] According to another aspect of the embodiments of the present application, a computer storage medium is provided, in which at least one executable instruction is stored. The executable instruction enables a processor to perform operations corresponding to the above-mentioned user prediction method.
[0040] According to the solution provided in the embodiment of the present application, all user feature data is used to predict users, and the data is richer, which can greatly improve the accuracy of the prediction. In addition, two models are used for processing, and the output results of the two models are finally merged together to predict whether a user is a target user. The prediction result is more accurate, and the accuracy can be increased by 8% compared with other prediction methods in the prior art.
[0041] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiment below. The accompanying drawings are for illustration purposes only and are not to be considered as limiting the present application. The same reference symbols are used throughout the drawings to represent the same components. In the drawings:
[0043] Figure 1 A schematic diagram of a user prediction method according to an embodiment of the present application is shown;
[0044] Figure 2A A schematic flow chart of a user prediction method according to another embodiment of the present application is shown;
[0045] Figure 2B Schematic diagram of the splitting of sample user feature data in the first model;
[0046] Figure 3 A schematic structural diagram of a user prediction device according to an embodiment of the present application is shown;
[0047] Figure 4 A schematic structural diagram of a computing device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0048] The following describes exemplary embodiments of the present application in more detail with reference to the accompanying drawings. Although exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0049] First, the terms involved in one or more embodiments of the present application are explained.
[0050] GBDT: Gradient Boosting Tree, is a widely used ensemble algorithm model.
[0051] Neural network: A network structure composed of neurons, widely used in deep algorithm modeling.
[0052] Figure 1A flow chart of a user prediction method according to an embodiment of the present application is shown.
[0053] like Figure 1 As shown, the method includes the following steps:
[0054] Step S101 : obtaining user feature data of a user to be predicted, wherein the user feature data includes categorical user feature data and continuous user feature data.
[0055] Specifically, the user prediction method provided in this embodiment can be used to predict whether any user is a target user. A target user refers to a user who will perform a target behavior, such as payment. Here, the user to be predicted is referred to as the user to be predicted. For the user to be predicted, user feature data corresponding to the user is obtained. User feature data is data used to characterize user characteristics, and can be, for example, data representing basic user information or data representing user behavior.
[0056] User feature data includes categorical user feature data and continuous user feature data. Categorical user feature data is discretized feature data with a finite number of categories; continuous user feature data is feature data that can take continuous values, and is numerical data with an infinite number of values between any two values. For example, categorical user feature data includes: gender, place of residence, user interests, and whether or not the user is a previous target user; continuous user feature data includes: age and income. Categorical user feature data and continuous user feature data can also include other data. These are examples only and are not limiting.
[0057] Step S102 : performing a first prediction process on the user feature data using a first model in the pre-trained user prediction model to obtain a first output result.
[0058] When performing user prediction, this embodiment uses a pre-trained user prediction model for processing. The user prediction model includes a first model and a second model. In order to improve the accuracy of the prediction, the first model in the pre-trained user prediction model is used to perform a first prediction process on the user feature data. The first model will divide the user feature data of the user to be predicted into leaf nodes of the tree, and generate a vector based on the position of the leaf node to which the user is divided, that is, the first output result. The first output result can be a dense vector after processing the user feature data. Compared with the first model in the prior art that can only process continuous user feature data, the user feature data used here is richer, so that the accuracy of the prediction result is also higher.
[0059] Step S103: Use the second model in the user prediction model to perform a first preset processing on the continuous user feature data to generate a first sparse feature; perform a second preset processing on the categorical user feature data to generate a second sparse feature; perform a second prediction processing on the first sparse feature and the second sparse feature to obtain a second output result.
[0060] Specifically, the input type of the second model in the user prediction model is sparse features, while the user feature data includes continuous user feature data. Continuous user feature data also affects the accuracy of the prediction. Therefore, in order to improve the accuracy of the prediction, different processing is performed on the two types of data in the user feature data. Specifically, a first preset processing is performed on the continuous user feature data to generate a first sparse feature, and a second preset processing is performed on the categorical user feature data to generate a second sparse feature. After the first and second preset processing, all user feature data are converted into sparse features. The second model performs a second prediction processing on the first and second sparse features. The prediction processing obtains a second output result for the user to be predicted. The second output result can be represented by a vector.
[0061] Step S104: determining whether the user to be predicted is a target user based on a combination of the first output result and the second output result.
[0062] After the first output result and the second output result are determined, the first output result and the second output result are merged, and the merged result is used to determine whether the user to be predicted is the target user.
[0063] The solution provided in this application utilizes all user feature data to predict users, which provides richer data and can greatly improve the accuracy of predictions. In addition, the user prediction model is composed of two models, which are processed using the user prediction model composed of the two models. Finally, the output results of the two models are combined to predict whether a user is a target user. The prediction results are more accurate and can be improved by 8% compared to other prediction methods in the prior art.
[0064] Figure 2A FIG. 1 shows a flow chart of a user prediction method according to another embodiment of the present application. Figure 2A As shown, the method includes the following steps:
[0065] Step S201 : obtaining user feature data of a user to be predicted, wherein the user feature data includes categorical user feature data and continuous user feature data.
[0066] Specifically, the user prediction method provided in this embodiment can be used to predict whether any user is a target user. A target user refers to a user who will perform a target behavior, where the target behavior can be, for example, a payment behavior. The user for which prediction is required is referred to herein as a to-be-predicted user. For the to-be-predicted user, user feature data corresponding to the user is obtained. User feature data is data used to characterize user characteristics, and can be, for example, data representing basic user information or data representing user behavior.
[0067] User feature data includes categorical user feature data and continuous user feature data. Categorical user feature data is discretized feature data with a finite number of categories; continuous user feature data is feature data that can take continuous values and is numerical data with an infinite number of values between any two values. For example, categorical user feature data includes: gender, place of residence, user interests, and whether or not the user is a prepaid user; continuous user feature data includes: age and income. Categorical user feature data and continuous user feature data may also include other data. This is for illustrative purposes only and does not constitute a limitation.
[0068] Step S202 : performing a first prediction process on the user feature data using a first model in the pre-trained user prediction model to obtain a first output result.
[0069] When performing user prediction, this embodiment utilizes a pre-trained user prediction model, which includes a first model and a second model. To improve the accuracy of the prediction, the first model in the pre-trained user prediction model is used to perform a first prediction process on the original user feature data. The first output result is obtained through the processing. The first output result can be represented by a vector. For example, the first output result can be a dense vector after processing the user feature data, wherein the first model can be a LightGBM model. Compared to the existing technology that can only process continuous user feature data, the user feature data used here is richer, thereby making the prediction results more accurate.
[0070] In an optional embodiment of the present application, the user prediction model training process includes:
[0071] Obtain sample user feature data and corresponding label information, where the label information is used to mark a user as a target user or a non-target user. For example, 1 can be used to represent a target user and 0 can be used to represent a non-target user. Sample user feature data is the user feature data corresponding to known target users and known non-target users. As model training data, it is necessary to obtain a large amount of sample user feature data. Then, the first model and the second model are trained based on the sample user feature data and label information to obtain a user prediction model. Among them, the first model is the LightGBM model, which supports not only continuous user feature data but also categorical user feature data, and has a wider range of usage scenarios. The second model is a neural network.
[0072] The first model and the second model are trained based on the sample user feature data and label information to obtain a user prediction model, which can be further implemented by the following method:
[0073] Construct a decision tree for the first model, and split the sample user feature data according to a preset splitting path through the decision tree to obtain corresponding splitting results;
[0074] Determine the splitting result with the largest splitting gain as the first output result;
[0075] Training the second model according to the sample user feature data to obtain a second output result;
[0076] Processing a combination of the first output result and the second output result to obtain a processing result;
[0077] Calculate the loss between the processing result and the label information to obtain a model loss function, and update the model parameters of the first model and the model parameters of the second model according to the model loss function;
[0078] The above steps are iterated until the number of iterations reaches a preset number of iterations and / or the output value of the model loss function is less than a preset threshold, thereby obtaining a user prediction model.
[0079] Specifically, after obtaining the sample user feature data, the decision tree of the first model is constructed. Each time the model splits the sample user feature data, it will calculate the gain value of each split feature and split point based on the principle of maximizing the split gain and select the optimal split feature and the optimal split point until the split is completed. The first model learns the optimal split feature and the optimal split point by maximizing the split gain. The tree structure composed of these optimal split features and optimal split points is the learned data law. This is equivalent to extracting the entire sample by the split path. Figure 2BAs shown in FIG, by determining whether the user is male, between 18 and 25 years old, and whether the user is a former paying user, a set with the largest splitting gain can be obtained, and the intersection of these three conditions is the first output result, that is, the vector generated by the user feature data at the leaf node position is the first output result.
[0080] The sample user feature data includes continuous sample user feature data and categorical sample user feature data. The continuous sample user feature data is subjected to a first preset processing, for example, the continuous sample user feature data is first discretized and then one-hot encoded to generate a first sparse feature. The categorical sample user feature data is subjected to a second preset processing, for example, the categorical sample user feature data is one-hot encoded to generate a second sparse feature. The first sparse feature and the second sparse feature are used to train a second model to obtain a second output result.
[0081] Among them, the activation function can be a relu function, which converts the combination of the first output result and the second output result into a numerical value between 0 and 1 through the relu function. The numerical value is the processing result of the sample user being converted into the target user, that is, the probability of the sample user paying. Of course, the activation function can also be other functions, which are not specifically limited here. In the specific implementation, the first sparse feature, the second sparse feature, and the first output result can be input into the second model for training. The second model does not process the first output result, but processes the first sparse feature and the second sparse feature. The processed result is combined with the first output result and input into the output layer. The output layer is processed by the activation function to obtain the corresponding processing result. Here, the parameters of the second model are updated based on backpropagation, and the parameters of the second model and the first model are tuned based on the evaluation index until the expectations are met.
[0082] Then, the loss between the processing result and the label information is calculated to obtain the model loss function, and the model parameters of the first model and the model parameters of the second model are updated according to the model loss function; the above steps are iteratively performed until the number of iterations reaches a preset number of iterations, and / or the output value of the model loss function is less than a preset threshold, and the user prediction model is obtained.
[0083] Since the LightGBM model is a GBDT-type algorithm, it has a strong ability to fit data and can effectively memorize the relevant patterns of the data. However, this also leads to the risk of overfitting the model. Overfitting the samples will affect the generalization ability of the overall model.
[0084] Taking the user payment scenario as an example, there are many factors that affect whether the user pays, which has a certain degree of randomness and volatility. Using GBDT-type algorithms can easily cause overfitting, and what is learned is not the user's own payment pattern but noise.
[0085] In order to solve the above problems, regularization was added to the model during the LightGBM model training phase to reduce the complexity of the model and improve the robustness of the model.
[0086] Here we mainly control the number of decision trees and leaf nodes in the LightGBM model, tree depth, lambda_l1 (a floating point number, indicating the L1 regularization coefficient, the default is 0), lambda_l2 (a floating point number, indicating the L2 regularization coefficient, the default is 0), min_gain_to_split, min_data_to_leaf, min_sum_hessian_in_leaf (a floating point number, indicating the minimum sum of the Hessian on a leaf node, (that is, the minimum value of the sum of the weights of the leaf node samples) defaults to 1e-3) and other parameters. These parameters can effectively adjust the complexity of the model and change the risk of overfitting the model.
[0087] First, determine the number of decision trees and leaf nodes. For example, the number of trees is 10 and the number of leaf nodes is 20. We believe that the number of trees and leaf nodes are the factors that most affect the overall model performance, so we use smaller values than the default values to avoid overfitting.
[0088] Then, the remaining parameters are determined based on the performance of LightGBM on the prediction set using a grid search method, where auc is used as the evaluation metric.
[0089] Finally, the vector output by LightGBM is combined with the second model to obtain the final effect index of the overall model. Based on the final index, the parameter value of the first step can be gradually increased until the expected result is achieved.
[0090] Step S203 : discretize the continuous user feature data using the second model in the user prediction model to obtain discretized user feature data.
[0091] Specifically, the continuous user feature data is numerical. In order to facilitate processing by the second model, the continuous user feature data needs to be discretized first. Discretization refers to a method of converting continuous features into discrete values. For example, equal frequency discretization or equal distance discretization can be used to discretize the continuous user feature data. The specific discretization process will not be repeated here. Discrete user feature data is obtained through discretization.
[0092] Discretization has the following advantages: 1. Sparse vector inner product multiplication is fast, and the results are easy to store and scale. 2. Discretized features are highly robust to abnormal data: for example, a feature such as age > 30 is 1, otherwise 0. If the feature is not discretized, an abnormal data value such as "age 300" will cause significant interference to the model. 3. Discretized features make the model more stable.
[0093] Optionally, continuous user feature data can also be normalized. Normalization mainly maps the data to the range of 0 to 1. Normalization is equivalent to scaling the data, which can improve the learning efficiency and performance of the model. For example, the min-max normalization method or the Z-score normalization method can be used for normalization.
[0094] Step S204: performing one-hot encoding on the discretized user feature data to generate a first sparse feature.
[0095] After the discretization process is completed in step S203, the discretized user feature data is subjected to one-hot encoding, also known as single-bit encoding. One-hot encoding represents data as a binary vector. First, the categorical values are mapped to integer values. Each integer value is then represented as a binary vector, with all values being zero except for the integer index, which is marked as 1. Through one-hot encoding, a first sparse feature can be generated.
[0096] Step S205 , performing one-hot encoding processing on the categorical user feature data to generate a second sparse feature.
[0097] Categorical user feature data is a categorical variable. Here, we use one-hot encoding to generate the second sparse feature. For example, using gender as an example, male is represented as 10 after one-hot encoding, and female is represented as 01. This is for illustrative purposes only and is not intended to be limiting.
[0098] Step S206: The second model performs a second prediction process on the first sparse feature and the second sparse feature to obtain a second output result.
[0099] After processing in step S205, all user feature data is converted into sparse features. Here, the second model is used to process the first sparse features and the second sparse features accordingly. Here, the second model is used to predict the target user. The second output result is obtained through processing. The second output result can be represented by a vector. The second output result is a dense vector converted after the second model embedding processing.
[0100] The second model includes an embedding layer, a hidden layer, a fully connected layer, etc. The embedding layer can convert sparse features into dense vectors through embedding processing. The fully connected layer performs high-order processing on the converted dense vectors to obtain the second output result.
[0101] Step S207: inputting the target output result obtained by combining the first output result and the second output result into the output layer of the user prediction model.
[0102] After obtaining the first output result and the second output result, the first output result and the second output result are merged. The first output result and the second output result are expressed in the form of vectors. Here, the two vectors are combined into one to obtain the target output result. The user prediction model includes an output layer, and the merged target result is input into the output layer of the user prediction model.
[0103] Step S208: The output layer determines the prediction probability corresponding to the user to be predicted based on the target output result.
[0104] The activation function in the output layer determines the predicted probability of the user to be predicted based on the target output. The activation function can be a ReLU function or a sigmoid function. The activation function converts the target output into a value between 0 and 1. This value represents the probability that the user to be predicted will become the target user, that is, the probability that the user to be predicted is the target user. Of course, the activation function can also be other functions, which are not specifically limited here.
[0105] Step S209: Determine whether the user to be predicted is a target user based on the prediction probability.
[0106] After the predicted probability is calculated, it can be determined whether the user to be predicted is the target user based on the predicted probability. For example, the predicted probability is compared with a preset threshold, which specifies the minimum probability corresponding to the target user. If the predicted probability is greater than or equal to the preset threshold, the user to be predicted is determined to be the target user; if the predicted probability is less than the preset threshold, the user to be predicted is determined to be a non-target user.
[0107] The solution provided in this application is to use a combination of LightGBM model and neural network to perform user prediction. The LightGBM model supports categorical user feature data, thus having a wider range of usage scenarios. In addition, the LightGBM model has stronger memory capacity than other models, and can quickly process and memorize a large amount of historical user feature data during model training. For neural networks, continuous user feature data and categorical user feature data are converted into sparse features, and the neural network is used to process the converted sparse features. All user feature data are used to predict users, and the data is richer, thereby greatly improving the accuracy of the prediction. In addition, when predicting, the output results of the LightGBM model are combined with the output results of the neural network to predict whether a user is a target user. The prediction result is more accurate, and the accuracy can be increased by 8% compared to other prediction methods in the prior art.
[0108] Figure 3 A schematic structural diagram of a user prediction device according to an embodiment of the present application is shown.
[0109] like Figure 3 As shown, the device includes:
[0110] An acquisition module 301 is adapted to acquire user feature data of a user to be predicted, wherein the user feature data includes categorical user feature data and continuous user feature data;
[0111] The processing module 302 is adapted to perform a first prediction process on the user feature data using a first model in a pre-trained user prediction model to obtain a first output result; perform a first preset process on the continuous user feature data using a second model in the user prediction model to generate a first sparse feature; perform a second preset process on the categorical user feature data to generate a second sparse feature; and perform a second prediction process on the first sparse feature and the second sparse feature to obtain a second output result.
[0112] The determination module 303 is adapted to determine whether the user to be predicted is a target user according to a combination of the first output result and the second output result.
[0113] Optionally, the determination module is further adapted to: input the target output result after combining the first output result and the second output result into the output layer of the user prediction module;
[0114] The output layer determines the prediction probability corresponding to the user to be predicted based on the target output result;
[0115] Determine whether the user to be predicted is the target user based on the predicted probability.
[0116] Optionally, the determination module is further adapted to: determine whether the predicted probability is greater than or equal to a preset threshold;
[0117] If so, the user to be predicted is determined to be the target user;
[0118] If not, it is determined that the user to be predicted is a non-target user.
[0119] Optionally, the processing module is further adapted to: discretize the continuous user feature data to obtain discretized user feature data;
[0120] The discretized user feature data is one-hot encoded to generate the first sparse feature.
[0121] Optionally, the processing module is further adapted to: perform one-hot encoding processing on the categorical user feature data to generate a second sparse feature.
[0122] Optionally, the apparatus further comprises: a user prediction model training module adapted to obtain sample user feature data and corresponding label information;
[0123] The first model and the second model are trained according to the sample user feature data and label information to obtain a user prediction model.
[0124] Optionally, the user prediction model training module is further adapted to: construct a decision tree of the first model, and split the sample user feature data according to a preset splitting path through the decision tree to obtain corresponding splitting results;
[0125] Determine the splitting result with the largest splitting gain as the first output result;
[0126] Training the second model according to the sample user feature data to obtain a second output result;
[0127] Processing a combination of the first output result and the second output result to obtain a processing result;
[0128] Calculate the loss between the processing result and the label information to obtain a model loss function, and update the model parameters of the first model and the model parameters of the second model according to the model loss function;
[0129] The above steps are iteratively performed until the number of iterations reaches a preset number of iterations and / or the output value of the model loss function is less than a preset threshold, thereby obtaining a user prediction model.
[0130] Optionally, the second output result is a dense vector converted after being embedded in the second model.
[0131] The solution provided in this application utilizes all user feature data to predict users, which provides richer data and can greatly improve the accuracy of predictions. In addition, the user prediction model is composed of two models, which are processed using the user prediction model composed of the two models. Finally, the output results of the two models are combined to predict whether a user is a target user. The prediction results are more accurate and can be improved by 8% compared to other prediction methods in the prior art.
[0132] An embodiment of the present application further provides a non-volatile computer storage medium, wherein the computer storage medium stores at least one executable instruction, and the computer executable instruction can execute the user prediction method in any of the above method embodiments.
[0133] Figure 4 A schematic diagram of the structure of a computing device according to an embodiment of the present application is shown. The specific embodiment of the present application does not limit the specific implementation of the computing device.
[0134] like Figure 4 As shown, the computing device may include: a processor 402 , a communications interface 404 , a memory 406 , and a communication bus 408 .
[0135] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .
[0136] The communication interface 404 is used to communicate with other devices such as clients or other servers.
[0137] The processor 402 is configured to execute the program 410 , and specifically to execute the relevant steps in the above-mentioned user prediction method embodiment.
[0138] Specifically, the program 410 may include program codes, which include computer operation instructions.
[0139] Processor 402 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the computing device may be processors of the same type, such as one or more CPUs, or may be processors of different types, such as one or more CPUs and one or more ASICs.
[0140] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0141] Program 410 can be specifically configured to cause processor 402 to execute the user prediction method of any of the aforementioned method embodiments. The specific implementation of each step in program 410 can be found in the corresponding descriptions of the corresponding steps and units in the aforementioned user prediction embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for ease and brevity of description, the specific operating processes of the devices and modules described above can refer to the corresponding process descriptions in the aforementioned method embodiments, and will not be repeated here.
[0142] The algorithm or demonstration provided here are not inherently relevant to any particular computer, virtual system or other equipment. Various general purpose systems can also be used together with the teachings based on this. According to the above description, it is obvious that the structure required for constructing this type of system. In addition, the present application embodiment is not directed to any specific programming language yet. It should be understood that various programming languages can be utilized to realize the content of the present application described here, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the present application.
[0143] In the description provided herein, a large number of specific details are described. However, it is understood that the embodiments of the present application can be practiced without these specific details. In some instances, well-known methods, structures, and techniques are not shown in detail so as not to obscure the understanding of this description.
[0144] Similarly, it should be understood that in order to streamline the present application and aid in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present application, the various features of the embodiments of the present application are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the following intention: that the claimed application requires more features than those explicitly recited in each claim. More precisely, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim itself serving as a separate embodiment of the present application.
[0145] Those skilled in the art will appreciate that the modules in the devices in the embodiments may be adaptively changed and arranged in one or more devices different from the embodiments. The modules or units or components in the embodiments may be combined into one module or unit or component, and in addition may be divided into multiple submodules or subunits or subcomponents. All features disclosed in this specification (including the accompanying claims, abstracts and drawings) and all processes or units of any method or device disclosed herein may be combined in any combination, except that at least some of such features and / or processes or units are mutually exclusive. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstracts and drawings) may be replaced by an alternative feature providing the same, equivalent or similar purpose.
[0146] Furthermore, those skilled in the art will appreciate that although some embodiments herein include certain features included in other embodiments but not other features, combinations of features from different embodiments are intended to be within the scope of this application and to form different embodiments. For example, in the claims below, any of the claimed embodiments may be used in any combination.
[0147] The various component embodiments of the present application can be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present application. The application can also be implemented as a device or apparatus program (e.g., computer program and computer program product) for performing a part or all of the methods described herein. Such a program implementing the present application can be stored on a computer-readable medium, or can have the form of one or more signals. Such a signal can be downloaded from an Internet website, or provided on a carrier signal, or provided in any other form.
[0148] It should be noted that the above embodiments illustrate rather than limit the present application, and that a person skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between brackets should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The present application may be implemented by means of hardware comprising several different elements and by means of appropriately programmed computers. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third etc. does not indicate any order. These words may be interpreted as names. The steps in the above embodiments should not be understood as limiting the order of execution unless otherwise specified.
Claims
1. A user prediction method, comprising: Acquire user feature data of the user to be predicted, wherein the user feature data includes categorical user feature data and continuous user feature data; Performing a first prediction process on the user feature data using a first model in a pre-trained user prediction model to obtain a first output result, wherein the first output result is a dense vector, and the first model is a decision tree model that supports processing categorical user feature data and continuous user feature data; Performing a first preset processing on the continuous user feature data using a second model in the user prediction model to generate a first sparse feature; performing a second preset processing on the categorical user feature data to generate a second sparse feature; performing a second prediction processing on the first sparse feature and the second sparse feature to obtain a second output result, where the second output result is a dense vector converted after being embedded in the second model; determining whether the user to be predicted is a target user according to a combination of the first output result and the second output result; Wherein, determining whether the user to be predicted is a target user according to a combination of the first output result and the second output result further includes: Inputting a target output result obtained by combining the first output result and the second output result into an output layer of the user prediction model; The output layer determines the prediction probability corresponding to the to-be-predicted user according to the target output result; Determine whether the user to be predicted is a target user according to the predicted probability.
2. The method according to claim 1, wherein Determining whether the user to be predicted is a target user according to the predicted probability further includes: Determining whether the predicted probability is greater than or equal to a preset threshold; If so, determining that the user to be predicted is a target user; If not, it is determined that the user to be predicted is a non-target user.
3. The method according to claim 1 or 2, wherein: Performing a first preset processing on the continuous user feature data to generate a first sparse feature further includes: Discretizing the continuous user feature data to obtain discrete user feature data; One-hot encoding is performed on the discretized user feature data to generate a first sparse feature.
4. The method according to claim 1 or 2, wherein: Performing a second preset processing on the categorical user feature data to generate a second sparse feature further includes: One-hot encoding is performed on the categorical user feature data to generate a second sparse feature.
5. The method according to claim 1 or 2, wherein: The user prediction model training process includes: Obtain sample user feature data and corresponding label information; The first model and the second model are trained according to the sample user feature data and the label information to obtain a user prediction model.
6. The method according to claim 5, wherein: The training of the first model and the second model according to the sample user feature data and the label information to obtain the user prediction model further includes: Constructing a decision tree of the first model, and splitting the sample user feature data according to a preset splitting path through the decision tree to obtain corresponding splitting results; Determine the splitting result with the largest splitting gain as the first output result; Training the second model according to the sample user feature data to obtain a second output result; Processing a combination of the first output result and the second output result to obtain a processing result; Calculate the loss between the processing result and the label information to obtain a model loss function, and update the model parameters of the first model and the model parameters of the second model according to the model loss function; The above steps are iteratively performed until the number of iterations reaches a preset number of iterations and / or the output value of the model loss function is less than a preset threshold, thereby obtaining a user prediction model.
7. A user prediction device, comprising: an acquisition module adapted to acquire user feature data of a user to be predicted, wherein the user feature data includes categorical user feature data and continuous user feature data; a processing module adapted to perform a first prediction process on the user feature data using a first model in a pre-trained user prediction model to obtain a first output result; and perform a first preset process on the continuous user feature data using a second model in the user prediction model to generate a first sparse feature; Performing a second preset processing on the categorical user feature data to generate a second sparse feature; performing a second prediction process on the first sparse feature and the second sparse feature to obtain a second output result, wherein the first output result is a dense vector, the first model is a decision tree model that supports processing categorical user feature data and continuous user feature data, and the second output result is a dense vector converted after embedding processing by the second model; a determination module, adapted to determine whether the user to be predicted is a target user based on a combination of the first output result and the second output result; The determination module is further adapted to: input a target output result after merging the first output result and the second output result into the output layer of the user prediction module; the output layer determines a prediction probability corresponding to the user to be predicted based on the target output result; and determines whether the user to be predicted is a target user based on the prediction probability.
8. A computing device comprising: A processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the user prediction method according to any one of claims 1 to 6.
9. A computer storage medium, wherein at least one executable instruction is stored in the storage medium, and wherein the executable instruction enables a processor to perform operations corresponding to the user prediction method according to any one of claims 1 to 6.
10. A computer program product, comprising at least one executable instruction, wherein the executable instruction enables a processor to perform operations corresponding to the user prediction method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Target feature determination method and device
CN111340121A
Behavior prediction system updating method and device
CN111553754A