Prediction Method, Device, Electronic Device and Readable Storage Medium for User Types

By combining historical feature sequences and current features, input into the pre-trained user type prediction model, the problem of failure to effectively consider the current time point characteristics in the prior art is solved, and the accuracy of user type prediction is improved.

CN109815980BActive Publication Date: 2025-06-20BEIJING SANKUAI ONLINE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201811549960.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-12-18
Publication Date
2025-06-20
Estimated Expiration
2038-12-18

AI Technical Summary

Technical Problem

When predicting user types, the prior art fails to effectively consider the characteristics of the current time point, resulting in low label prediction accuracy.

Method used

By combining historical feature sequences and current features, input into a pre-trained user type prediction model to predict the type of target user. The model uses a time-based machine learning model, and the training samples include reference features, historical feature sequences, and reference user types.

Benefits of technology

Improve the accuracy of user type prediction, and enhance the performance of the prediction model by taking into account the combination of current features and historical feature sequences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109815980B_ABST
    Figure CN109815980B_ABST
Patent Text Reader

Abstract

Embodiments of the present disclosure provide a method, apparatus, electronic device, and readable storage medium for predicting user types. The method includes: generating current features of a target user based on the behavior data and scenario information of the target user at the current time; generating a historical feature sequence of the target user based on the behavior data and historical user types of the target user in a target historical time period; inputting the current features and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user, where the user type prediction model is trained using a user type sample on a time series-based machine learning model, and the user type sample includes reference features, a historical feature sequence, and reference user types. The user type can be predicted jointly by the historical feature sequence and the current features, which helps to improve the accuracy of prediction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular, to a method, apparatus, electronic device, and readable storage medium for predicting user types. Background Art

[0002] Personalized recommendation recommends different objects, such as products, merchants, services, etc., to different users according to user characteristics and real-time scenario characteristics, so as to improve the access rate, conversion rate, etc. of products and services. Among them, user characteristics include user types, and the preferred objects of different user types have certain characteristics, making the determination of user types an important part of personalized recommendation.

[0003] In the prior art, the patent application with the application number CN107644047A proposed a tag prediction method and apparatus, which can use tags to describe user types. The main steps include: selecting a target tag and determining the starting time point of the historical tag time series of the target tag, where the target tag is the tag to be predicted, determining variables that have a causal relationship with the target tag, and the variables include tags and / or attributes, predicting the value of the target tag at the target time point according to a preset time series, where the preset time series includes the historical tag time series of the target tag and the historical time series of the variables, or the preset time series includes the historical time series of the variables, and the starting time point of the historical time series of the variables is the same as the starting time point of the historical tag time series of the target tag, and the target time point is the current time point or a time point after the current time point.

[0004] In summary, the above solution only determines the tag corresponding to the current time point or a time point after the current time point through historical tags and variables, without considering the current characteristics of the prediction time point, resulting in a low prediction accuracy of the tag. Summary of the Invention

[0005] Embodiments of the present disclosure provide a method, apparatus, electronic device, and readable storage medium for predicting user types, which can jointly predict user types through historical feature sequences and current features, helping to improve the prediction accuracy.

[0006] According to a first aspect of the embodiments of the present disclosure, there is provided a method for predicting user types, the method including:

[0007] Generating current features of the target user based on the behavior data and scenario information of the target user at the current time;

[0008] Generating a historical feature sequence of the target user based on the behavior data and historical user types of the target user in a target historical time period;

[0009] Input the current feature and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user. The user type prediction model is trained using user type samples on a time series-based machine learning model. The user type samples include reference features, historical feature sequences, and reference user types.

[0010] According to a second aspect of the embodiments of the present disclosure, there is provided a device for predicting user types, the device comprising:

[0011] A current feature generation module, configured to generate the current feature of the target user according to the behavior data and scenario information of the target user at the current time;

[0012] A historical feature sequence generation module, configured to generate the historical feature sequence of the target user according to the behavior data and historical user types of the target user in the target historical time period;

[0013] A user type prediction module, configured to input the current feature and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user. The user type prediction model is trained using user type samples on a time series-based machine learning model. The user type samples include reference features, historical feature sequences, and reference user types.

[0014] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, comprising:

[0015] A processor, a memory, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the foregoing method for predicting user types is implemented.

[0016] According to a fourth aspect of the embodiments of the present disclosure, there is provided a readable storage medium, wherein when the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the foregoing method for predicting user types.

[0017] In the embodiments of the present disclosure, all actions of obtaining signals, information, or data are carried out on the premise of complying with the corresponding data protection regulations and policies of the country where the location is located and obtaining the authorization given by the owner of the corresponding device.

