Potential user mining method and device
By narrowing and processing the user data set feature range and training the model with machine learning methods, the problem of low accuracy in potential user mining is solved, and the accuracy of user mining and the stability of the model is improved.
Patent Information
- Application Number
- CN202111613316.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2025-03-07
- Estimated Expiration
- 2041-12-27
AI Technical Summary
In the prior art, the accuracy of using CTR models to mine potential users is low, and the model is prone to overfitting the training set and the time difference between the training set and the online data is large, the accuracy decays quickly.
By processing the first data set, the second data set is obtained, and its characteristic range is not greater than the first data set, including user behavior data, project information, and user visit information. The model is then trained through machine learning methods and a target model is established to determine potential users.
It improves the accuracy of potential user mining, reduces the attenuation speed of the model, and is suitable for datasets where features vary greatly over time.
Smart Images

Figure CN114428900B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to a potential user mining method and device. Background Art
[0002] A large amount of online user behavior data has been accumulated through marketing apps. As the user base expands, due to the limitation of staff and energy, how to find potential users with strong purchasing intentions from the user base and improve the screening and identification capabilities of business opportunities and user conversion efficiency is an urgent problem to be solved. However, relying solely on business experience and basic data analysis, the value behaviors mined are relatively limited.
[0003] At the same time, as the business develops, the APP will be iteratively updated, the pages and behavior tracking points will change, and there will be differences between historical user data, project data and online data. Since the model needs to be evaluated offline before going online, after the model is online, the difference between online data and the data used for model training will be greater, and the model effect will decline rapidly.
[0004] In addition, model evaluation is required during model training, but there is a gap between model evaluation and business evaluation. Businesses cannot directly understand common indicators in the model, such as logloss, area under the curve (AUC), etc. How to select appropriate indicators and intuitively present them to the business side, respond to business changes, and provide timely and effective decision support is a threshold when the model is implemented.
[0005] At present, the commonly used technical solution for business requirements is to first clean and convert user features, and then use mainstream click-through-rate (CTR) prediction models, such as Wide&Deep, Factorisation-machine supported Neural Networks, referred to as FNN, Deep Interest Network, referred to as DIN algorithm to build models. The evaluation indicators used are usually logloss and ROC_AUC. Logloss pays more attention to the degree of consistency between the model prediction results and the observed data (for example: whether to click, whether to buy), and ROC AUC pays more attention to whether the order of recommended products can be better. These algorithms rely on user portraits and product attributes, and have good performance on data sets with a large number of discrete features. However, due to privacy protection, it is difficult to obtain user portraits, and the algorithm effect cannot meet expectations. The product attributes / project attributes in the CTR model change greatly over time. These algorithms are generally deep learning algorithms, which have high requirements on computing power and complex models, which makes it easy for the model to overfit in the training set. If the time difference between the training set and the online data is large, the model accuracy decays quickly. The commonly used evaluation indicators in CTR, logloss and ROC AUC, are both specific numbers, and the mathematical calculation logic in them is not intuitive for the business side.
[0006] In view of the technical problem in related technologies that the CTR model is used to mine potential users with low accuracy, no effective solution has been proposed yet. Summary of the invention
[0007] In view of this, the embodiments of the present disclosure provide a potential user mining method, device, electronic device and computer-readable storage medium to solve the technical problem of low accuracy in the prior art of mining potential users using a CTR model.
[0008] According to a first aspect of an embodiment of the present disclosure, a method for mining potential users is provided, comprising: processing a first data set to obtain a second data set; wherein a feature range described by the second data set is not greater than a feature range described by the first data set, and the first data set and the second data set include at least one of the following: user behavior data, project information, and user visit information; training a model through the second data set to obtain a target model, wherein the target model is a model established by machine learning; and determining potential users through the target model.
[0009] According to a second aspect of an embodiment of the present disclosure, a potential user mining device is provided, comprising: a first acquisition module, used to process a first data set to obtain a second data set; wherein the feature range described by the second data set is not greater than the feature range described by the first data set, and the first data set and the second data set include at least one of the following: user behavior data, project information, and user visit information; a second acquisition module, used to train a model through the second data set to obtain a target model, wherein the target model is a model established by machine learning; and a determination module, used to determine potential users through the target model.
[0010] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0011] According to a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0012] Compared with the prior art, the embodiments of the present disclosure have the following beneficial effects: a second data set is obtained by processing the first data set; wherein the feature range described by the second data set is not greater than the feature range described by the first data set, and the first data set and the second data set include at least one of the following: user behavior data, project information, and user visit information; a model is trained by the second data set to obtain a target model, wherein the target model is a model established by machine learning; and potential users are determined by the target model. In other words, the embodiments of the present disclosure establish a model by machine learning methods to automatically mine online behaviors and ultimately determine potential users, rather than using a CTR model to mine potential users in related technologies, which results in a technical problem of low accuracy in mining potential users, thereby achieving a technical effect of improving the accuracy of mining potential users. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0014] Figure 1 is a schematic diagram of an application scenario of an embodiment of the present disclosure;
[0015] Figure 2It is a flowchart of a potential user mining method provided by an embodiment of the present disclosure;
[0016] Figure 3 is a flow chart of another potential user mining method provided by an embodiment of the present disclosure;
[0017] Figure 4 is a schematic diagram of nearest neighbor values with a recall less than 0.2 and greater than 0.2 provided by an embodiment of the present disclosure;
[0018] Figure 5 is a flowchart of another potential user mining method provided by an embodiment of the present disclosure;
[0019] Figure 6 is a schematic diagram of the structure of a potential user mining device provided by an embodiment of the present disclosure;
[0020] Figure 7 1 is a schematic diagram of a potential user mining device provided by an embodiment of the present disclosure (I);
[0021] Figure 8 Schematic diagram of a potential user mining device provided by an embodiment of the present disclosure (II);
[0022] Fig. 9 Schematic diagram of a potential user mining device provided by an embodiment of the present disclosure (III);
[0023] Fig.10 Schematic diagram of a potential user mining device provided by an embodiment of the present disclosure (IV);
[0024] Fig.11 Schematic diagram of a potential user mining device provided by an embodiment of the present disclosure (V);
[0025] Fig.12 6 is a structural schematic diagram of a potential user mining device provided by an embodiment of the present disclosure;
[0026] Fig.13 7 is a structural diagram of a potential user mining device provided by an embodiment of the present disclosure;
[0027] Fig.14 It is a structural schematic diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] In the following description, specific details such as specific system structures and technologies are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present disclosure. However, it should be clear to those skilled in the art that the present disclosure may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obstructing the description of the present disclosure with unnecessary details.
[0029] A potential user mining method and device according to an embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0030] Figure 1 Schematic diagram of an application scenario of an embodiment of the present disclosure. The application scenario may include terminal devices 1, 2 and 3, a server 4 and a network 5.
[0031] Terminal devices 1, 2 and 3 can be hardware or software. When terminal devices 1, 2 and 3 are hardware, they can be various electronic devices with display screens and supporting communication with server 4, including but not limited to smart phones, tablet computers, laptop portable computers and desktop computers, etc.; when terminal devices 1, 2 and 3 are software, they can be installed in the electronic devices described above. Terminal devices 1, 2 and 3 can be implemented as multiple software or software modules, or as a single software or software module, and the embodiments of the present disclosure are not limited to this. Furthermore, various applications can be installed on terminal devices 1, 2 and 3, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.
[0032] The server 4 may be a server that provides various services, for example, a background server that receives a request sent by a terminal device that establishes a communication connection with the server, and the background server may receive and analyze the request sent by the terminal device, and generate a processing result. The server 4 may be a single server, or a server cluster composed of several servers, or a cloud computing service center, which is not limited in the embodiments of the present disclosure.
[0033] It should be noted that the server 4 can be hardware or software. When the server 4 is hardware, it can be various electronic devices that provide various services for the terminal devices 1, 2, and 3. When the server 4 is software, it can be multiple software or software modules that provide various services for the terminal devices 1, 2, and 3, or it can be a single software or software module that provides various services for the terminal devices 1, 2, and 3, and the embodiments of the present disclosure are not limited to this.
[0034] The network 5 can be a wired network connected by coaxial cable, twisted pair and optical fiber, or it can be a wireless network that can interconnect various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), infrared, etc., which is not limited in the embodiments of the present disclosure.
[0035] The user can establish a communication connection with the server 4 via the network 5 through the terminal devices 1, 2 and 3 to receive or send information, etc. Specifically, after the user imports the collected data of the points of interest into the server 4, the server 4 obtains the first data of the points of interest to be processed, which includes the first longitude and latitude and the first classification of the points of interest to be processed, and performs a conflict check on the points of interest to be processed according to the first longitude and latitude and the first classification; further, in the case of determining a conflict, the server 4 performs conflict processing on the points of interest to be processed to avoid a large amount of duplicate data and unavailable data in the database.
[0036] It should be noted that the specific types, quantities and combinations of the terminal devices 1, 2 and 3, the server 4 and the network 5 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present disclosure are not limited to this.
[0037] Figure 2 It is a flowchart of a potential user mining method provided by an embodiment of the present disclosure. Figure 2 The potential user mining method can be Figure 1 The terminal device or server executes it.
[0038] First, the application scenarios of the embodiments of the present disclosure are introduced. It should be noted that the application scenarios of the embodiments of the present disclosure include but are not limited to the following application scenarios.
[0039] Application scenario 1: In the new home sales of the real estate industry, the model established by the machine learning method of the embodiment of the present disclosure is used to mine potential users, and the potential users are pushed to the property consultant for offline telephone communication, thereby increasing the probability of users visiting the case site.
[0040] Application scenario 2: In the e-commerce field, the potential user mining method in the embodiment of the present disclosure is used to analyze the products that users are interested in, and then recommend the products of interest to target users.
[0041] Application scenario three: In the financial field, the model established by the machine learning method of the embodiment of the present disclosure is used to mine potential users, and then connect with offline sales and contact potential users to handle financial services, such as applying for credit cards, handling financial management services, etc.
[0042] Application scenario four: The training institution mines potential users through the model established by the machine learning method of the embodiment of the present disclosure, and then connects with offline sales and contacts target users to purchase examination courses, etc.
[0043] The following mainly introduces the specific implementation method in the above application scenario.
[0044] like Figure 2 As shown, the potential user mining method includes:
[0045] S201, processing the first data set to obtain a second data set;
[0046] It should be noted that the feature range described by the second data set is not greater than the feature range described by the first data set.
[0047] Optionally, the first data set and the second data set include but are not limited to: user behavior data, project information, and user visit information.
[0048] For example, the data of actively contacting the property consultant, the data of not generating online behavior visits, and the data of employees are filtered out from the first data set, and the remaining data is set as the second data set.
[0049] Optionally, the processing of the first data set to obtain the second data set may include:
[0050] S11, dividing the first data set into a first training set, a first validation set, and a first test set in chronological order;
[0051] For example, assuming that the last date of the data set is T, the first training set is divided into [T-51, T-21], the first validation set (T-21, T-14], and the first test set (T-14, T]) in chronological order.
[0052] S12, obtaining a distribution difference between the first training set and the first validation set, and filtering the first data set by the distribution difference to obtain the second data set.
[0053] Wherein, obtaining the distribution difference between the first training set and the first validation set, and filtering the first data set by the distribution difference to obtain the second data set may include:
[0054] S21, concatenating the first training set and the first validation set to obtain a third data set;
[0055] S22, using the first proportion of data in the third data set as a second training set, and using the second proportion of data in the third data set as a second test set;
[0056] S23, repeatedly performing the following steps until the area under the receiver operating characteristic curve ROC_AUC is less than a first threshold: creating a classifier, and obtaining the ROC_AUC and the most important feature of the classifier; determining whether the ROC_AUC is less than the first threshold; wherein the most important feature is the feature with the highest average gain among all classifications of each feature, and the feature corresponds to the data in the third data set.
[0057] It should be noted that in the disclosed embodiments, when performing feature screening, since the training set and the validation set are in different time periods, and the feature distribution will change over time, the traditional feature selection method cannot handle the distribution difference between the training set and the validation set, which easily leads to overfitting of the model in the training set, and ultimately leads to poor model performance. The disclosed embodiments use a method of constructing a sample classifier for feature screening, using ROC AUC as the feature difference, and obtaining features with large distribution differences through the classifier, and eliminating features with large differences. Therefore, the disclosed embodiments are suitable for data sets whose features change greatly over time.
[0058] When processing a data set, some parameters may be encountered, such as duplicate_rate and difference val_alpha. These parameters are difficult to determine through human intuition. At the same time, the strategy of data set processing has a great influence on the results. The disclosed embodiment also uses data sets and feature engineering as part of the hyperparameter search, which can more accurately find the threshold that should be selected during feature processing and improve the model accuracy.
[0059] In addition, it should be noted that the above classifiers include but are not limited to: Lightgbm classifier, decision tree classifier, random forest classifier, xgboost classifier, and logistic regression classifier.
[0060] Optionally, the first threshold may be 0.7.
[0061] Optionally, the processing of the first data set to obtain the second data set may further include:
[0062] S31, adding a ratio feature, wherein the ratio feature is used to describe the ratio of the data indicated by the first data set and the second data set to the corresponding total data.
[0063] For example, the ratio of the number of times a user visits a certain page to the number of times he visits all pages, the ratio of the time a user visits a certain project to the total time of his visits, the ratio of the number of inventory listings in a project to the total number of listings, etc.
[0064] Through the above steps, the first data set is filtered, which can effectively reduce the model decay rate.
[0065] S202, training a model using the second data set to obtain a target model, wherein the target model is a model established by machine learning;
[0066] Optionally, training the model through the second data set to obtain the target model may include:
[0067] S41, define the evaluation function partial PR_AUC;
[0068] S42, given the classification model hyperparameters, building a model on the second training set using the classification model, and using the second validation set for early stopping of training iterations;
[0069] It should be noted that the above classification models include but are not limited to: models established using lightgbm, xgboost classification models, and deepfm classification models.
[0070] S43, determining whether the partial PR_AUC of the model is improved on the second validation set;
[0071] S44, if the partial PR_AUC of the model is no longer improved on the second validation set, stop training and obtain the final partial PR_AUC value;
[0072] S45, determining whether the current search number reaches the maximum super-parameter search number;
[0073] It should be noted that the above-mentioned hyperparameter search includes but is not limited to: random search, grid search, and Bayesian search.
[0074] S46: If the judgment result is yes, the final partial PR_AUC value and the corresponding hyperparameters are used to train and obtain the target model.
[0075] Optionally, the above-defined evaluation function partial PR_AUC may include:
[0076] S51, calculating the precision P and recall R corresponding to all predicted values;
[0077] S52, determining whether the recall rate R is equal to the second threshold value, if not, obtaining the nearest value of the recall rate R less than the second threshold value and greater than the second threshold value, and putting the new coordinates into the PR coordinate point list;
[0078] It should be noted that the second threshold includes but is not limited to: 0.2.
[0079] S53, the recall rate R is calculated as the accuracy of the second threshold by the following formula (1):
[0080]
[0081] S54, selecting a point in the PR coordinate point list whose recall rate is less than or equal to the second threshold, and calculating the partial PR_AUC by the following formula (2):
[0082] pPR_AUC=∑ i (R i -R i-1 ) i (2).
[0083] In addition, the above calculation of the recall rate R being the accuracy of the second threshold may also include:
[0084] S61, setting the nearest neighbor value greater than the second threshold as the accuracy rate.
[0085] It should be noted that the above partial PR_AUC and visit rate recall table are because when the business goals are vague, the business side cannot give specific accuracy and recall rates. At the same time, with the change of business manpower, the final recall value can change. Through the visit rate recall table, the business side can select the number of user follow-ups through manpower. The quality of the results in the visit rate recall table needs to be converted into indicators and given to the model, so that the model can perform early stopping in the training phase and subsequent model selection can be performed. The most similar indicator is PR AUC, which is the area under the curve composed of recall rate and accuracy. However, due to the large online user base, the business side only has enough energy to care about the top users, while PR AUC focuses on all users. Therefore, it needs to be modified to partial PR_AUC to make the model training goals consistent with the business goals.
[0086] Through the above steps, a model can be established through machine learning methods to automatically mine online behaviors and ultimately identify potential users, thereby achieving the technical effect of improving the accuracy of potential user mining.
[0087] S203: determine potential users through the target model.
[0088] Optionally, the determining of potential users through the target model includes:
[0089] S71, using the target model to predict the visit probability of the second test set user;
[0090] S72: Select the user whose visit profile is greater than a third threshold as the potential user.
[0091] In summary, according to the technical solution provided by the embodiment of the present disclosure: a second data set is obtained by processing the first data set; wherein the feature range described by the second data set is not greater than the feature range described by the first data set, and the first data set and the second data set include at least one of the following: user behavior data, project information, and user visit information; a model is trained by the second data set to obtain a target model, wherein the target model is a model established by machine learning; potential users are determined by the target model. In other words, the embodiment of the present disclosure establishes a model by machine learning methods to automatically mine online behaviors and ultimately determine potential users, rather than using the CTR model to mine potential users in related technologies, which leads to a technical problem of low accuracy in mining potential users, thereby achieving a technical effect of improving the accuracy of mining potential users.
[0092] The following uses a real estate sales APP as an example to illustrate the embodiments of the present disclosure.
[0093] The data set used in this example mainly includes user online behavior, project information, and visit information. The data in this data set is sparse and contains a lot of 0 values. At the same time, its distribution will fluctuate over time, and some features will fluctuate greatly; project information is missing and lagging; user portrait data cannot be obtained. After obtaining the data set, the samples and features will be filtered, and feature engineering will be performed. After that, a model will be built to predict whether the user will visit through behavioral data and project information. The parameters required for the above sample and feature operations are searched together with the hyperparameters of the model. The selected parameters are then determined by the evaluation function of the test set. Finally, the model and the bucket accuracy of the model on the test set are obtained through the selected parameters, and the users who follow up after the model goes online are determined.
[0094] 1. Data acquisition: The data set uses the information of users who have been active in the last 51 days to aggregate the user's 90-day behavior. The main features are project features, user features, user project features, and whether y has been visited. Each behavior is a sample. The data set format is shown in Table 1:
[0095] Table 1
[0096]
[0097]
[0098] Project features: basic project information, POI information (Point of Interest, such as data on schools, tourist attractions, subways and buses around the project), sales information, inventory information, and project page visits.
[0099] User characteristics: user's all page visit statistics, duration statistics, search statistics.
[0100] User project characteristics: page statistics, behavior statistics, and duration statistics of users on specific projects.
[0101] 2. Dataset division: Since the data distribution of the dataset changes over time, the random division method cannot be used. The author divides the dataset as follows: Assuming that the last date of the dataset is T, divide the dataset into training set dataset_train[T-51, T-21], validation set dataset_val(T-21, T-14], and test set dataset_test(T-14, T] in chronological order.
[0102]
[0103] 3. Sample screening: keep samples that meet business logic. Use samples with a time difference of less than or equal to 14 days between the visit and the last active time, exclude samples that actively contact the property consultant, exclude samples that do not generate online behavior visits, and exclude samples that are employees.
[0104] 4. Eliminate features with many duplicate values. Features are statistics of users' online pages and click behaviors. Some pages have very few visits and behaviors are triggered, so the features contain a lot of 0 values. Such features contain very little information and introduce unnecessary complexity. The author deletes features with the same value ratio exceeding the given threshold duplicate_rate. In this project, the value range of duplicate_rate is [99%, 99.9%]
[0105] 5. Get the difference between the distribution of features of the training set and the validation set, and remove features with large distribution changes. Given the difference val_alpha, obtain features with large distribution differences through the following steps and remove these features with large differences.
[0106] a) Concatenate the training set dataset_train and the validation set dataset_val, delete the y feature, add a new column is_val, fill is_val with 0 if the sample is in the training set, and fill is_val with 1 if the sample is in the validation set, to form the new data dataset_dist.
[0107] b) Randomly sample dataset_dist and select 70% as the training set dataset_dist_train and 30% as the test set dataset_dist_test.
[0108] c) Use lightgbm to build a sample classifier. The training set of this sample classifier is dataset_dist_train, the test set is dataset_dist_test, the metric is ROC_AUC (ROC: receiver operating characteristic curve, the horizontal axis is the ratio of samples that are actually negative and are incorrectly judged as positive, the vertical axis is the ratio of samples that are actually positive and are correctly judged as positive; AUC: Area under Curve, the area under the curve), and the number of iterations is 100 times. This classifier is used to distinguish whether the data comes from the training set dataset_train or the validation set dataset_val. ROC_AUC is used as the standard for evaluating the quality of this classifier. If the ROC_AUC of the classifier is between 0.5-0.7, it means that the sample classifier cannot distinguish whether the sample comes from the training set dataset_train or the validation set dataset_val, and the distribution of the training set and the validation set in the original data is consistent; if the AUC is large, such as 0.9, it means that the sample classifier can easily distinguish the source of the sample, which indirectly indicates that there is a big difference between the training set and the validation set.
[0109] d) Obtain the ROC_AUC_1 of the classifier and the most important feature f_1 of this classifier, where the most important feature is the feature with the highest average gain in all classifications of each feature.
[0110] e) If ROC_AUC_1 is less than 0.7, stop; if ROC_AUC_1 is greater than or equal to 0.7, delete f_1 from the training set dataset_dist_train and the test set dataset_dist_test, repeat steps c and d, and obtain the ROC_AUC list [ROC_AUC_1, ROC_AUC_2, ROC_AUC_3, …, ROC_AUC_n] and its corresponding feature list [f_1, f_2, f_3, …, f_n] in turn.
[0111] f) Given the difference val_alpha, obtain the minimum ROC_AUC greater than val_alpha, for example, ROC_AUC_i, and obtain the list of features [f_1, f_2, f_3, ..., f_i] that have been deleted when obtaining this ROC_AUC_i. In this project, the val_alpha value range used by the author is [0.7, 1.0]. The specific process is shown as follows Figure 3 shown.
[0112] 6. Feature Engineering: Add proportion features, such as the proportion of the number of times a user visits a certain page to the number of times he visits all pages, the proportion of the time a user visits a certain project to the total time of his visits, the proportion of the number of inventory listings in a project to the total number of listings, etc.
[0113] 7. Define the evaluation function. The evaluation function I use is partial PR_AUC. Since the number of visitors accounts for about 2 / 1000, the samples are extremely unbalanced, and I am more concerned about positive samples, so I chose PR AUC. Assuming that the maximum recall rate of interest in this project is 0.2, the overall performance of the model, so partial PR_AUC is selected. The following is the specific calculation method of partial PR_AUC:
[0114] a) Calculate the accuracy P (accuracy = number of extracted positive samples / number of extracted samples, which is the probability of correct prediction) and recall R (recall = number of extracted positive samples / number of all positive samples in the sample, which is the proportion of positive samples found) corresponding to all predicted values, sort them from small to large according to the recall rate, and form the accuracy list [P1, P2, ..., Pn] and the recall list [R1, R2, ..., Rn]. With the recall rate as the horizontal axis and the accuracy rate as the vertical axis, form the PR coordinate point list [(P1, R1), (P2, R2), ..., (Pn, Rn),]
[0115] b) First determine whether there is a value with a recall rate of 0.2. If not, obtain the nearest values with a recall rate less than 0.2 and greater than 0.2. Figure 4 shown.
[0116] c) By Calculate the accuracy when the recall is 0.2. Put the new coordinates into the PR coordinate point list.
[0117] d) Select the points in the PR coordinate point list with a recall rate less than or equal to 0.2, and calculate partialPR_AUC using the following formula:
[0118]
[0119] 8. Model training. Given the lightgbm hyperparameters, build a model on the training set dataset_train through lightgbm, use the validation set dataset_val for early stopping of training iterations, and stop training if the partial PR_AUC of the model no longer improves on the validation set dataset_val, and record the final partial PR_AUC value.
[0120] 9. Parameter adjustment: In the given interval, randomly select the duplicate_rate used in step 4, the val_alpha used in step 5, and the model hyperparameters in step 8, re-execute steps 4-8 to the maximum number of iterations (e.g., 500 times), record the maximum partial PR_AUC value and its corresponding hyperparameters, and use these parameters to train the final model.
[0121] 10. Select through test set threshold. Use the final model to predict the test set, and divide the predicted y in the test set into buckets with about 200 samples per bucket to obtain the bucket interval, visit rate, recall rate and other information. The visit rate is the accuracy rate, and the name is changed for the convenience of business understanding. The details are shown in Table 2 below:
[0122] Table 2
[0123]
[0124] According to business needs, find the appropriate accuracy and recall rate, and push the samples whose predicted y is within the corresponding bucket range. The overall flow chart is shown in Figure 5.
[0125] In summary, the algorithm selected for the business scenario in the embodiment of the present disclosure is based on the gradient boosting tree (GradientBoosting Decison Tree, hereinafter referred to as GBDT) GBDT algorithm, which requires low computing power. At the same time, in order to solve the situation where the distribution of data changes greatly over time, a special feature selection method is introduced to find out the features with large distribution changes. The rules learned on these features are not applicable to online situations. Screening out these features can effectively reduce the model attenuation rate. A custom evaluation function is used for model evaluation, and the intermediate results can be converted into a user willingness intensity scoring table that is easy to understand on the business side, which is convenient for business use.
[0126] In other words, the disclosed embodiment builds a business opportunity recommendation system that enhances the conversion capability of self-channel customer acquisition. The model is established through machine learning methods to automatically discover valuable online behaviors. When processing data, the problem that data will change over time and cause the model to decline is given priority. Features with large distribution changes are automatically eliminated, and appropriate machine learning evaluation methods are selected. The final model results are presented in a report form that is easy for business to understand, so that business personnel can make quick decisions based on human resources conditions.
[0127] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0128] The following are embodiments of the device disclosed herein, which can be used to execute the method embodiments disclosed herein. For details not disclosed in the device embodiments disclosed herein, please refer to the method embodiments disclosed herein.
[0129] Figure 6 It is a schematic diagram of a potential user mining device provided by an embodiment of the present disclosure.
[0130] First, the application scenarios of the embodiments of the present disclosure are introduced. It should be noted that the application scenarios of the embodiments of the present disclosure include but are not limited to the following application scenarios.
[0131] Application scenario 1: In the new home sales of the real estate industry, the model established by the machine learning method of the embodiment of the present disclosure is used to mine potential users, and the potential users are pushed to the property consultant for offline telephone communication, thereby increasing the probability of users visiting the case site.
[0132] Application scenario 2: In the e-commerce field, the potential user mining device in the embodiment of the present disclosure is used to analyze the products that users are interested in, and then recommend the products of interest to target users.
[0133] Application scenario three: In the financial field, the model established by the machine learning method of the embodiment of the present disclosure is used to mine potential users, and then connect with offline sales and contact potential users to handle financial services, such as applying for credit cards, handling financial management services, etc.
[0134] Application scenario four: The training institution mines potential users through the model established by the machine learning method of the embodiment of the present disclosure, and then connects with offline sales and contacts target users to purchase examination courses, etc.
[0135] The following mainly introduces the corresponding device structure in the above application scenario.
[0136] like Figure 6 As shown, the potential user mining device includes:
[0137] The first acquisition module 601 is configured to process the first data set to obtain a second data set; wherein the feature range described by the second data set is not greater than the feature range described by the first data set, and the first data set and the second data set include at least one of the following: user behavior data, project information, and user visit information;
[0138] For example, the data of actively contacting the property consultant, the data of not generating online behavior visits, and the data of employees are filtered out from the first data set, and the remaining data is set as the second data set.
[0139] like Figure 7 As shown, the first acquisition module 601 includes:
[0140] A division unit 701 is used to divide the first data set into a first training set, a first validation set, and a first test set in chronological order;
[0141] For example, assuming that the last date of the data set is T, the first training set is divided into [T-51, T-21], the first validation set (T-21, T-14], and the first test set (T-14, T]) in chronological order.
[0142] The acquisition unit 702 is used to acquire the distribution difference between the first training set and the first validation set, and filter the first data set by the distribution difference to obtain the second data set.
[0143] Among them, Figure 8 As shown, the acquisition unit 702 includes:
[0144] A concatenation subunit 801 is used to concatenate the first training set and the first validation set to obtain a third data set;
[0145] A first setting subunit 802, using a first proportion of data in the third data set as a second training set, and using a second proportion of data in the third data set as a second test set;
[0146] The processing subunit 803 is used to repeatedly perform the following steps until the area under the receiver operating characteristic curve ROC_AUC is less than a first threshold: create a classifier, and obtain the ROC_AUC and the most important feature of the classifier; determine whether the ROC_AUC is less than the first threshold; wherein the most important feature is the feature with the highest average gain in all classifications of each feature, and the feature corresponds to the data in the third data set.
[0147] It should be noted that in the disclosed embodiments, when performing feature screening, since the training set and the validation set are in different time periods, and the feature distribution will change over time, the traditional feature selection method cannot handle the distribution difference between the training set and the validation set, which easily leads to overfitting of the model in the training set, and ultimately leads to poor model performance. The disclosed embodiments use a method of constructing a sample classifier for feature screening, using ROC AUC as the feature difference, and obtaining features with large distribution differences through the classifier, and eliminating features with large differences. Therefore, the disclosed embodiments are suitable for data sets whose features change greatly over time.
[0148] When processing a data set, some parameters may be encountered, such as duplicate_rate and difference val_alpha. These parameters are difficult to determine through human intuition. At the same time, the strategy of data set processing has a great influence on the results. The disclosed embodiment also uses data sets and feature engineering as part of the hyperparameter search, which can more accurately find the threshold that should be selected during feature processing and improve the model accuracy.
[0149] In addition, it should be noted that the above classifiers include but are not limited to: Lightgbm classifier, decision tree classifier, random forest classifier, xgboost classifier, and logistic regression classifier.
[0150] Optionally, the first threshold may be 0.7.
[0151] Alternatively, if Fig. 9 As shown, the first acquisition module 601 includes:
[0152] The adding unit 901 is used to add a ratio feature, wherein the ratio feature is used to describe the ratio of the data indicated by the first data set and the second data set to the corresponding total data.
[0153] For example, the ratio of the number of times a user visits a certain page to the number of times he visits all pages, the ratio of the time a user visits a certain project to the total time of his visits, the ratio of the number of inventory listings in a project to the total number of listings, etc.
[0154] By filtering the first data set through the above device, the model decay rate can be effectively reduced.
[0155] A second acquisition module 602 is configured to train a model using the second data set to obtain a target model, wherein the target model is a model established by machine learning;
[0156] Alternatively, if Fig.10 As shown, the second acquisition module 602 may include:
[0157] A definition unit 1001 is used to define an evaluation function partial PR_AUC;
[0158] An establishing unit 1002 is used for giving a classification model hyperparameter, establishing a model on the second training set through the classification model, and using the second validation set for early stopping of training iterations;
[0159] It should be noted that the above classification models include but are not limited to: models established using lightgbm, xgboost classification models, and deepfm classification models.
[0160] A first judging unit 1003 is used to judge whether the partial PR_AUC of the model is improved on the second validation set;
[0161] A first training unit 1004 is used to stop training when the partial PR_AUC of the model on the second validation set is no longer improved, and obtain a final partial PR_AUC value;
[0162] The second judgment unit 1005 is used to judge whether the current search times reaches the maximum super parameter search times;
[0163] It should be noted that the above-mentioned hyperparameter search includes but is not limited to: random search, grid search, and Bayesian search.
[0164] The second training unit 1006 is used to train the target model using the final partial PR_AUC value and the corresponding hyperparameters when the judgment result is yes.
[0165] Alternatively, if Fig.11 As shown, the definition unit 1001 includes:
[0166] The first calculation subunit 1101 is used to calculate the precision P and the recall R corresponding to all the predicted values;
[0167] The judging subunit 1102 is used to judge whether the value of the recall rate R equal to the second threshold exists. If not, obtain the nearest value of the recall rate R less than the second threshold and greater than the second threshold, and put the new coordinates into the PR coordinate point list;
[0168] It should be noted that the second threshold includes but is not limited to: 0.2.
[0169] The second calculation subunit 1103 is used to calculate the accuracy of the recall rate R being the second threshold value by the following formula (1):
[0170]
[0171] The third calculation subunit 1004 is used to select a point in the PR coordinate point list whose recall rate is less than or equal to the second threshold, and calculate the partial PR_AUC by the following formula (2):
[0172] pPR_AUC=∑ i (R i -R i-1 ) i (2).
[0173] In addition, if Fig.12 As shown, the definition unit 1001 may further include:
[0174] The second setting subunit 1201 is used to set the nearest neighbor value greater than the second threshold as the accuracy rate.
[0175] It should be noted that the above partial PR_AUC and visit rate recall table are because when the business goals are vague, the business side cannot give specific accuracy and recall rates. At the same time, with the change of business manpower, the final recall value can change. Through the visit rate recall table, the business side can select the number of user follow-ups through manpower. The quality of the results in the visit rate recall table needs to be converted into indicators and given to the model, so that the model can perform early stopping in the training phase and subsequent model selection can be performed. The most similar indicator is PR AUC, which is the area under the curve composed of recall rate and accuracy. However, due to the large online user base, the business side only has enough energy to care about the top users, while PR AUC focuses on all users. Therefore, it needs to be modified to partial PR_AUC to make the model training goals consistent with the business goals.
[0176] Through the above-mentioned device, a model can be established through machine learning methods to automatically mine online behaviors, and ultimately potential users can be determined, thereby achieving the technical effect of improving the accuracy of potential user mining.
[0177] The determination module 603 is configured to determine potential users through the target model.
[0178] Alternatively, if Fig.13 As shown, the above-mentioned determination module 603 includes:
[0179] A prediction subunit 1301 is used to predict the visit probability of the second test set user using the target model;
[0180] The selection subunit 1302 is used to select the user whose visit profile is greater than a third threshold as the potential user.
[0181] In summary, according to the technical solution provided by the embodiment of the present disclosure: a second data set is obtained by processing the first data set; wherein the feature range described by the second data set is not greater than the feature range described by the first data set, and the first data set and the second data set include at least one of the following: user behavior data, project information, and user visit information; a model is trained by the second data set to obtain a target model, wherein the target model is a model established by machine learning; potential users are determined by the target model. In other words, the embodiment of the present disclosure establishes a model by machine learning methods to automatically mine online behaviors and ultimately determine potential users, rather than using the CTR model to mine potential users in related technologies, which leads to a technical problem of low accuracy in mining potential users, thereby achieving a technical effect of improving the accuracy of mining potential users.
[0182] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present disclosure.
[0183] Fig.14 Schematic diagram of an electronic device 14 provided in an embodiment of the present disclosure. Fig.14 As shown, the electronic device 14 of this embodiment includes: a processor 1401, a memory 1402, and a computer program 1403 stored in the memory 1402 and executable on the processor 1401. When the processor 1401 executes the computer program 1403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 1401 executes the computer program 1403, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0184] Exemplarily, the computer program 1403 may be divided into one or more modules / units, which are stored in the memory 1402 and executed by the processor 1401 to complete the present disclosure. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 1403 in the electronic device 14.
[0185] The electronic device 14 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 14 may include, but is not limited to, a processor 1401 and a memory 1402. Those skilled in the art will appreciate that Fig.14 This is only an example of the electronic device 14 and does not constitute a limitation on the electronic device 14. The electronic device 14 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0186] The processor 1401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0187] The memory 1402 may be an internal storage unit of the electronic device 14, for example, a hard disk or memory of the electronic device 14. The memory 1402 may also be an external storage device of the electronic device 14, for example, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the electronic device 14. Further, the memory 1402 may also include both an internal storage unit of the electronic device 14 and an external storage device. The memory 1402 is used to store computer programs and other programs and data required by the electronic device. The memory 1402 may also be used to temporarily store data that has been output or is to be output.
[0188] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0189] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0190] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this disclosure.
[0191] In the embodiments provided in the present disclosure, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of devices or units, which may be electrical, mechanical or other forms.
[0192] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0193] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0194] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, and the computer program code may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electric carrier signals and telecommunication signals.
[0195] The above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should all be included in the protection scope of the present disclosure.
Claims
1. A potential user mining method, characterized in that: include: Processing the first data set to obtain a second data set; wherein the feature range described by the second data set is not greater than the feature range described by the first data set, and the first data set and the second data set include at least one of the following: user behavior data, project information, and user visit information; Training a model using the second data set to obtain a target model, wherein the target model is a model established by machine learning; Determining potential users through the target model; Among them, training the model through the second data set to obtain the target model includes: defining an evaluation function partial PR_AUC; given the classification model hyperparameters, building a model on the second training set through the classification model, and using the second validation set for early stopping of training iterations; judging whether the partial PR_AUC of the model is improved on the second validation set; if the partial PR_AUC of the model is no longer improved on the second validation set, stopping the training to obtain the final partial PR_AUC value; judging whether the current search number reaches the maximum hyperparameter search number; if the judgment result is yes, using the final partial PR_AUC value and the corresponding hyperparameters to train and obtain the target model; The definition of the evaluation function partial PR_AUC includes: calculating the accuracy P and recall R corresponding to all predicted values; determining whether a value with the recall R equal to the second threshold exists; if not, obtaining the nearest value with the recall R less than the second threshold and greater than the second threshold, and placing the new coordinates into the PR coordinate point list; and calculating the accuracy with the recall R equal to the second threshold by the following formula (1): (1) in, is the minimum value for which the recall is less than 0.2, for The corresponding accuracy; is the maximum value with a recall greater than 0.2, for The corresponding accuracy, y is the recall rate obtained by the difference The accuracy is 0.2; Select a point in the PR coordinate point list whose recall rate is less than or equal to the second threshold, and calculate the partial PR_AUC using the following formula (2): (2); The processing of the first data set to obtain the second data set includes: dividing the first data set into a first training set, a first validation set, and a first test set in chronological order; obtaining a distribution difference between the first training set and the first validation set, and filtering the first data set by the distribution difference to obtain the second data set; Among them, the obtaining of the distribution difference between the first training set and the first validation set, and filtering the first data set by the distribution difference to obtain the second data set includes: concatenating the first training set and the first validation set to obtain a third data set; using a first proportion of data in the third data set as a second training set, and using a second proportion of data in the third data set as a second test set; repeating the following steps until the area under the receiver operating characteristic curve ROC_AUC is less than a first threshold: creating a classifier, and obtaining the ROC_AUC and the most important feature of the classifier; judging whether the ROC_AUC is less than the first threshold; wherein the most important feature is the feature with the highest average gain in all classifications of each feature, and the feature corresponds to the data in the third data set.
2. The method according to claim 1, characterized in that The processing of the first data set to obtain the second data set further includes: A ratio feature is added, wherein the ratio feature is used to describe the ratio of the data indicated by the first data set and the second data set to the corresponding total data.
3. The method according to claim 1, characterized in that Calculating the recall rate R to be the accuracy of the second threshold also includes: The nearest neighbor value greater than the second threshold is set as the accuracy rate.
4. The method according to claim 1, characterized in that: Determining potential users through the target model includes: Predicting the visit probability of users of the second test set using the target model; The user whose user visit profile is greater than a third threshold is selected as the potential user.
5. The method according to claim 1, characterized in that The classifier includes at least one of the following: Lightgbm classifier, decision tree classifier, random forest classifier, xgboost classifier, logistic regression classifier.
6. The method according to claim 1, characterized in that The classification model includes at least one of the following models: Models built using lightgbm, xgboost classification models, and deepfm classification models.
7. The method according to claim 1, characterized in that The hyperparameter search includes at least one of the following: Random search, grid search, Bayesian search.
8. A potential user mining device, characterized in that: include: A first acquisition module is used to process the first data set to obtain a second data set; wherein the feature range described by the second data set is not greater than the feature range described by the first data set, and the first data set and the second data set include at least one of the following: user behavior data, project information, and user visit information; A second acquisition module is used to train a model using the second data set to obtain a target model, wherein the target model is a model established by machine learning; A determination module, used for determining potential users through the target model; The second acquisition module is also used to define an evaluation function partial PR_AUC; given a classification model hyperparameter, a model is established on a second training set through the classification model, and a second validation set is used for early stopping of training iterations; it is determined whether the partial PR_AUC of the model is improved on the second validation set; if the partial PR_AUC of the model is no longer improved on the second validation set, training is stopped to obtain a final partial PR_AUC value; it is determined whether the current search number reaches a maximum hyperparameter search number; if the judgment result is yes, the final partial PR_AUC value and the corresponding hyperparameters are used to train and obtain the target model; The second acquisition module is also used to calculate the accuracy P and recall R corresponding to all predicted values; determine whether the value of the recall R equal to the second threshold exists, if not, obtain the nearest value of the recall R less than the second threshold and greater than the second threshold, and put the new coordinates into the PR coordinate point list; calculate the accuracy of the recall R equal to the second threshold by the following formula (1): (1) in, is the minimum value for which the recall is less than 0.2, for The corresponding accuracy; is the maximum value with a recall greater than 0.2, for The corresponding accuracy, y is the recall rate obtained by the difference The accuracy is 0.2; Select a point in the PR coordinate point list whose recall rate is less than or equal to the second threshold, and calculate the partial PR_AUC using the following formula (2): (2); The first acquisition module is further used to divide the first data set into a first training set, a first validation set, and a first test set in chronological order; obtain the distribution difference between the first training set and the first validation set, and filter the first data set by the distribution difference to obtain the second data set; The first acquisition module is also used to splice the first training set and the first validation set to obtain a third data set; use a first proportion of data in the third data set as a second training set, and use a second proportion of data in the third data set as a second test set; repeat the following steps until the area under the receiver operating characteristic curve ROC_AUC is less than a first threshold: create a classifier, and obtain the ROC_AUC and the most important feature of the classifier; determine whether the ROC_AUC is less than the first threshold; wherein the most important feature is the feature with the highest average gain in all classifications of each feature, and the feature corresponds to the data in the third data set.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Product potential user mining method and device
CN107657267A
Network fraud number detection method and system, storage medium and terminal equipment
CN113591924A
Potential customer pushing method and device, and electronic equipment
CN113723997A
