Feature processing method and device, electronic equipment and storage medium
Through the decision tree model and model interpretation method, the relationship between user retention and feature is analyzed, and the problems of low data processing efficiency and predictive black box in the prior art are solved, and more transparent and interpretable user retention feature analysis is achieved.
Patent Information
- Application Number
- CN202411498993.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-18
AI Technical Summary
The existing technology is not efficient when processing large-scale data, and it is difficult to cope with the growing amount and complexity of data. At the same time, the predictive black box of artificial intelligence models lacks transparency and interpretability to the relationship between user retention and feature.
The decision tree model analyzes the relationship between user retention and retention features, and uses the model interpretation method to interpret the decision tree to obtain the corresponding relationship between each retention feature and user retention.
It improves the transparency and interpretability of the relationship between user retention and features, accurately captures the impact of retention features on user retention, and improves prediction accuracy.
Smart Images

Figure CN119476528A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and specifically to a feature processing method, device, electronic device and storage medium. Background Art
[0002] In terms of identifying the correlation between features and user retention, current technologies mainly rely on data analysis methods. These methods usually use a series of statistical indicators, such as frequency analysis, correlation analysis, etc., to reveal the relationship between user retention and features.
[0003] However, data analysis methods are inefficient when processing large-scale data and have difficulty coping with the growing volume and complexity of data. Therefore, in order to solve the problems of data analysis methods and with the development of artificial intelligence, the use of artificial intelligence models to predict the impact of features on user retention has been developed.
[0004] However, the prediction of the artificial intelligence model is a black box mode, which can only predict which features have an impact on user retention. The relationship between user retention and features has poor transparency and interpretability. Summary of the invention
[0005] The embodiments of the present application provide a feature processing method, device, electronic device and storage medium, which analyze the relationship between user retention and retention features through a decision tree model, can explain the relationship between user retention and retention features, and improve the transparency of the relationship between user retention and features.
[0006] In a first aspect, an embodiment of the present application provides a feature processing method, including:
[0007] Acquire multiple first feature values and prediction labels of each first target user of the multiple first target users under the multiple first retention features, wherein the prediction label of each first target user is used to indicate the retention status of each first target user;
[0008] Performing model training based on multiple first feature values of each first target user under multiple first retained features and a predicted label of each first target user to obtain a target decision tree;
[0009] The target decision tree is explained by using a model interpretation method, and the corresponding relationship between each first retention feature and user retention is obtained.
[0010] In a second aspect, an embodiment of the present application provides a feature processing device, including: an acquisition unit and a processing unit;
[0011] The acquisition unit is used to acquire a plurality of first feature values of each first target user of the plurality of first target users under a plurality of first retention features, and a prediction label, wherein the prediction label of each first target user is used to indicate the retention status of each first target user;
[0012] The processing unit is used to perform model training based on multiple first feature values of each first target user under multiple first retention features and the predicted label of each first target user to obtain a target decision tree; interpret the target decision tree using a model interpretation method, and interpret the target decision tree using a model interpretation method to obtain a corresponding relationship between each first retention feature and user retention.
[0013] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory, wherein the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device performs the method described in the first aspect.
[0014] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0015] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0016] Implementing the embodiments of the present application has the following beneficial effects:
[0017] It can be seen that in the implementation mode of the present application, after obtaining the feature value and prediction label of the target user under the retention feature, a training sample is constructed, and the training sample is used to train the decision tree. In this way, during the training process, the decision tree will consider the contribution of each retention feature to the prediction error, so that it can accurately capture the impact of the retention feature on user retention, accurately predict the correspondence between user retention and each retention feature, and use the model interpretation method to clearly explain the correspondence between user retention and each retention feature, thereby improving the transparency of the relationship between user retention and features. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0019] Figure 1 A schematic diagram of a feature processing system provided in an embodiment of the present application;
[0020] Figure 2 A flowchart of a feature processing method provided in an embodiment of the present application;
[0021] Figure 3 A schematic diagram of feature crossover and bundling provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of reducing the dimension of retained features provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of feature processing and feature verification provided in an embodiment of the present application;
[0024] Figure 6 A schematic diagram of a feature dependency graph provided in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of a feature processing device provided in an embodiment of the present application;
[0026] Figure 8 A schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0028] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0029] Reference to "embodiments" herein means that a particular feature, result, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0030] In order to facilitate understanding of the technical solution of the present application, the relevant terms of the present application are first explained and illustrated.
[0031] Reactivation: Reactivation refers to reactivating users who have downloaded the app but have not used it for a long time, in order to increase their activity and frequency of use on the app. For example, these users can be activated by placing deep links in external applications. For ease of understanding, this application refers to users who participate in activation, such as old users who click into the app through deep links, as activation users. For the sake of convenience, this application may also refer to activation users as target users. The two are essentially the same and do not need to be distinguished.
[0032] Retention: refers to the behavior of users visiting the application again after they have visited it. Corresponding to retention, this application refers to the features that affect user retention, that is, the features that affect users' subsequent visits to the application as retention features. For example, the quality and amount of information published on the application are features that affect users' subsequent visits. The quality and amount of information of the content can be called retention features; and users who visit the application again in the future are called retained users. According to different time intervals, retention can be divided into: next-day retention, nearly 7-day retention, next-month retention, etc. This application mainly uses the nearly 7-day retention as an example for explanation.
[0033] t-distributed Stochastic Neighbor Embedding (t-SNE): A nonlinear dimensionality reduction technique for high-dimensional data visualization that can map high-dimensional data into a two-dimensional space for easier observation and analysis.
[0034] SHapley Additive exPlanations (SHAP): A method for explaining the predictions of machine learning models based on Shapley values in game theory, which is used to quantify the contribution of each feature to the model's prediction results.
[0035] Synthetic Minority Oversampling Technique (SMOT): An oversampling method for dealing with imbalanced datasets that increases the number of minority class samples by generating synthetic samples between existing minority class samples, thereby improving the model's ability to recognize minority classes.
[0036] Bayesian Optimization (BO): An algorithm for optimizing an objective function, particularly when the objective function is expensive to evaluate or when gradient information is difficult to obtain directly.
[0037] See also Figure 1 , Figure 1 Schematic diagram of a feature processing system provided in an embodiment of the present application. Figure 1 As shown, the feature processing system includes: a control console 10, a user terminal 20 and a feature processing device 30;
[0038] Exemplarily, the console 10 provides a visual interface, so that the operation and maintenance personnel can configure the feature analysis task through the console 10, and the console 10 will send the feature analysis task to the feature processing device 30. Then, in response to the feature analysis task, the feature processing device 30 can deliver activation links through multiple activation channels, so that different users can access through the activation links when using the user terminal 20, thereby achieving the target user, and such users are called first target users. Then, the feature processing device 30 can obtain the behavioral information during the user access process, thereby obtaining multiple first feature values of each first target user under multiple first retention features, and after activating the first target user, the feature processing device 30 will also obtain the future activity of each first target user, and based on the future activity of each first target user, determine the predicted label of each first target user, and use the multiple first feature values and predicted labels of each first target user as a training sample.
[0039] Furthermore, the feature processing device 30 performs model training based on multiple first feature values of each first target user under multiple first retention features and the predicted label of each first target user to obtain a target decision tree, and uses a model interpretation method to interpret the target decision tree to obtain the corresponding relationship between each first retention feature and user retention.
[0040] It can be seen that this application predicts the impact of retention features on user retention through model learning, so that a large amount of sample data can be used to learn the intrinsic correlation between retention features and user retention, thereby improving prediction accuracy.
[0041] Accordingly, the operation and maintenance personnel can query the progress and details of the feature analysis task through the visual interface of the console 10, etc. Accordingly, the feature processing device 30 will return the feature analysis results, such as the score of each first retention feature, to the console 10, so as to display the score of each first retention feature on the visual interface of the console 10, so as to facilitate the operation and maintenance personnel to clearly know the impact of each first retention feature on user retention, and to achieve the relationship between the predicted retention feature and the user retention, and to explain this relationship, so as to improve the transparency of the relationship between the retention feature and the user retention.
[0042] See also Figure 2 , Figure 2 A flow chart of a feature processing method provided in an embodiment of the present application. The method is applied to the above-mentioned feature processing device. The method includes but is not limited to the following steps:
[0043] 201: Obtain multiple first feature values of each first target user of multiple first target users under multiple first retention features and a prediction label, wherein the prediction label of each first target user is used to indicate the retention status of each first target user.
[0044] Among them, the first target user is the user who participates in the activation of the target application. The target application can be any type of application, and this application does not limit this. Exemplarily, an activation link can be placed on an external application, such as a deep link, so that the user can jump to the homepage of the target application through the activation link, and the user can browse the content published on the target application on the homepage. This application refers to the user who jumps to the target application through the activation link as the first target user. Furthermore, since the activation is aimed at old users who have downloaded the target application, the first target user is an old user who jumps to the target application through the activation link and has previously downloaded the target application.
[0045] The content published on the target application can be any type of user-generated content, such as images, videos, text, graphics, and notes. This application mainly uses notes as an example for explanation, and all subsequent content can be understood as notes.
[0046] The multiple first retention features are related features that affect whether the user is retained. Exemplarily, the multiple first user retention features mainly include features in three dimensions, specifically including: portrait features, behavior features, and content features.
[0047] Optionally, the portrait features include but are not limited to: age, gender, city level, and activation channel, wherein the activation channel is used to characterize the channel through which the user jumps to the target application.
[0048] Optionally, the behavior characteristics refer to the behavior characteristics of users when browsing content in the target application, including but not limited to: exposure, clicks, attention, forwarding, collection, sharing, commenting, etc.
[0049] Optionally, content features refer to features of content browsed by the user on the target application, including but not limited to: author gender, author age, whether it is graphic, amount of information, whether it is a real shot, aesthetic score, composition, and the like.
[0050] Exemplarily, firstly, the original feature value of each first target user under multiple first retained features is obtained.
[0051] It can be understood that the original feature value of each of the above-mentioned first target users under each of the first retention features is essentially the specific value of the first target user under the first retention feature, and the specific value is obtained by counting the behavior of the first target user by the feature processing device. Therefore, the original feature value corresponding to the above-mentioned exposure amount is the number of contents exposed to each first target user after each first target user jumps to the target application, which can also be understood as the number of contents browsed by each first target user. Correspondingly, the original feature value corresponding to the number of clicks is the number of contents clicked by the first target user, and the original feature values corresponding to the number of attentions, forwardings, collections, shares, and comments are deduced accordingly, and are not repeated one by one; the original feature value corresponding to the above-mentioned author's gender is the number of contents published by authors of each gender in the content exposed to the user, counted according to the author's gender. For example, the original feature value is the number of contents published by male authors in the exposed content; The original feature value corresponding to the author's age includes the number of contents of each age group counted in the content exposed to the user; the original feature value corresponding to whether it is a picture or text includes the number of picture and text contents, the number of video contents, and so on in the content exposed to the user; the amount of information is the number of contents corresponding to each amount of information in the content exposed to the user; the original feature value corresponding to whether it is a real shot includes the number of real shot contents and the number of non-real shot contents in the content exposed to the user; the original feature value corresponding to the aesthetic score includes the number of contents of each aesthetic score level in the content exposed to the user; the original feature value corresponding to the composition feature includes the number of contents corresponding to various composition features in the content exposed to the user.
[0052] Optionally, the original feature value of each first target user under each first retention feature may be obtained by counting the behavior of each first target user within a first preset time period, wherein the start time of the first preset time period may be the time when the first target user is detected to enter the homepage of the target application. For example, for the original feature value corresponding to the exposure amount, after the first target user is detected to enter the homepage of the target application, the amount of content exposed to the first target user within the first preset time period may be counted.
[0053] Then, since the target users' behaviors are relatively sparse and there are many activation channels, the original feature values have more noise and are relatively sparse. Therefore, data processing is performed on the original feature values of each first target user under multiple first retention features to obtain multiple first feature values of each first target user under multiple first retention features.
[0054] Optionally, data processing includes automatically filling in missing data. For example, since the behavior of the target user is relatively sparse, the target user may not have behavior under many retention features, that is, no data. Therefore, if the first target user does not have behavior under a first retention feature, the original feature value of the first target user under the first retention feature can be set to 0, that is, the missing data is automatically filled in with 0.
[0055] Optionally, data processing includes truncating or removing outliers. Exemplarily, if the original eigenvalue of any first target user in the exposure dimension is greater than a first threshold, the original eigenvalue of the first target user in the exposure dimension is set to the first threshold. It can be understood that since the proportion of users with the first eigenvalue in the exposure dimension is very small, truncating the first eigenvalue of such users will not affect the training accuracy of the model. If the original eigenvalue of any first target user in the age dimension is greater than a second threshold, the first target user is removed.
[0056] Optionally, data processing includes data conversion. Since the behavior of the target user is relatively sparse, and the behavioral gap between different target users is relatively large, there are many outlier original eigenvalues between different first target users. Therefore, if the original eigenvalue is used directly, the gap between the original eigenvalues of each first target user under the same first retention feature is relatively large, which is not conducive to model convergence. Therefore, the original eigenvalues under some of the first retention features are first converted into ratios, and the converted ratios are used as the first eigenvalues under the first retention features of this part. Specifically, the original eigenvalues of other first retention features except exposure are converted into ratios. For example, for the click volume, the click rate of the target user to the content (that is, the ratio of click volume to exposure volume) can be used as the first eigenvalue of the target user under the click volume, for example, the attention rate can be used as the first eigenvalue under the attention volume. Exemplarily, the ratio of the original feature value under other first retention features to the exposure amount, that is, the exposure rate corresponding to the other first retention features is used as the first feature value of the other first retention features, and the original feature value under the exposure amount is used as the first feature value under the exposure amount, so as to obtain the first feature value of each first target user under each first retention feature.
[0057] Furthermore, after the user is activated, the retention status of the first target user can be obtained, wherein the retention status includes two situations: retention and non-retention. Among them, whether the user is retained can be determined by the user's activity within a second preset time period, and the second preset time period is a period of time after the user is activated. Exemplarily, if the user has been active within the second preset time period, it is determined that the user is retained; if the user has not been active within the second preset time period, it is determined that the user is not retained. Then, based on the retention status of each first target user, the predicted label of each first target user is determined. For example, if the first target user is retained, the predicted label of the first target user is determined to be 1; if the first target user is not retained, the predicted label of the first target user is determined to be 0.
[0058] For example, the second preset time length is one week. After the user is activated, the user's activity status in the next week can be obtained. If the user is active for at least one day in the next week, it is determined that the user has been active, and the prediction label is determined to be 1; if the user has not been active in the next week, it is determined that the user has not been retained, and the prediction label is determined to be 0.
[0059] 202: Perform model training based on multiple first feature values of each first target user under multiple first retained features and the predicted label of each first target user to obtain a target decision tree.
[0060] Exemplarily, the first feature value of each first target user under each first retained feature is embedded to obtain an embedding vector of each first target user under each first retained feature. For example, an embedding vector can be pre-configured for each first retained feature, and then the first feature value of each first target user under each first retained feature is used as the weight of the first target user under the first retained feature, and the embedding vector corresponding to the first retained feature is weighted to obtain the embedding vector of each first target user under each first retained feature. Finally, model training is performed based on the embedding vector of each first target user under each first retained feature to obtain a target decision tree, that is, the embedding vector of each first target user under each first retained feature is used as input data for model training to obtain a target decision tree.
[0061] Among them, the target decision tree is a gradient boosting decision tree (Gradient Boosting DecisionTrees, GBDT), for example, the target decision tree can be catboost, BO-catboost, XGBoost, LightGBM, etc. This application does not limit the type of decision tree.
[0062] 203: Using a model interpretation method to interpret the target decision tree, obtain a corresponding relationship between each first retention feature and user retention.
[0063] Optionally, the corresponding relationship may be the importance of each first retention feature in affecting user retention.
[0064] Exemplarily, the model interpretation method is a method class. For example, the importance score of each first retention feature can be obtained from the target decision tree through the method class get_feature_importance, wherein the importance score is used to indicate the importance of each first retention feature in affecting user retention.
[0065] Exemplarily, the model interpretation method is the SHAP method, and the SHAP method can be used to interpret the target decision tree to obtain a SHAP summary graph; based on the SHAP summary graph, the importance of each first retention feature in affecting user retention is determined.
[0066] Optionally, the corresponding relationship can be the correlation between each first retention feature and user retention, such as positive correlation, positive linear correlation, positive nonlinear correlation, irrelevant, negative correlation, negative linear correlation, negative nonlinear correlation, etc. Exemplarily, the model interpretation method is the SHAP method, and the SHAP method can be used to interpret the target decision tree to obtain a SHAP dependency graph corresponding to each first retention feature, wherein the horizontal coordinate of each sample point in the SHAP dependency graph corresponding to each first retention feature represents the value of the first retention feature, and the vertical coordinate represents the SHAP value of each first retention feature; then, based on the SHAP dependency graph corresponding to each first retention feature, the corresponding relationship between each first retention feature and user retention is determined.
[0067] It can be seen that in the implementation mode of the present application, after obtaining the characteristic value and activity status of the target user under the retention feature, a training sample can be constructed and used to train the decision tree. During the training process, the decision tree takes into account the contribution of each retention feature to the prediction error, so that the influence of the retention feature on user retention can be accurately captured, and then the correspondence between user retention and each retention feature can be accurately predicted. In addition, the model interpretation method can be used to clearly explain the correspondence between user retention and each retention feature, thereby improving the transparency of the relationship between user retention and features.
[0068] In one embodiment of the present application, exposure is an important factor affecting user retention, so it is necessary to retain the feature of exposure alone for prediction without converting it into a ratio. However, since the behavior of target users is relatively sparse, the multiple first eigenvalues of multiple first target users under exposure do not conform to the normal distribution, and most of the first eigenvalues are distributed in the tail area. However, for model training, data with thick tail distribution may lead to poor model learning effect. Therefore, it is necessary to convert the first eigenvalue of the first target user under exposure.
[0069] Exemplarily, firstly, a first transformation process is performed based on a plurality of first characteristic values of a plurality of first target users under exposure, so as to obtain a first transformed characteristic value of each first target user under exposure.
[0070] Optionally, the first transformation processing is a logarithmic transformation, and the first characteristic value of each first target user under the exposure amount is logarithmically transformed to obtain the first transformed characteristic value of each first target user under the exposure amount.
[0071] Exemplarily, the first transformation characteristic value of each first target user under the exposure amount can be expressed by formula (1):
[0072] z=log x Formula (1);
[0073] Wherein, x is the first characteristic value of any first target user under the exposure amount, and z is the first transformed characteristic value of the first target user under the exposure amount.
[0074] Optionally, based on a first transformation parameter (value unknown), a first transformation is performed on multiple first eigenvalues of multiple first target users under exposure to obtain a fourth eigenvalue of each first target user under exposure, so that the multiple fourth eigenvalues of multiple first target users under exposure conform to an approximate normal distribution, wherein the first transformation parameter is unknown, so the fourth eigenvalue of each first target user under exposure is a eigenvalue determined by the first transformation parameter.
[0075] Exemplarily, the fourth characteristic value of each first target user under exposure can be expressed by formula (2):
[0076]
[0077] Wherein, λ is the first transformation parameter, x is the first characteristic value of any first target user under the exposure amount, and y is the fourth characteristic value of the first target user under the exposure amount.
[0078] Further, based on the fourth eigenvalue of each first target user under the exposure amount, a likelihood function related to the first transformation parameter is constructed. Specifically, the standard deviation and mean of the plurality of fourth eigenvalues of the plurality of first target users under the exposure amount are determined, and the likelihood function is constructed based on the standard deviation, mean and probability density function.
[0079] Exemplarily, the likelihood function can be expressed by formula (3):
[0080]
[0081] Where L(λ) is the likelihood function, i represents the i-th first target user among multiple first target users, and y i is the fourth eigenvalue of the i-th first target user, n is the number of multiple first target users, μ is the above mean, σ is the standard deviation, is the standard probability density function.
[0082] Further, based on the likelihood function, a maximum likelihood estimation is performed to determine the value of the first transformation parameter. Then, based on the value of the first transformation parameter, the first transformation characteristic value of each first target user under the exposure amount is determined, that is, the value of λ is substituted into formula (2) to obtain the first transformation characteristic value of each first target user under the exposure amount.
[0083] In one embodiment of the present application, in order to facilitate the likelihood estimation of the likelihood function, the likelihood function may be logarithmically transformed. Therefore, the likelihood function may also be expressed by formula (4):
[0084]
[0085] Among them, log represents logarithmic operation.
[0086] Furthermore, after performing the first transformation processing on the first characteristic value of the first target user under the exposure, in order to make the characteristic value of the first target user under the exposure more conform to the normal distribution, the multiple first transformed characteristic values of multiple first target users under the exposure may be subjected to the second transformation processing to obtain the second transformed characteristic value of each user under the exposure, so that the multiple second transformed characteristic values of the multiple first target users obey the normal distribution.
[0087] Optionally, the square root of the first transformation characteristic value of each first target user under the exposure amount can be calculated to obtain the second transformation characteristic value of each first target user under the exposure amount. Therefore, the second transformation characteristic value of each first target user under the exposure amount can be expressed by formula (5):
[0088]
[0089] Wherein, z is the first transformation characteristic value of each first target user under the exposure amount, and K is the second transformation characteristic value of each first target user under the exposure amount.
[0090] Therefore, after obtaining the second transformation feature value of each first target user under the exposure, the fourth feature value of each first target user under each first retention feature can be obtained based on the second transformation feature value of each first target user under the exposure and the first feature value under other first retention features, wherein the other first retention features are the first retention features other than the exposure among the multiple first retention features. It can be understood that the fourth feature value of each first target user under other first retention features is the first feature value of the first target user under the first retention feature.
[0091] Then, model training is performed based on the fourth eigenvalue of each first target user under each first retained feature and the predicted label of each first target user to obtain a target decision tree, wherein the method of training using the fourth eigenvalue is similar to the method of model training using the first eigenvalue mentioned above and will not be described again.
[0092] In one embodiment of the present application, considering that the target user's behavior is relatively sparse, if only the pre-defined retention features are used, there may be few positive samples under certain retention features. For example, for the retention feature of forwarding, there is almost no forwarding behavior among the multiple first target users, so the behavior under the retention feature of forwarding is relatively sparse, lacking positive samples, and the model is easily overfitted.
[0093] Therefore, before model training, multiple first retained features can be crossed, also called combined, to obtain multiple second retained features, where the multiple second retained features include multiple first retained features. By crossing features, nonlinear relationships and interactions between crossed features can be learned.
[0094] Exemplarily, multiple first retained features are crossed to obtain multiple crossed features; and the multiple crossed features are used as the multiple second retained features.
[0095] Exemplarily, the first retention features may be crossed in pairs, or three first retention features may be crossed, or specific first retention features may be crossed. The present application does not limit the manner of crossing. Then, based on the fourth feature value of each first target user under each first retention feature, the fifth feature value of each first target user under each second retention feature may be determined. For example, the fourth feature values corresponding to the first retention features used by each second retention feature may be combined to obtain the fifth feature value of each first target user under each second retention feature.
[0096] This application mainly uses the example of performing pairwise crossover of the first retained features to illustrate, such as Figure 3 As shown, for the first retained feature (X1, X2, ..., Xn), (X1, X2, Xn) can be crossed in pairs. Since the meaning represented by each first retained feature when crossed with itself is the same as the meaning represented by the first retained feature, the first retained feature can still be used to represent the feature obtained after the first retained feature and the crossover. After the first retained features are crossed in pairs, as shown Figure 3 As shown, the second retained features obtained are (X1, X1_X2,…, X1_Xn, X2_X1, X2,…, X2_Xn, Xn_X1,…, Xn_X2,…, Xn), thereby expanding the number of retained features from n to n2.
[0097] For example, the user's gender and exposure can be crossed to obtain a cross feature, namely gender-exposure, and then the fourth feature values of each first target user under gender and exposure can be combined to obtain the fifth feature value of each first target user under gender-exposure. For example, if the user's behavior is male and the exposure is 300, then the fifth feature value of the user under gender-exposure is (male, 300). In this way, the model can learn the impact of exposure on user retention for users of different genders. For example, for male users, the more exposure, the greater the probability of user retention.
[0098] Furthermore, after obtaining multiple second retention features and the fifth feature value of each first target user under each second retention feature, model training can be performed based on the fifth feature value of each first target user under each second retention feature and the predicted label of each first target user to obtain a target decision model.
[0099] Among them, the above-mentioned method of using the fifth eigenvalue of each first target user under each second retained feature for model training is similar to the above-mentioned method of using the first eigenvalue for training, and both methods first construct an embedding vector for model training, and will not be described again. It should be noted that if the second retained feature is a second retained feature obtained by crossover, then when constructing the embedding vector of each first target user under the second retained feature, the embedding vector of each first retained feature used to cross the second retained feature can be obtained, and then the fourth eigenvalue of the first target user in each first retained feature is used as the weight of the first retained feature, and the embedding vector of each first retained feature is weighted and summed based on the weight of each first retained feature to obtain the embedding vector of the first target user under each second retained feature.
[0100] In one embodiment of the present application, after the features are crossed, a large number of retained features will be generated, and due to the sparsity of user behavior, a large number of sparse features will be generated, which will increase the complexity of model training and reasoning. Therefore, the present application will also bundle the multiple second retained features based on the fifth feature value of each first target user under each second retained feature to obtain multiple third retained features, thereby reducing the number of retained features.
[0101] Exemplarily, the sparsity of each second retention feature is determined based on the fifth feature value of each first target user under each second retention feature. Optionally, for each second retention feature, determine whether the fifth feature value of each first target user under the second retention feature is zero, so as to count the number of target users whose fifth feature value under each second retention feature is not zero; the ratio between the number of target users whose fifth feature value is not zero and the number of the plurality of first target users is used as the sparsity of each second retention feature, so the smaller the sparsity, the sparser the feature. For example, when the second retention feature is the forwarding volume, the number of the plurality of first target users is 1000, and among these 1000 first target users, only 10 first target users forwarded the content, that is, only 10 first target users have a fifth feature value under the forwarding volume that is not 0, so the sparsity corresponding to the forwarding volume is 1%.
[0102] Then, multiple second candidate retention features whose sparsity is less than the sparsity threshold are screened out from the multiple second retention features, that is, retention features with larger sparsity are screened out, and based on the fifth feature value of each first target user under each second candidate retention feature, the multiple second candidate retention features are bundled to obtain the multiple third retention features.
[0103] like Figure 3 As shown, four second candidate retained features, namely X1, X1_X2, X2_X1, X2, …, X2_Xn, Xn_X1, …, Xn_X2, …, Xn), can be first screened out from n 2 second retained features, namely X1, X1_X2, X2_X1, X2. Then, for these four second candidate features, it is obtained that the mutual exclusion between X1_X2 and X2_X1 is the largest, then X1_X2 and X2_X1 can be bundled. Since X1_X2 and X2_X1 represent one feature in this application, the bundled feature is still represented by X1_X2; then, continue bundling, and the final bundled feature is X1_X2, then the four features can be merged into one feature, thereby reducing the number of features.
[0104] Exemplarily, the multiple second candidate retention features are taken as a feature set, and then based on the fifth feature value of each first target user under each second candidate retention feature, the degree of mutual exclusion between any two second candidate retention features in the feature set is obtained. Exemplarily, based on the fifth feature value of each first target user under each second candidate retention feature, a sparse vector of each second candidate retention feature is constructed. Based on the fifth feature value of each first target user under each second candidate retention feature, a 0-1 sparse vector is constructed. If a first target user has data under the second candidate retention feature, that is, the fifth feature value is not 0, the dimension corresponding to the first target user is set to 1, and if there is no data, it is set to 0, so that a 0-1 sparse vector can be constructed. Then, for any two second candidate retention features, the intersection vector of the sparse vectors of any two second candidate retention features is obtained, and then the ratio between the number of non-zero elements in the intersection vector and the number of multiple first target users is used as the degree of mutual exclusion between the two second candidate retention features.
[0105] For example, the sparse vector of retained feature 1 is [1,0,1,1,0,0,1,0,1,0], and the sparse vector of retained feature 2 is [1,1,1,0,1,0,0,1,0,1], then the intersection vector between retained feature 1 and retained feature 2 is [1,0,1,0,0,0,0,0,0,0]. Therefore, the number of non-zero elements in the intersection vector is 2, so the degree of mutual exclusion between retained feature 1 and retained feature 2 is 20%.
[0106] Furthermore, the maximum mutual exclusion degree corresponding to the feature set is obtained. If the maximum mutual exclusion degree is less than the mutual exclusion threshold, the two second candidate retained features corresponding to the maximum mutual exclusion degree are bundled into a new candidate retained feature, and the new candidate retained feature is used to replace the two second candidate retained features with the maximum mutual exclusion degree to obtain a new feature set. Then, the mutual exclusion degree between any two candidate retained features in the new feature set is calculated again, and the candidate retained features in the new feature set are bundled based on the mutual exclusion degree until the mutual exclusion degree between any two candidate retained features in the new feature set is greater than the threshold, and the bundling of multiple second candidate retained features is completed, and the candidate retained features in the new feature set and the retained features of the multiple second retained features except the multiple second candidate retained features are used as multiple third retained features.
[0107] Furthermore, based on the fifth feature value of each first target user under each second retention feature, the sixth feature value of each first target user under each third retention feature is obtained. It can be understood that if the third retention feature is a second retention feature other than multiple second candidate retention features among multiple second retention features, then the sixth feature value of the first target user under the third retention feature is the fifth feature value of the first target user under the second retention feature; if the third retention feature is a bundled retention feature, then the fifth feature value of the first target user under the second candidate retention feature used to bundle the third retention feature is combined to obtain the sixth feature value of the first target user under the third retention feature.
[0108] It can be seen that when bundling features, the present application gives priority to bundling retained features with a larger degree of sparsity, thereby reducing the sparsity of the retained features; moreover, when bundling features, the retained features with a larger degree of mutual exclusion will be bundled, so that the bundled features will not interfere with each other, and there can be a feature vector that clearly represents the retained features involved in the bundling, that is, feature information will not be lost, thereby achieving the goal of reducing the retained features while not losing feature information, that is, not reducing the prediction accuracy.
[0109] Furthermore, after obtaining the third retention feature and the fifth feature value of the first target user under the third retention feature, model training can be performed based on the sixth feature value of each first target user under each third retention feature and the predicted label of each first target user to obtain the target decision tree.
[0110] It should be noted that the above-mentioned method of using the sixth eigenvalue of each first target user under each third retention feature to perform model training is similar to the above-mentioned method of using the fifth eigenvalue of each first target user under each third retention feature to perform model training, and will not be described again.
[0111] In one embodiment of the present application, since the target user's behavior is very sparse, in many cases, many target users will not have active behavior within the second preset time, so there will be very few users who actually remain, so the remaining users are a minority class sample. If multiple first target users are directly used for model training, it will make it difficult for the model to capture the user's sparse behavior and it is easy to overfit. Therefore, before model training, it is necessary to expand the minority class samples to obtain a relatively abundant number of minority class samples.
[0112] Exemplarily, for each second target user, each second target user is clustered to obtain N neighboring target users corresponding to each second target user from multiple first target users, wherein the second target user is a user retained among the multiple first target users, that is, a user with a predicted label of 1.
[0113] Exemplarily, since the multiple fifth feature values of the user under the multiple third retention features are equivalent to high-dimensional data, in order to avoid the dimension being too high to be accurately clustered, the retention features are first reduced in dimension. Exemplarily, multiple candidate third retention features are selected from the multiple third retention features, that is, some features that can represent the real behavior of the user are selected, such as exposure, click volume, like volume, etc. Then, the multiple sixth feature values of each first target user under the multiple candidate third retention features are reduced in dimension to obtain the two-dimensional data of each first target user. For example, the t-SNE algorithm can be used for dimension reduction to obtain the two-dimensional data of each first target user. Then, the two-dimensional data of each second target user and the two-dimensional data of each first target user are density clustered to obtain N neighboring target users corresponding to each second target user, that is, the distance between each first target user and the second target user is obtained on the two-dimensional plane, and then N target users are selected from the multiple first target users in the order of arrival from the smallest to the smallest as the N neighboring target users.
[0114] like Figure 4 As shown in , assuming that the number of candidate third retained features is n, the data of each first target user under n candidate third retained features constitutes an n-dimensional space, that is, Figure 4 As shown in FIG. 1 , Z1, Z2, Z3, …, Zn, the n-dimensional space formed by the data of each first target user under the n candidate third retained features can be reduced to a two-dimensional plane; then, the second target user is obtained from the multiple first target users, such as Figure 4 The five-pointed star shown represents the second target user, and then the distance between each first target user and the second target user is obtained in the two-dimensional plane, so that N (4) neighboring users corresponding to each second target user can be obtained.
[0115] Furthermore, after obtaining N neighboring target users corresponding to each second target user, a random number corresponding to each second target user can be taken, and the random number corresponding to each second target user can be used to merge the sixth feature value of each second target user under each third retention feature and the sixth feature of a randomly selected neighboring target user under the third retention feature to obtain the seventh feature value of the third target user corresponding to each second target user under each third retention feature.
[0116] Exemplarily, multiple seventh feature values of the third target user corresponding to each second target user under multiple third retained features can be expressed by formula (6):
[0117]
[0118] Among them, {v1 , v 2 , …, v m} is a plurality of sixth feature values of the third target user corresponding to any second target user under a plurality of third retained features, {s 1 ,s 2 ,…,s n} is a plurality of fifth feature values of the second target user under a plurality of third retained features, and m is the number of the third retained features.
[0119] Then, after the third target user is expanded and the feature value of the third target user under the third retention feature is obtained, the third target user and multiple first target users can be used as input data for model training, that is, based on the fifth feature value of each first target user under each third retention feature and the predicted label of each first target user, and the sixth feature value of the third target user corresponding to each second target user under each third retention feature and the predicted label of the third target user, the model training is performed to obtain the target decision tree. It can be understood that the predicted label corresponding to the third target user corresponding to each second target user is the predicted label of the second target user, that is, the predicted label is 1.
[0120] It should be noted that in order to address the sparsity problem of target users, in practical applications, one or more of the above-mentioned normal distribution processing, feature crossover, feature bundling and sample expansion can be selected to process the original sample (the first feature value of the first target user), and it is not necessary to select all processing methods to process the original sample.
[0121] In one embodiment of the present application, before training the model, the first target users may be classified. For example, the first target users who like traveling may be classified into a group of training data according to their interests and hobbies, and the group of training data may be used for model training and model interpretation, so as to obtain the influence of each retention feature on the retention of users who like traveling. Alternatively, further classification may be performed, and the first target users who like traveling and adventure may be classified into a group of training data, and the group of training data may be used for model training and model interpretation, so as to obtain the influence of each retention feature on users who like traveling and adventure.
[0122] In one embodiment of the present application, after determining the correspondence between the retention characteristics of each group of people and the user retention, content recommendations can be made to users in the group based on the correspondence.
[0123] Exemplarily, for any group of people, if the correspondence between the retention feature of the group of people and user retention is positively correlated, then when pushing content to users in the group of people, the first recommendation probability is used as the recommendation probability of the first target content, wherein the first target content is the content containing the retention feature, for example, if the retention feature is pictures and texts, then the first target content is the content containing pictures and texts, wherein the first recommendation probability is greater than the standard recommendation probability, and the standard recommendation probability is the recommendation probability of the content when the content is normally pushed to the user, that is, the recommendation probability of the first target content containing the retention feature is increased, so that the first target content can be pushed more to the users in the group of people, that is, more user-sensitive content can be pushed. content of interest to improve user stickiness; if the correspondence between the retention feature of the group of people and the user retention is negatively correlated, then when pushing content to users in the group of people, the second recommendation probability is used as the recommendation probability of the second target content, wherein the second target content is the content containing the retention feature, for example, if the retention feature is video, then the second target content is the content containing video, wherein the second recommendation probability is less than the standard recommendation probability, that is, the recommendation probability of the second target content containing the retention feature is reduced, so that the second target content can be pushed less to the users in the group of people, that is, less content that the users are not interested in can be pushed to the users, thereby avoiding disturbing the users and improving the quality of the recommendation.
[0124] For example, if the group of people likes traveling, and the retention feature is pictures and texts, and the correspondence between the users in the group and the retention feature is positively correlated, then for users who like traveling, picture and text content is pushed to users who like traveling with the first recommendation probability, that is, picture and text content is pushed to users who like traveling more, thereby increasing the exposure rate of picture and text content among these users, allowing users to often see the content they are interested in, thereby increasing the stickiness of users who like traveling; in other words, less plain text content or video content is pushed to users who like traveling, that is, plain text content or video content is pushed to users who like traveling with the second recommendation probability, that is, plain text content or video content is pushed to users who like traveling less, thereby reducing the exposure rate of plain text content or video content among these users, allowing these users to see less content that they are not interested in, thereby improving the quality of content push.
[0125] See also Figure 5 , Figure 5 A schematic diagram of feature processing and feature verification provided in an embodiment of the present application.
[0126] like Figure 5As shown, first, the original feature values of each first target user under multiple retention features are obtained, wherein the multiple retention features include user portrait, behavior features and content features, wherein the user portrait includes: age, gender, city level...activation channels; behavior features include: exposure, clicks, attention, reposts...comments; content features include: author gender, author age, whether it is a picture or text, amount of information, whether it is a real shot, aesthetic score...composition features; and the activity status of each first target user is obtained, so as to determine the retention status of each first target user.
[0127] Then, the obtained original feature values and retention status are processed. Figure 5 As shown, for each first target user's original feature values under the age, gender, city level... activation channels, outliers are deleted; the original feature values under the exposure are truncated; the original feature values of each first target user under the number of clicks, attention, forwarding... comments, as well as the author's gender, author's age, whether it is a picture or text, the amount of information, whether it is a real shot, aesthetic score... composition features are converted into ratios (that is, the original feature values under each retained feature are converted into ratios equivalent to the exposure), and missing data are filled with 0 values.
[0128] Specifically, Figure 5 As shown, the original feature value under the click volume is converted into the click rate, the original feature value under the attention volume is converted into the attention rate, the original feature value under the forwarding volume is converted into the forwarding rate, and the feature value under the comment volume is converted into the comment rate; the exposure volume of the content of authors of each gender is converted into the exposure rate of the content of authors of each gender; the exposure volume of the content of authors of each age group is converted into the exposure rate of the content of authors of each age group; the exposure volume of the text or video content is converted into the exposure rate of the text or video content; the exposure volume of the content of each information volume is converted into the exposure rate of the content of each information volume; the exposure volume of the real shot or non-real shot content is converted into the exposure rate of the real shot or non-real shot content; the exposure volume of the content of each aesthetic grade is converted into the exposure rate of the content of each aesthetic grade. The exposure volume of the content of each composition feature is converted into the exposure rate of the content of each composition feature.
[0129] Furthermore, the retention situation is converted into a two-dimensional label to obtain a predicted label for each first target user.
[0130] In this application, each original feature value after data processing is referred to as a first feature value, thereby obtaining multiple first feature values of each first target user under multiple retained features. Then, the multiple first feature values of each first target user under multiple retained features are used as a training feature, and model training is performed based on the training feature and the prediction label to obtain a target decision tree.
[0131] Then, if Figure 5 As shown in , the model interpretation method is used to interpret the model, so as to obtain the influence of each retention feature on user retention. For example, the shap value of each retention feature can be obtained, so as to draw a shap graph of each retention feature, and based on the shap graph, the influence of each retention feature on user retention can be determined. Figure 6 As shown in the figure, the dependence plot of a certain feature on male youth can be obtained through model interpretation. The horizontal axis represents the size of the feature, and the vertical axis represents the shap value of the feature. Figure 6 It can be seen that this feature has a positive correlation with the retention of young male users, especially in the interval where the feature value is low. Therefore, for young male users, when recommending content to such users, this feature is often promoted to facilitate the retention of such users. For example, when recommending content to young male users, the feature of graphic content is often recommended to young male users.
[0132] Furthermore, if Figure 5 As shown, in order to verify the correspondence between each first retention feature and user retention, the correspondence needs to be analyzed and verified, for example, by layered statistics.
[0133] Furthermore, after the analysis and verification is passed, an experiment can be set up to experimentally verify the correspondence between each first retention feature and user retention, and through actual testing, the correctness of the above correspondence can be further verified.
[0134] Furthermore, after experimental verification, the conclusion can be accepted, that is, the correctness of the correspondence between each first retention feature and user retention can be truly determined. For example, it can be truly determined that the retention rate of users who like traveling is significantly positively correlated with the exposure rate of picture and text notes. For users who love food, their retention rate is significantly positively correlated with the comment rate of the content.
[0135] See also Figure 7 , Figure 7 A schematic diagram of a feature processing device provided in an embodiment of the present application. The feature processing device 700 includes: an acquisition unit 701 and a processing unit 702, wherein:
[0136] An acquisition unit 701 is used to acquire a plurality of first feature values of each first target user under a plurality of first retention features and a prediction label, wherein the prediction label of each first target user is used to indicate the retention status of each first target user;
[0137] Processing unit 702 is used to perform model training based on multiple first feature values of each first target user under multiple first retention features and the predicted label of each first target user to obtain a target decision tree; and use a model interpretation method to interpret the target decision tree to obtain a corresponding relationship between each first retention feature and user retention.
[0138] In one embodiment of the present application, the multiple first retention features include exposure, and in terms of performing model training based on multiple first feature values of each first target user under the multiple first retention features and the predicted label of each first target user to obtain a target decision tree, the processing unit 702 is specifically configured to:
[0139] Performing a first transformation process based on the multiple first characteristic values of the multiple first target users under the exposure amount to obtain a second characteristic value of each first target user under the exposure amount;
[0140] Performing a second transformation process based on the plurality of second eigenvalues of the plurality of first target users under the exposure amount to obtain a third eigenvalue of each first target user under the exposure amount, so that the plurality of third eigenvalues of the plurality of first target users obey a normal distribution;
[0141] Based on the third feature value of each first target user under the exposure amount and the first feature values under other first retention features, obtain the fourth feature value of each first target user under each first retention feature;
[0142] Model training is performed based on the fourth feature value of each first target user under each first retained feature and the predicted label of each first target user to obtain a target decision tree.
[0143] In one embodiment of the present application, in performing a first transformation process based on a plurality of first characteristic values of the plurality of first target users under exposure to obtain a second characteristic value of each first target user under exposure, the processing unit 702 is specifically configured to:
[0144] Based on the first transformation parameter, performing a first transformation process on the plurality of first characteristic values of the plurality of first target users under the exposure amount to obtain a fourth characteristic value of each first target user under the exposure amount, wherein the fourth characteristic value of each first target user under the exposure amount is a characteristic value determined by the first transformation parameter;
[0145] constructing a likelihood function related to the first transformation parameter based on the fourth eigenvalue of each first target user under the exposure amount;
[0146] Performing maximum likelihood estimation based on the likelihood function to determine the value of the first transformation parameter;
[0147] Based on the value of the first transformation parameter, a second characteristic value of each first target user under the exposure is determined.
[0148] In one embodiment of the present application, in performing model training based on the fourth feature value of each first target user under each first retained feature and the predicted label of each first target user to obtain a target decision tree, the processing unit 702 is specifically used to:
[0149] Crossing the plurality of first retained features to obtain a plurality of second retained features;
[0150] Based on the fourth feature value of each first target user under each first retention feature, obtaining the fifth feature value of each first target user under each second retention feature;
[0151] Based on the fifth feature value of each first target user under each second retention feature, bundling the multiple second retention features to obtain multiple third retention features;
[0152] Based on the fifth feature value of each first target user under each second retention feature, obtaining the sixth feature value of each first target user under each third retention feature;
[0153] Model training is performed based on the sixth feature value of each first target user under each third retained feature and the predicted label of each first target user to obtain a target decision tree.
[0154] In one embodiment of the present application, in terms of bundling the multiple second retention features based on the fifth feature value of each first target user under each second retention feature to obtain multiple third retention features, the processing unit 702 is specifically configured to:
[0155] Determine the sparsity of each second retained feature based on the fifth feature value of each first target user under each second retained feature;
[0156] Filter out a plurality of second candidate retained features whose sparsity is less than a sparsity threshold from the plurality of second retained features;
[0157] Based on the fifth feature value of each first target user under each second candidate retention feature, the multiple second candidate retention features are bundled to obtain the multiple third retention features.
[0158] In one embodiment of the present application, in bundling the plurality of second candidate retention features based on the fifth feature value of each first target user under each second candidate retention feature to obtain the plurality of third retention features, the processing unit 702 is specifically configured to:
[0159] Taking the plurality of second candidate retained features as a feature set;
[0160] Based on the fifth feature value of each first target user under each second candidate retention feature, obtaining the degree of mutual exclusivity between any two second candidate retention features in the feature set;
[0161] If the maximum mutual exclusion degree is less than the mutual exclusion threshold, the two second candidate retained features corresponding to the maximum mutual exclusion degree are bundled into a new candidate retained feature, and the new candidate retained feature is used to replace the two second candidate retained features with the maximum mutual exclusion degree to obtain a new feature set;
[0162] The candidate retained features in the new feature set are bundled based on the degree of mutual exclusivity until the degree of mutual exclusivity between any two candidate retained features in the new feature set is greater than the threshold, and the candidate retained features in the new feature set and the retained features of the multiple second retained features except the multiple second candidate retained features are used as the multiple third retained features.
[0163] In one embodiment of the present application, in determining the sparsity of each second retained feature based on the fifth feature value of each first target user under each second retained feature, the processing unit 702 is specifically configured to:
[0164] Based on the fifth feature values of the plurality of first target users under each second retention feature, determining the number of target users whose fifth feature values under each second retention feature are not zero;
[0165] The ratio between the number of target users whose fifth characteristic value is not zero and the number of the plurality of first target users is used as the sparsity of each second retained feature.
[0166] In one embodiment of the present application, in terms of performing model training based on the sixth feature value of each first target user under each third retained feature and the predicted label of each first target user to obtain a target decision tree, the processing unit 702 is specifically used to:
[0167] Based on the sixth feature value of each second target user under each third retained feature, density clustering is performed on each second target user to obtain N neighboring target users corresponding to each second target user from the multiple first target users, wherein the second target user is a user retained from the multiple first target users;
[0168] Perform sample expansion based on N neighboring target users corresponding to each second target user, and obtain the seventh feature value of the third target user corresponding to each second target user under each third retained feature;
[0169] Model training is performed based on the sixth feature value of each first target user under each third retained feature and the seventh feature value of the third target user corresponding to each second target user under each third retained feature to obtain the target decision tree.
[0170] In one embodiment of the present application, in terms of performing sample expansion based on N neighboring target users corresponding to each second target user to obtain the seventh feature value of the third target user corresponding to each second target user under each third retained feature, the processing unit 702 is specifically configured to:
[0171] Randomly select a neighboring target user from the N neighboring target users corresponding to each second target user;
[0172] Obtain a random number corresponding to each second target user, and use the random number corresponding to each second target user to merge the sixth feature value of each second target user under each third retention feature and the sixth feature of a randomly selected neighboring target user under the third retention feature to obtain the seventh feature value of the third target user corresponding to each second target user under each third retention feature.
[0173] In one embodiment of the present application, in terms of performing density clustering on each second target user to obtain N neighboring target users corresponding to each second target user from the multiple first target users, the processing unit 702 is specifically configured to:
[0174] Selecting a plurality of candidate third retained features from the plurality of third retained features;
[0175] Performing dimensionality reduction on the multiple sixth feature values of each first target user under the multiple candidate third retained features to obtain two-dimensional data of each first target user, wherein the two-dimensional data of each first target user is used to characterize the multiple sixth feature values of each first target user under the multiple candidate third retained features;
[0176] Based on the two-dimensional data of each second target user and the two-dimensional data of each first target user, density clustering is performed on the two-dimensional data of each user to obtain N neighboring target users corresponding to each second target user.
[0177] See also Figure 8 , Figure 8 A schematic diagram of an electronic device provided in an embodiment of the present application. Figure 8 As shown, the electronic device 800 includes a transceiver 801, a processor 802 and a memory 803. They are connected via a bus 804. The memory 803 is used to store computer programs and data, and can transmit the data stored in the memory 803 to the processor 802.
[0178] The processor 802 is used to read the computer program in the memory 803 and perform the following operations:
[0179] Controlling the transceiver 801 to obtain a plurality of first feature values of each first target user under a plurality of first retention features and a prediction label, wherein the prediction label of each first target user is used to indicate the retention status of each first target user;
[0180] Performing model training based on multiple first feature values of each first target user under multiple first retained features and a predicted label of each first target user to obtain a target decision tree;
[0181] The target decision tree is interpreted using a model interpretation method to obtain a corresponding relationship between each first retention feature and user retention.
[0182] Specifically, the electronic device 800 may be the feature processing device 700 described above. If the electronic device 800 is the feature processing device 700 described above, then the transceiver 801 may be Figure 7 The acquisition unit 701 of the feature processing device 700 of the embodiment described above, the processor 802 may be Figure 7 The processing unit 702 of the feature processing device 700 of the embodiment.
[0183] It should be understood that the user terminal in this application may include a smart phone, a tablet computer, a PDA, a laptop computer, a mobile Internet device MID (Mobile Internet Devices, MID for short) or a wearable device, etc. The above user terminals are only examples, not exhaustive, and include but are not limited to the above user terminals. In practical applications, the above user terminals may also include: smart vehicle terminals, computer equipment, etc.
[0184] The server of the present application may be a cloud computing server, a content delivery network (CDN) server, a network time protocol (NTP), a domain name resolution system (DNS) server, and other types of servers. The above servers are only examples, not exhaustive, and include but are not limited to the above servers.
[0185] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. The computer program is executed by a processor to implement part or all of the steps of any feature processing method recorded in the above method embodiments.
[0186] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any one of the feature processing methods recorded in the above method embodiments.
[0187] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all optional embodiments, and the actions and modules involved are not necessarily required by the present application.
[0188] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0189] In the several embodiments provided in the present application, it should be understood that the disclosed device can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the device or unit can be electrical or other forms.
[0190] 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.
[0191] In addition, each functional unit in each embodiment of the present application 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 integrated unit may be implemented in the form of hardware or in the form of a software program module.
[0192] If the integrated unit is implemented in the form of a software program module and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or CD-ROM and other media that can store program codes.
[0193] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash drive, a read-only memory (English: Read-Only Memory, abbreviated as: ROM), a random access memory (English: Random Access Memory, abbreviated as: RAM), a magnetic disk or an optical disk, etc.
[0194] The embodiments of the present application are introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A feature processing method, characterized in that: include: Acquire multiple first feature values and prediction labels of each first target user of the multiple first target users under the multiple first retention features, wherein the prediction label of each first target user is used to indicate the retention status of each first target user; Performing model training based on multiple first feature values of each first target user under multiple first retained features and a predicted label of each first target user to obtain a target decision tree; The target decision tree is interpreted using a model interpretation method to obtain a corresponding relationship between each first retention feature and user retention.
2. The method according to claim 1, characterized in that The multiple first retention features include exposure, and the model training is performed based on multiple first feature values of each first target user under the multiple first retention features and the predicted label of each first target user to obtain a target decision tree, including: Performing a first transformation process based on the multiple first characteristic values of the multiple first target users under the exposure amount to obtain a second characteristic value of each first target user under the exposure amount; Performing a second transformation process based on the plurality of second eigenvalues of the plurality of first target users under the exposure amount to obtain a third eigenvalue of each first target user under the exposure amount, so that the plurality of third eigenvalues of the plurality of first target users obey a normal distribution; Based on the third feature value of each first target user under the exposure amount and the first feature values under other first retention features, obtain the fourth feature value of each first target user under each first retention feature; Model training is performed based on the fourth feature value of each first target user under each first retained feature and the predicted label of each first target user to obtain a target decision tree.
3. The method according to claim 2, characterized in that The performing a first transformation process based on the multiple first characteristic values of the multiple first target users under the exposure amount to obtain a second characteristic value of each first target user under the exposure amount includes: Based on the first transformation parameter, performing a first transformation process on the plurality of first characteristic values of the plurality of first target users under the exposure amount to obtain a fourth characteristic value of each first target user under the exposure amount, wherein the fourth characteristic value of each first target user under the exposure amount is a characteristic value determined by the first transformation parameter; constructing a likelihood function related to the first transformation parameter based on the fourth eigenvalue of each first target user under the exposure amount; Performing maximum likelihood estimation based on the likelihood function to determine the value of the first transformation parameter; Based on the value of the first transformation parameter, a second characteristic value of each first target user under the exposure is determined.
4. The method according to claim 2 or 3, characterized in that: The method of performing model training based on the fourth feature value of each first target user under each first retained feature and the predicted label of each first target user to obtain a target decision tree includes: Crossing the plurality of first retained features to obtain a plurality of second retained features; Based on the fourth feature value of each first target user under each first retention feature, obtaining the fifth feature value of each first target user under each second retention feature; Based on the fifth feature value of each first target user under each second retention feature, bundling the multiple second retention features to obtain multiple third retention features; Based on the fifth feature value of each first target user under each second retention feature, obtaining the sixth feature value of each first target user under each third retention feature; Model training is performed based on the sixth feature value of each first target user under each third retained feature and the predicted label of each first target user to obtain a target decision tree.
5. The method according to claim 4, characterized in that The step of bundling the plurality of second retention features based on the fifth feature value of each first target user under each second retention feature to obtain a plurality of third retention features includes: Determine the sparsity of each second retained feature based on the fifth feature value of each first target user under each second retained feature; Filter out a plurality of second candidate retained features whose sparsity is less than a sparsity threshold from the plurality of second retained features; Based on the fifth feature value of each first target user under each second candidate retention feature, the multiple second candidate retention features are bundled to obtain the multiple third retention features.
6. The method according to claim 5, characterized in that The step of bundling the plurality of second candidate retention features based on the fifth feature value of each first target user under each second candidate retention feature to obtain the plurality of third retention features includes: Taking the plurality of second candidate retained features as a feature set; Based on the fifth feature value of each first target user under each second candidate retention feature, obtaining the degree of mutual exclusivity between any two second candidate retention features in the feature set; If the maximum mutual exclusion degree is less than the mutual exclusion threshold, the two second candidate retained features corresponding to the maximum mutual exclusion degree are bundled into a new candidate retained feature, and the new candidate retained feature is used to replace the two second candidate retained features with the maximum mutual exclusion degree to obtain a new feature set; The candidate retained features in the new feature set are bundled based on the degree of mutual exclusivity until the degree of mutual exclusivity between any two candidate retained features in the new feature set is greater than the threshold, and the candidate retained features in the new feature set and the retained features of the multiple second retained features except the multiple second candidate retained features are used as the multiple third retained features.
7. The method according to claim 5 or 6, characterized in that: The determining the sparsity of each second retained feature based on the fifth feature value of each first target user under each second retained feature includes: Based on the fifth feature values of the plurality of first target users under each second retention feature, determining the number of target users whose fifth feature values under each second retention feature are not zero; The ratio between the number of target users whose fifth characteristic value is not zero and the number of the plurality of first target users is used as the sparsity of each second retained feature.
8. The method according to any one of claims 4 to 7, characterized in that: The method of performing model training based on the sixth feature value of each first target user under each third retained feature and the predicted label of each first target user to obtain a target decision tree includes: Based on the sixth feature value of each second target user under each third retained feature, density clustering is performed on each second target user to obtain N neighboring target users corresponding to each second target user from the multiple first target users, wherein the second target user is a user retained from the multiple first target users; Perform sample expansion based on N neighboring target users corresponding to each second target user, and obtain the seventh feature value of the third target user corresponding to each second target user under each third retained feature; Model training is performed based on the sixth feature value of each first target user under each third retained feature and the seventh feature value of the third target user corresponding to each second target user under each third retained feature to obtain the target decision tree.
9. The method according to claim 8, characterized in that The method of performing sample expansion based on the N neighboring target users corresponding to each second target user to obtain the seventh feature value of the third target user corresponding to each second target user under each third retained feature includes: Randomly select a neighboring target user from the N neighboring target users corresponding to each second target user; Obtain a random number corresponding to each second target user, and use the random number corresponding to each second target user to merge the sixth feature value of each second target user under each third retention feature and the sixth feature of a randomly selected neighboring target user under the third retention feature to obtain the seventh feature value of the third target user corresponding to each second target user under each third retention feature.
10. The method according to claim 8 or 9, characterized in that: The performing density clustering on each second target user to obtain N neighboring target users corresponding to each second target user from the multiple first target users includes: Selecting a plurality of candidate third retained features from the plurality of third retained features; Performing dimensionality reduction on multiple sixth feature values of each first target user under the multiple candidate third retained features to obtain two-dimensional data of each first target user, wherein the two-dimensional data of each first target user is used to characterize the multiple sixth feature values of each first target user under the multiple candidate third retained features; Based on the two-dimensional data of each second target user and the two-dimensional data of each first target user, density clustering is performed on the two-dimensional data of each user to obtain N neighboring target users corresponding to each second target user.
11. A feature processing device, characterized in that: include: Acquisition unit and processing unit; The acquisition unit is used to acquire a plurality of first feature values of each first target user of the plurality of first target users under a plurality of first retention features, and a prediction label, wherein the prediction label of each first target user is used to indicate the retention status of each first target user; The processing unit is used to perform model training based on multiple first feature values of each first target user under multiple first retention features and the predicted label of each first target user to obtain a target decision tree; and use a model interpretation method to interpret the target decision tree to obtain a score for each first retention feature, wherein the score for each first retention feature is used to indicate the importance of each first retention feature in affecting user retention.
12. An electronic device, characterized in that: include: A processor and a memory, the processor is connected to the memory, the memory is used to store a computer program, and the processor is used to execute the computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the method according to any one of claims 1 to 10.