[0018] Embodiments of the present disclosure provide a method and apparatus for predicting user types. The method includes: generating current features of a target user based on the behavior data and scenario information of the target user at the current time; generating a historical feature sequence of the target user based on the behavior data and historical user types of the target user in a target historical period; inputting the current features and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user. The user type prediction model is trained using a machine learning model based on time series with user type samples, and the user type samples include reference features, historical feature sequences, and reference user types. The user type can be predicted jointly through the historical feature sequence and the current features, which helps to improve the accuracy of prediction. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for the description of the embodiments of the present disclosure. Obviously, the following described drawings are only some embodiments of the embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained without creative efforts based on these drawings.

[0020] Figure 1 Shows a flowchart of the steps of a method for predicting user types in an embodiment of the present disclosure;

[0021] Figure 2 Shows a flowchart of the steps of a method for predicting user types in another embodiment of the present disclosure;

[0022] Figure 3 Shows a schematic structural diagram of a training network model of the present disclosure;

[0023] Figure 4 Shows a structural diagram of a user type prediction apparatus in an embodiment of the present disclosure;

[0024] Figure 5 Shows a structural diagram of a user type prediction apparatus in another embodiment of the present disclosure;

[0025] Figure 6 Shows a structural diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0026] Next, the technical solutions in the embodiments of the present disclosure will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the embodiments of the present disclosure without creative efforts belong to the scope protected by the embodiments of the present disclosure.

[0027] Embodiment 1

[0028] Refer to Figure 1 , which shows a flowchart of the steps of a method for predicting user types in an embodiment of the present disclosure, as follows.

[0029] Step 101: Generate the current features of the target user based on the behavior data and scenario information of the target user at the current time.

[0030] Among them, the current features include but are not limited to: real-time commodity information, cellular type.

[0031] The cellular type is divided according to the type of mobile communication network. For example, GSM (Global System for Mobile Communication), CDMA (Code Division Multiple Access), FDMA (Frequency Division Multiple Access), TDMA (Time Division Multiple Access), etc. The cellular type can be obtained from the scenario information.

[0032] The behavior data includes other behaviors of the user such as commodity consumption behavior, so that real-time commodity information can be extracted from the consumption behavior.

[0033] Step 102: Generate the historical feature sequence of the target user based on the behavior data and historical user types of the target user in the target historical period.

[0034] Among them, the target historical period is used to determine the historical feature sequence, which is a specified period before the current time. The longer the target historical period, the longer the historical feature sequence, and the more behavior data, the longer the obtained historical feature sequence. In practical applications, the historical period can be appropriately lengthened within a reasonable range to ensure that the length of the historical feature sequence is sufficient and the computational complexity is relatively low.

[0035] The historical feature sequence can be arranged in chronological order by multiple historical features and corresponding historical user types. Among them, the historical features include but are not limited to: average consumption level, consumption frequency, consumption categories, comments.

[0036] It can be understood that the average consumption level can be the cost of a single consumption. For example, if a user makes 4 purchases, and the costs of each purchase are 50, 80, 40, and 150 respectively, then the average consumption level is (50 + 80 + 40 + 150) / 4 = 80.

[0037] The consumption frequency can be the number of purchases within a unit of time. For example, if the number of purchases in a month is 4, then the consumption frequency is 4 times per month.

[0038] The consumption categories can be the product categories divided by the platform or country, such as vegetables, meats.

[0039] The comment is the evaluation and score of the merchant and product by the target user for the consumption.

[0040] It can be understood that the above-mentioned average consumption level, consumption frequency, consumption categories, and comments can all be statistically obtained from the behavioral data of the user in the historical time period.

[0041] Step 103: Input the current feature and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user. The user type prediction model is trained by using user type samples for a time-series based machine learning model. The user type samples include reference features, historical feature sequences, and reference user types.

[0042] Among them, the user type prediction model is used to predict the type of the user according to the current feature and the historical feature sequence of the user.

[0043] The types of users can be classified by occupation as: students, white-collar workers, workers, etc., or can be classified by age as children, adults, the elderly, etc. In addition, different types can be combined. For example, by combining age and occupation, we can get adult white-collar workers, adult workers, elderly white-collar workers, elderly workers, etc.

[0044] The reference features are generated according to the scenario information when predicting the user type, representing the scenario features during prediction.

[0045] The historical feature sequence is generated according to the historical information, representing the features of the specified historical time period before prediction.

[0046] The reference user type is the label of the sample, used to supervise the training process.

[0047] In summary, the embodiments of the present disclosure provide a method for predicting user types. The method includes: generating current features of a target user based on the behavior data and scenario information of the target user at the current time; generating a historical feature sequence of the target user based on the behavior data and historical user types of the target user in a target historical time period; inputting the current features and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user. The user type prediction model is trained using user type samples on a time-series based machine learning model. The user type samples include reference features, historical feature sequences, and reference user types. The user type can be predicted jointly by the historical feature sequence and the current features, which helps to improve the accuracy of the prediction.

[0048] Embodiment 2

[0049] Refer to Figure 2 , which shows a specific step flowchart of the method for predicting user types in another embodiment of the present disclosure, as follows.

[0050] Step 201, for each candidate user, determine the address type of the address where the candidate user is located at multiple candidate times, and the user type corresponding to the address type.

[0051] Among them, the candidate user can be a user accessing the application platform, and the application platform has the function of address positioning.

[0052] It can be understood that the address type can be a school, an office building, a shopping mall, a park, a hotel, an Internet cafe, etc. In practical applications, the address type often indicates the user type. For example, users who are often in school can be students or teachers, those who are often in office buildings can be white-collar workers, those who are often in shopping malls can be shopping mall staff, and those who are often in parks can be park staff.

[0053] It should be noted that for each candidate user, they can be in different addresses at different candidate times, thus corresponding to different address types. That is: each candidate user will have multiple address types, and each address type can determine a user type.

[0054] Step 202, for each address type of each candidate user, calculate the confidence score of the address type according to the candidate time.

[0055] Among them, the confidence score of the address type represents the confidence level of the address type. The higher the confidence score, the higher the confidence level; the lower the confidence score, the lower the confidence level. Thus, the user type corresponding to the address type with a higher confidence score can be used as the user type of the candidate user.

[0056] Specifically, the confidence score can decay over time and increase as the occurrence count of the address type increases. In addition, the confidence score is also related to the proportion of the address type in the total number of all address types and the confidence level of the address type.

[0057] Optionally, in another embodiment of the present disclosure, the above step 202 includes sub-steps 2021 to 2024:

[0058] Step 2021, calculate the time weight parameter of the address type according to the candidate time and the preset reference time.

[0059] Wherein, the reference time is a preset time, so as to calculate the decay parameter of the candidate time relative to this reference time. It can be understood that the reference time can be set according to the actual application scenario, and the embodiments of the present disclosure do not limit it.

[0060] Specifically, the time weight parameter T(t) can be obtained according to the following calculation formula:

[0061]

[0062] Wherein, T(t0) is the time weight parameter corresponding to the reference time t0, t is the candidate time, and λ is the decay rate parameter, λ>0.

[0063] It can be understood that both T(t0) and λ can be set according to the actual application scenario, and the embodiments of the present disclosure do not limit them.

[0064] It can be seen from the above formula that the smaller t is, the smaller the time weight parameter is, and the corresponding confidence score is smaller; the larger t is, the larger the time weight parameter is, and the corresponding confidence score is larger. For example, the time weight parameter corresponding to the candidate time September 25, 2018 is larger than the time weight parameter corresponding to the candidate time April 10, 2018.

[0065] Step 2022, calculate the proportion parameter of the address type according to the number of the address type and the number of the other address types of the candidate user.

[0066] Specifically, if the address type is the jth address type, the proportion parameter can be calculated according to the following formula:

[0067]

[0068] Wherein, m is the number of candidate times, that is, the number of times the address type is determined. If the address type is determined each time an order is placed, then m is the number of orders. It can be understood that m is the sum of the number of the address type and the number of the other address types of the candidate user.

[0069] j is the identifier of the jth address type, z iis the value of the address type corresponding to the i-th order. When z i takes the value of j, I(z i = j) takes the value of 1; when z i does not take the value of j, I(z i = j) takes the value of 0.

[0070] In practical applications, in order to avoid the situation where the proportion parameter is 0, Laplace smoothing can be used. The proportion parameter φ of the j-th address type j can be specifically calculated with reference to the following formula:

[0071]

[0072] where k is the total number of values of the address type, that is, the value range of j. For example, if there are 20 address types, then k is 20.

[0073] Step 2023, calculate the confidence parameter of the address type.

[0074] Specifically, the confidence parameter of the address type can be calculated with reference to the following formula:

[0075]

[0076] where n = u + v, p = u / n, u is the number of target types, v is the number of non-target types, and Z α is the quantile of the normal distribution, usually taking the value of 2.

[0077] Step 2024, calculate the product of the time weight parameter, the proportion parameter, and the confidence parameter to obtain the confidence score of the address type.

[0078] Specifically, the confidence score SC of the address type can be calculated according to the following formula:

[0079] SC = T(t)·φ j ·S(5)

[0080] It can be understood that SC can also be further deformed from the above formula.

[0081] From the above formula, it can be seen that the larger T(t) is, the larger φ j is, the larger S is, and the larger the confidence score is; the smaller T(t) is, the smaller φ j is, the smaller S is, and the smaller the confidence score is.

[0082] Step 203, generate a user type sample set according to the confidence score.

[0083] Specifically, first, for each candidate user, determine the user type according to the confidence score; then, use the set of candidate users for which the user type has been determined as the user type sample set.

[0084] Optionally, in another embodiment of the present disclosure, step 203 above includes sub-steps 2031 to 2034:

[0085] Sub-step 2031, for each candidate user, select the user type corresponding to the address type with the confidence score greater than the preset confidence score threshold and the maximum confidence score as the reference user type of the candidate user.

[0086] Among them, the confidence score threshold can be set according to the actual application scenario, and the embodiments of the present invention do not limit it.

[0087] In the embodiments of the present disclosure, when the confidence scores of all address types of a candidate user are less than the confidence score threshold, the user type of the candidate user cannot be determined, and the candidate user is not used as a sample in the user type sample set; when the confidence scores of some address types of a candidate user are greater than the confidence score threshold, take the user type corresponding to the address type with the maximum confidence score as the reference user type, and use the candidate user and the address type as training samples.

[0088] Sub-step 2032, for each candidate user, generate the reference features of the candidate user based on the behavior data and scenario information of the candidate user at the reference time.

[0089] Among them, the reference time can be the time when the user address is obtained. It can be understood that the reference time can be a historical time.

[0090] The steps for generating the reference features can refer to the detailed description of step 101 and will not be elaborated here.

[0091] Sub-step 2033, for each candidate user, generate the historical feature sequence of the candidate user based on the behavior data and the true user type of the candidate user in the reference historical time period, where the reference historical time period is a specified time period before the reference time.

[0092] It can be seen that the historical feature sequence of the candidate user is obtained relative to the reference time.

[0093] The steps for generating the historical feature sequence of the candidate user can refer to the detailed description of step 102 and will not be elaborated here.

[0094] Sub-step 2034, use the reference features, historical feature sequence, and reference user type of the candidate user as samples in the user type sample set.

[0095] Among them, the reference features and the historical feature sequence are used to predict the user type, and the reference user type is used for supervised learning.

[0096] It can be understood that each sample in the user type sample set is the reference features, the historical feature sequence, and the reference user type of a candidate user.

[0097] Step 204, train a user type prediction model according to the user type sample set.

[0098] Embodiments of the present disclosure can use a network composed of three network models, namely FM (Factorization Machines), RNN (Recurrent Neural Net), and MLP (Multi-Layer Perceptron), to train the user type prediction model.

[0099] Optionally, in another embodiment of the present disclosure, the above step 204 includes sub-steps 2041 to 2046:

[0100] Sub-step 2041, input the historical feature sequence of the candidate user into the cascade network to obtain the first prediction vector of the user type. The cascade network is composed of multiple factorization machines and multiple recurrent neural network units. The input of each factorization machine is each historical feature in the historical feature sequence. The input of the first recurrent neural network unit is the output of the first factorization machine. The input of the recurrent neural network units other than the first recurrent neural network unit is the output of the previous-level factorization machine and the output of the corresponding factorization machine. The input of the type prediction unit is the output of the last recurrent neural network unit and the current feature, and the output is the type of the target user.

[0101] Among them, the factorization network is a factorization machine.

[0102] As Figure 3 shown, the historical feature sequence is generated using data for three months. The data for each month is used as a node. For example, X0, X1, and X2 are samples generated from the data for the first, second, and third months respectively.

[0103] It can be understood that in practical applications, a longer historical feature sequence can also be used for training. In this case, the number of RNN and FM needs to be increased.

[0104] Sub-step 2042, input the reference features of the candidate user into the multi-layer perceptron network to obtain the second prediction vector of the user type.

[0105] As Figure 3As shown, the reference feature X is input into the MLP to obtain a prediction vector based on the reference feature X.

[0106] Sub-step 2043: Concatenate the first prediction vector and the second prediction vector into a third prediction vector, and determine the predicted value of the user type according to the third prediction vector.

[0107] As Figure 3 shown, the type prediction unit can obtain the user type according to the first prediction vector and the second prediction vector. First, concatenate the first prediction vector and the second prediction vector into a third prediction vector; then, input the third prediction vector into the probability formula to obtain a probability result, and take the type with the maximum probability as the predicted value.

[0108] It can be understood that the first prediction vector can be concatenated after the second prediction vector, or the second prediction vector can be concatenated after the first prediction vector. The embodiment of the present invention does not limit the concatenation order.

[0109] Sub-step 2044: Calculate the loss value according to the predicted value of the user type and the sample value.

[0110] Among them, the loss value can preferably adopt the logarithmic loss function, and can also be calculated using the squared loss function, absolute value loss function, exponential loss function, hinge loss function, etc.

[0111] Sub-step 2045: When the loss value is less than the preset loss threshold, end the training, and the cascade network and multi-layer perceptron network in the current state are the user type prediction model.

[0112] Among them, the loss threshold can be set according to the actual application scenario. It can be understood that when the loss threshold is large, the training time is short, and the accuracy of the user type prediction model is low; when the loss threshold is small, the training time is long, and the accuracy of the user type prediction model is high.

[0113] Sub-step 2046: When the loss value is greater than or equal to the preset loss threshold, adjust the state parameters of the cascade network and multi-layer perceptron network to continue the training.

[0114] It can be understood that continue the training until the loss value is less than the loss value threshold, end the training, and obtain the user type prediction model.

[0115] Step 205: Generate the current features of the target user according to the behavior data and scenario information of the target user at the current time.

[0116] This step can refer to the detailed description of step 101 and will not be elaborated here.

[0117] Step 206: Generate the historical feature sequence of the target user based on the behavior data of the target user in the target historical time period and the historical user type.

[0118] This step can refer to the detailed description of step 102 and will not be elaborated here.

[0119] Step 207: Input the current feature and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user. The user type prediction model is trained using user type samples on a time series-based machine learning model. The user type samples include reference features, historical feature sequences, and reference user types.

[0120] This step can refer to the detailed description of step 103 and will not be elaborated here.

[0121] In summary, the embodiments of the present disclosure provide a method for predicting user types. The method includes: generating the current feature of the target user based on the behavior data and scenario information of the target user at the current time; generating the historical feature sequence of the target user based on the behavior data of the target user in the target historical time period and the historical user type; inputting the current feature and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user. The user type prediction model is trained using user type samples on a time series-based machine learning model. The user type samples include reference features, historical feature sequences, and reference user types. The user type can be predicted jointly by the historical feature sequence and the current feature, which helps to improve the accuracy of prediction.

[0122] Embodiment III

[0123] Refer to Figure 4 , which shows the structural diagram of a user type prediction device in another embodiment of the present disclosure, as follows.

[0124] The current feature generation module 301 is configured to generate the current feature of the target user based on the behavior data and scenario information of the target user at the current time.

[0125] The historical feature sequence generation module 302 is configured to generate the historical feature sequence of the target user based on the behavior data of the target user in the target historical time period and the historical user type.

[0126] The user type prediction module 303 is configured to input the current feature and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user. The user type prediction model is trained using user type samples on a time series-based machine learning model. The user type samples include reference features, historical feature sequences, and reference user types.

[0127] In summary, the embodiments of the present disclosure provide a prediction device for user types. The device includes: a current feature generation module, configured to generate the current features of the target user according to the behavior data and scenario information of the target user at the current time; a historical feature sequence generation module, configured to generate the historical feature sequence of the target user according to the behavior data and historical user types of the target user in the target historical time period; a user type prediction module, configured to input the current features and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user. The user type prediction model is trained by using user type samples for a time-series based machine learning model. The user type samples include reference features, historical feature sequences, and reference user types. The user type can be predicted jointly by the historical feature sequence and the current features, which helps to improve the accuracy of the prediction.

[0128] Embodiment III is the corresponding device embodiment of Embodiment I. For detailed description, reference can be made to Embodiment I, which will not be elaborated here.

[0129] Embodiment IV

[0130] Refer to Figure 5 , which shows the structural diagram of the prediction device for user types in an embodiment of the present disclosure, as follows.

[0131] An address type determination module 401, configured to determine, for each candidate user, the address type of the address where the candidate user is located at multiple candidate times, and the user type corresponding to the address type.

[0132] A confidence score determination module 402, configured to calculate the confidence score of each address type for each candidate user according to the candidate time.

[0133] A sample set generation module 403, configured to generate a user type sample set according to the confidence score.

[0134] A model training module 404, configured to train a user type prediction model according to the user type sample set.

[0135] A current feature generation module 405, configured to generate the current features of the target user according to the behavior data and scenario information of the target user at the current time.

[0136] A historical feature sequence generation module 406, configured to generate the historical feature sequence of the target user according to the behavior data and historical user types of the target user in the target historical time period.

[0137] A user type prediction module 407, configured to input the current features and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user. The user type prediction model is trained by using user type samples on a time series-based machine learning model. The user type samples include reference features, historical feature sequences, and reference user types.

[0138] Optionally, in another embodiment of the present disclosure, the above-mentioned confidence score determination module 402 includes:

[0139] A time weight parameter calculation sub-module, configured to calculate the time weight parameter of the address type according to the candidate time and a preset reference time.

[0140] A proportion parameter calculation sub-module, configured to calculate the proportion parameter of the address type according to the number of the address type and the number of the other address types of the candidate user.

[0141] A confidence parameter sub-module, configured to calculate the confidence parameter of the address type.

[0142] A confidence score calculation sub-module, configured to calculate the product of the time weight parameter, the proportion parameter, and the confidence parameter to obtain the confidence score of the address type.

[0143] Optionally, in another embodiment of the present disclosure, the above-mentioned sample set generation module 403 includes:

[0144] A user type selection sub-module, configured to, for each candidate user, select the user type corresponding to the address type with the confidence score greater than a preset confidence score threshold and the maximum confidence score as the reference user type of the candidate user.

[0145] A reference feature generation sub-module, configured to, for each candidate user, generate the reference features of the candidate user according to the behavior data and scenario information of the candidate user at the reference time.

[0146] A candidate historical feature sequence generation sub-module, configured to, for each candidate user, generate the historical feature sequence of the candidate user according to the behavior data and the true user type of the candidate user in a reference historical time period. The reference historical time period is a specified time period before the reference time.

[0147] A sample generation sub-module, configured to use the reference features, historical feature sequences, and reference user types of the candidate user as samples in the user type sample set.

[0148] Optionally, in another embodiment of the present disclosure, the above-mentioned model training module 404 includes:

[0149] The first prediction sub-module is configured to input the historical feature sequence of the candidate user into a cascaded network to obtain a first prediction vector of the user type. The cascaded network is composed of multiple factorizers and multiple recurrent neural network units. The input of each factorizer is each historical feature in the historical feature sequence. The input of the first recurrent neural network unit is the output of the first factorizer. The input of the recurrent neural network units other than the first recurrent neural network unit is the output of the previous-level factorizer and the output of the corresponding factorizer. The input of the type prediction unit is the output of the last recurrent neural network unit and the current feature, and the output is the type of the target user.

[0150] The second prediction sub-module is configured to input the reference features of the candidate user into a multi-layer perceptron network to obtain a second prediction vector of the user type.

[0151] The prediction value determination sub-module is configured to splice the first prediction vector and the second prediction vector into a third prediction vector, and determine the prediction value of the user type according to the third prediction vector.

[0152] The loss value calculation sub-module is configured to calculate the loss value according to the prediction value of the user type and the sample value.

[0153] The training end sub-module is configured to end the training when the loss value is less than a preset loss threshold. The current-state cascaded network and multi-layer perceptron network are the user type prediction model.

[0154] The training continuation sub-module is configured to adjust the state parameters of the cascaded network and the multi-layer perceptron network to continue the training when the loss value is greater than or equal to the preset loss threshold.

[0155] In summary, the embodiments of the present disclosure provide a user type prediction device, which includes: an address type determination module for determining, for each candidate user, the address type of the address where the candidate user is located at multiple candidate times, and the user type corresponding to the address type; a confidence score determination module for calculating, for each address type of each candidate user, the confidence score of the address type according to the candidate time; a sample set generation module for generating a user type sample set according to the confidence score; a model training module for training a user type prediction model according to the user type sample set; a current feature generation module for generating the current features of the target user based on the behavior data and scenario information of the target user at the current time; a historical feature sequence generation module for generating a historical feature sequence of the target user based on the behavior data and historical user types of the target user in a target historical time period; a user type prediction module for inputting the current features and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user, where the user type prediction model is trained by using user type samples on a time-series-based machine learning model, and the user type samples include reference features, historical feature sequences, and reference user types. The user type can be predicted jointly by the historical feature sequence and the current features, which helps to improve the accuracy of the prediction.

[0156] Embodiment 4 is the corresponding device embodiment of Embodiment 2. For the detailed description, reference can be made to Embodiment 2, and details will not be repeated here.

[0157] The embodiments of the present disclosure also provide an electronic device, referring to Figure 6 , including: a processor 501, a memory 502, and a computer program 5021 stored on the memory 502 and executable on the processor. When the processor 501 executes the program, it implements the user type prediction method of the foregoing embodiments.

[0158] The embodiments of the present disclosure also provide a readable storage medium. When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device can execute the user type prediction method of the foregoing embodiments.

[0159] For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the partial description of the method embodiments.

[0160] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. A variety of general-purpose systems may also be used in conjunction with the teachings presented herein. The structure required to construct such systems will be apparent from the above description. Additionally, embodiments of the present disclosure are not directed to any particular programming language. It should be understood that the teachings of the embodiments of the present disclosure described herein can be implemented in a variety of programming languages, and the description of a particular language above is for the purpose of disclosing the best mode of the embodiments of the present disclosure.

[0161] In the specification provided herein, numerous specific details are set forth. However, it can be understood that embodiments of the present disclosure may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0162] Similarly, it should be understood that, in order to streamline the present disclosure and assist in understanding one or more of the various inventive aspects, in the above description of the exemplary embodiments of the present disclosure, the various features of the embodiments of the present disclosure are sometimes grouped together into a single embodiment, figure, or description thereof. However, the disclosed method should not be construed as reflecting an intention that the claimed embodiments of the present disclosure require more features than are expressly recited in each claim. Rather, as reflected in the following claims, the inventive aspects lie in less than all the features of the single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into the detailed description, with each claim standing on its own as a separate embodiment of the present disclosure.

[0163] Those skilled in the art will appreciate that the modules in the devices in the embodiments can be adaptively changed and disposed in one or more devices different from the embodiments. The modules or units or components in the embodiments can be combined into one module or unit or component, and in addition, they can be divided into multiple sub-modules or sub-units or sub-components. Except that at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all the features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all the processes or units of any method or device so disclosed. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) can be replaced by an alternative feature that provides the same, equivalent, or similar purpose.

[0164] Each component embodiment of the embodiments of the present disclosure may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components in the prediction device for user types according to the embodiments of the present disclosure. The embodiments of the present disclosure may also be implemented as a device or apparatus program for performing part or all of the methods described herein. Such a program implementing the embodiments of the present disclosure may be stored on a computer-readable medium, or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, or provided on a carrier signal, or in any other form.

[0165] It should be noted that the above embodiments illustrate the embodiments of the present disclosure rather than limit the embodiments of the present disclosure, and those skilled in the art can design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in the claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The embodiments of the present disclosure can be implemented by means of hardware including several different elements and by means of a suitably programmed computer. In the unit claims listing several devices, several of these devices may be embodied by the same item of hardware. The use of the words first, second, and third, etc. does not denote any order. These words may be interpreted as names.

[0166] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.

[0167] The above are only the preferred embodiments of the embodiments of the present disclosure, and are not intended to limit the embodiments of the present disclosure. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the embodiments of the present disclosure shall be included in the protection scope of the embodiments of the present disclosure.

[0168] The above is only the specific implementation manner of the embodiments of the present disclosure, but the protection scope of the embodiments of the present disclosure is not limited thereto. Any person skilled in the art can easily think of changes or replacements within the technical scope disclosed by the embodiments of the present disclosure, and all of them should be covered by the protection scope of the embodiments of the present disclosure. Therefore, the protection scope of the embodiments of the present disclosure shall be subject to the protection scope of the claims.

Claims

1. A method for predicting user types, characterized in that, The method includes: Generating the current features of the target user according to the behavior data and scenario information of the target user at the current time; Generating a historical feature sequence of the target user according to the behavior data and historical user type of the target user in a target historical time period; Inputting the current features and the historical feature sequence into a user type prediction model to obtain the type of the target user. The user type prediction model is trained by using user type samples on a time series-based machine learning model. The user type samples include reference features, historical feature sequences, and reference user types; The user type prediction model is trained through the following steps: For each candidate user, determining the address type of the address where the candidate user is located at multiple candidate times, and the user type corresponding to the address type; For each address type of each candidate user, calculating the confidence score of the address type according to the candidate time; Generating a user type sample set according to the confidence scores; Training a user type prediction model according to the user type sample set; The step of training a user type prediction model according to the user type sample set includes: Inputting the historical feature sequence of the candidate user into a cascade network to obtain a first prediction vector of the user type. The cascade network is composed of multiple factorizers and multiple recurrent neural network units. The input of each factorizer is each historical feature in the historical feature sequence. The input of the first recurrent neural network unit is the output of the first factorizer. The input of the recurrent neural network units other than the first recurrent neural network unit is the output of the previous-level factorizer and the output of the corresponding factorizer. The input of the type prediction unit is the output of the last recurrent neural network unit and the current features, and the output is the type of the target user; Inputting the reference features of the candidate user into a multi-layer perceptron network to obtain a second prediction vector of the user type; Concatenating the first prediction vector and the second prediction vector into a third prediction vector, and determining the predicted value of the user type according to the third prediction vector; Calculating a loss value according to the predicted value and the sample value of the user type; When the loss value is less than a preset loss threshold, ending the training, and the cascade network and multi-layer perceptron network in the current state are the user type prediction model; When the loss value is greater than or equal to the preset loss threshold, adjusting the state parameters of the cascade network and multi-layer perceptron network to continue the training.

2. The method according to claim 1, characterized in that, The step of calculating the confidence score of the address type according to the candidate time includes: Calculating the time weight parameter of the address type according to the candidate time and a preset reference time; Calculating the proportion parameter of the address type according to the number of the address types and the number of the other address types of the candidate user; Calculating the confidence parameter of the address type; Calculating the product of the time weight parameter, the proportion parameter, and the confidence parameter to obtain the confidence score of the address type.

3. The method according to claim 1, characterized in that, The step of generating a user type sample set according to the confidence scores includes: For each candidate user, select the user type corresponding to the address type with the confidence score greater than the preset confidence score threshold and the maximum confidence score as the reference user type of the candidate user; For each candidate user, generate the reference features of the candidate user based on the behavior data and scenario information of the candidate user at the reference time; For each candidate user, generate the historical feature sequence of the candidate user based on the behavior data and the true user type of the candidate user in the reference historical time period, where the reference historical time period is a specified time period before the reference time; Use the reference features, historical feature sequence, and reference user type of the candidate user as samples in the user type sample set.

4. A device for predicting user types, characterized in that, The device includes: A current feature generation module, configured to generate the current features of the target user based on the behavior data and scenario information of the target user at the current time; A historical feature sequence generation module, configured to generate the historical feature sequence of the target user based on the behavior data and historical user type of the target user in the target historical time period; A user type prediction module, configured to input the current features and the historical feature sequence into a pre-trained user type prediction model to obtain the type of the target user. The user type prediction model is trained using a machine learning model based on time series with user type samples, and the user type samples include reference features, historical feature sequence, and reference user type; The user type prediction model is trained through the following steps: For each candidate user, determine the address type of the address where the candidate user is located at multiple candidate times, and the user type corresponding to the address type; For each address type of each candidate user, calculate the confidence score of the address type according to the candidate time; Generate a user type sample set according to the confidence score; Train a user type prediction model according to the user type sample set; The step of training the user type prediction model according to the user type sample set includes: Input the historical feature sequence of the candidate user into a cascade network to obtain a first prediction vector of the user type. The cascade network is composed of multiple factorizers and multiple recurrent neural network units. The input of each factorizer is each historical feature in the historical feature sequence. The input of the first recurrent neural network unit is the output of the first factorizer. The input of the recurrent neural network units other than the first recurrent neural network unit is the output of the previous-level factorizer and the output of the corresponding factorizer. The input of the type prediction unit is the output of the last recurrent neural network unit and the current feature, and the output is the type of the target user; Input the reference features of the candidate user into a multi-layer perceptron network to obtain a second prediction vector of the user type; Concatenate the first prediction vector and the second prediction vector into a third prediction vector, and determine the predicted value of the user type according to the third prediction vector; Calculate the loss value according to the predicted value and the sample value of the user type; When the loss value is less than the preset loss threshold, end the training, and the cascade network and multi-layer perceptron network in the current state are the user type prediction model; When the loss value is greater than or equal to the preset loss threshold, adjust the state parameters of the cascade network and multi-layer perceptron network to continue the training.

5. The device according to claim 4, wherein, The user type prediction model is obtained by training through the following modules: An address type determination module, configured to determine, for each candidate user, the address type of the address where the candidate user is located at multiple candidate times, and the user type corresponding to the address type; A confidence score determination module, configured to calculate, for each address type of each candidate user, the confidence score of the address type according to the candidate time; A sample set generation module, configured to generate a user type sample set according to the confidence score; A model training module, configured to train a user type prediction model according to the user type sample set.

6. The device according to claim 5, wherein, The confidence score determination module includes: A time weight parameter calculation sub-module, configured to calculate the time weight parameter of the address type according to the candidate time and the preset reference time; A proportion parameter calculation sub-module, configured to calculate the proportion parameter of the address type according to the number of the address type and the number of the other address types of the candidate user; A confidence parameter sub-module, configured to calculate the confidence parameter of the address type; A confidence score calculation sub-module, configured to calculate the product of the time weight parameter, the proportion parameter, and the confidence parameter to obtain the confidence score of the address type.

7. The device according to claim 6, wherein, The sample set generation module includes: A user type selection sub-module, configured to select, for each candidate user, the user type corresponding to the address type with the confidence score greater than the preset confidence score threshold and the maximum confidence score as the reference user type of the candidate user; A reference feature generation sub-module, configured to generate, for each candidate user, the reference feature of the candidate user according to the behavior data and scenario information of the candidate user at the reference time; A candidate historical feature sequence generation sub-module, configured to generate, for each candidate user, the historical feature sequence of the candidate user according to the behavior data and the true user type of the candidate user in the reference historical time period, where the reference historical time period is a specified time period before the reference time; A sample generation sub-module, configured to use the reference feature, historical feature sequence, and reference user type of the candidate user as samples in the user type sample set.

8. The device according to claim 7, wherein, The model training module includes: The first prediction sub-module is configured to input the historical feature sequence of the candidate user into a cascaded network to obtain a first prediction vector of the user type. The cascaded network is composed of multiple factorizers and multiple recurrent neural network units. The input of each factorizer is each historical feature in the historical feature sequence. The input of the first recurrent neural network unit is the output of the first factorizer. The input of the recurrent neural network units other than the first recurrent neural network unit is the output of the upper-level factorizer and the output of the corresponding factorizer. The input of the type prediction unit is the output of the last recurrent neural network unit and the current feature, and the output is the type of the target user; The second prediction sub-module is configured to input the reference feature of the candidate user into a multi-layer perceptron network to obtain a second prediction vector of the user type; The prediction value determination sub-module is configured to splice the first prediction vector and the second prediction vector into a third prediction vector, and determine the prediction value of the user type according to the third prediction vector; The loss value calculation sub-module is configured to calculate a loss value according to the prediction value of the user type and the sample value; The training end sub-module is configured to end the training when the loss value is less than a preset loss threshold, and the cascaded network and the multi-layer perceptron network in the current state are the user type prediction model; The training continuation sub-module is configured to adjust the state parameters of the cascaded network and the multi-layer perceptron network to continue the training when the loss value is greater than or equal to the preset loss threshold.

9. An electronic device, wherein, Comprising: A processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the processor implements the prediction method of the user type as described in any one of claims 1-3 when executing the program.

10. A readable storage medium, wherein, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is enabled to execute the prediction method of the user type as described in any one of claims 1-3 of the method claims.

Citation Information

Patent Citations

  • Label prediction and generation method and device

    CN107644047A

  • Data search processing method and device

    CN104778176A

  • Model training method and device, service recommendation method and device, and electronic equipment

    CN108875776A