Method, device and computer readable storage medium for predicting user off-network

By integrating unified feature engineering and prediction models, the problems of low analysis efficiency and accuracy in user churn prediction are solved, achieving efficient and accurate user churn prediction.

CN115936144BActive Publication Date: 2026-06-05CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE INFORMATION TECHNOLOGY CO LTD
Filing Date
2022-12-08
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, expert experience-based prediction of user churn analysis is inefficient, highly subjective, and has low model prediction accuracy. It cannot quickly adapt to feature changes and lacks a unified method for feature cleaning and model fusion.

Method used

A unified feature engineering strategy is adopted to process user data. By fusing primary and secondary prediction models, target features are extracted and ranked by confidence, thereby improving the fit and accuracy of the prediction model.

Benefits of technology

It can process large amounts of user data in a short time, automatically select appropriate data processing methods, reduce the subjective influence of expert experience, and improve model building efficiency and prediction accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115936144B_ABST
    Figure CN115936144B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of user off-grid prediction method, device, equipment and computer readable storage medium, prediction method includes: obtaining the user data of target user;Based on the unified feature engineering strategy of pre-set, the user data of target user is handled, and target feature is extracted;The target feature is input into at least one trained primary prediction model, and first prediction result is obtained;First prediction result output by at least one primary prediction model is input into trained secondary prediction model, and secondary prediction model is based on target fusion algorithm and is fused to first prediction result output by at least one primary prediction model, and second prediction result is obtained;Each category of prediction result in second prediction result is sorted according to confidence, and the second prediction result after sorting is output.According to the embodiment of the application, user data can be automatically handled based on unified feature engineering strategy, and target user is accurately predicted by fusion model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of communication technology, and in particular relates to a method, apparatus, device and computer-readable storage medium for predicting user churn. Background Technology

[0002] In recent years, the number of mobile phone users has approached saturation, and new user growth has reached a bottleneck. With the development of 5G services, various operators have launched many preferential policies for 5G users. Furthermore, the implementation of number portability allows users to choose operators with pricing and services that better suit their needs without changing their phone numbers. This has further accelerated the flow of users between operators and increased the likelihood of user churn. Therefore, in addition to continuously developing new users, operators must also do their best to retain existing users. Given that the overall user base is approaching saturation, identifying users who are about to churn and providing more precise user retention services have become key focuses for operators' customer development.

[0003] Currently, operators generally use expert experience or model prediction to predict users who will leave the network. Expert experience-based prediction requires experts to analyze user churn data based on their personal experience, which is highly subjective. Furthermore, experts cannot analyze large amounts of data and features, nor can they quickly adapt to new feature changes, resulting in low analytical efficiency. While model prediction is more automated and intelligent than expert experience, it still has shortcomings in various stages such as sample data collection, feature engineering, and modeling, leading to lower prediction accuracy. Therefore, in the context of the new 5G era and the implementation of number portability, there is a lack of methods that can accurately analyze large amounts of user data and make accurate predictions about user churn. Summary of the Invention

[0004] This application provides a method, apparatus, device, and computer-readable storage medium for predicting user churn, which can improve prediction accuracy.

[0005] In a first aspect, embodiments of this application provide a method for predicting user churn. The prediction method includes: acquiring user data of a target user; processing the user data of the target user based on a preset unified feature engineering strategy to extract target features; inputting the target features into at least one trained primary prediction model to obtain a first prediction result; inputting the first prediction result output by the at least one primary prediction model into a trained secondary prediction model, wherein the secondary prediction model fuses the first prediction result output by the at least one primary prediction model based on a target fusion algorithm to obtain a second prediction result; sorting the prediction results of each category in the second prediction result according to their confidence level, and outputting the sorted second prediction result.

[0006] According to the implementation method of the first aspect of this application, the user data of the target user is processed based on a preset unified feature engineering strategy to extract target features, specifically including: filling missing values ​​in the user data of the target user; performing outlier processing on the user data after missing value filling; constructing derived features based on the user data after outlier processing; and selecting target features from the original features and derived features in the user data after outlier processing.

[0007] According to any of the foregoing embodiments of the first aspect of this application, imputing missing values ​​in user data of a target user specifically includes: selecting a numerical feature from the user data; calculating the first missing value proportion of the numerical feature and the first correlation coefficient between the numerical feature and a preset label, wherein the preset label is used to characterize whether the user has left the network; determining whether to retain the numerical feature based on a first comparison result between a preset correlation coefficient threshold and the first correlation coefficient, and a second comparison result between a preset missing value threshold and the first missing value proportion; if the numerical feature is retained, imputing the missing values ​​of the numerical feature according to multiple preset imputation strategies; calculating the Fisher score of the numerical feature after imputation by each imputation strategy, and retaining the numerical feature imputed by the imputation strategy with the highest Fisher score; determining whether there are unprocessed numerical features in the user data, and if there are unprocessed numerical features in the user data, returning to the step of selecting a numerical feature from the user data.

[0008] According to any of the foregoing embodiments of the first aspect of this application, imputing missing values ​​in user data of a target user specifically includes: selecting a categorical feature from the user data; calculating the second missing value proportion of the categorical feature and the second correlation coefficient between the categorical feature and a preset label, wherein the preset label is used to characterize whether the user has left the network; determining whether to retain the categorical feature based on a first comparison result between a preset correlation coefficient threshold and the second correlation coefficient, and a second comparison result between a preset missing value threshold and the second missing value proportion; if the categorical feature is retained, imputing the missing values ​​of the categorical feature according to multiple preset imputation strategies; calculating the correlation confidence of the categorical feature after imputation by each imputation strategy based on the chi-square test algorithm, and retaining the categorical feature imputed by the imputation strategy with the highest correlation confidence; determining whether there are unprocessed categorical features in the user data, and if there are unprocessed categorical features in the user data, returning to the step of selecting a categorical feature from the user data.

[0009] According to any of the foregoing embodiments of the first aspect of this application, outlier processing for user data after missing value imputation specifically includes: selecting a numerical feature from the user data after missing value imputation; calculating the skewness of the numerical feature; determining the target location of the outlier in the numerical feature based on the skewness of the numerical feature; processing the outlier at the target location according to a plurality of preset different outlier imputation strategies; calculating the Fisher score of the numerical feature processed by each outlier imputation strategy, and retaining the numerical feature processed by the imputation strategy with the highest Fisher score; determining whether there are any unprocessed numerical features in the user data after missing value imputation, and if there are any unprocessed numerical features in the user data after missing value imputation, returning to the step of selecting a numerical feature from the user data after missing value imputation.

[0010] According to any of the foregoing embodiments of the first aspect of this application, outlier processing for user data after missing value imputation specifically includes: selecting a categorical feature from the user data after missing value imputation; calculating the proportion of third missing values ​​in the categorical feature; selecting at least one corresponding outlier imputation strategy to process the categorical feature based on the proportion of third missing values ​​in the categorical feature; calculating the correlation confidence of the categorical feature processed by each outlier imputation strategy based on the chi-square test algorithm, and retaining the categorical feature processed by the outlier imputation strategy with the highest correlation confidence; determining whether there are unprocessed categorical features in the user data after missing value imputation, and if there are unprocessed categorical features in the user data after missing value imputation, returning to the step of selecting a categorical feature from the user data after missing value imputation.

[0011] According to any of the foregoing embodiments of the first aspect of this application, selecting target features from the original features and derived features in the user data after outlier processing specifically includes: selecting a first number of features from the original features and derived features based on a filtering algorithm; selecting a second number of features from the original features and derived features based on a heuristic search algorithm; selecting a third number of features from the original features and derived features based on a model building method; and calculating the intersection or union of the first number of features, the second number of features, and the third number of features to obtain the target features.

[0012] According to any of the foregoing embodiments of the first aspect of this application, before obtaining the user data of the target user, the prediction method further includes: obtaining sample user data of sample users; processing the sample user data based on a unified feature engineering strategy to extract sample target features; dividing the sample target features into a first dataset, a second dataset, and a third dataset in proportion; training at least one primary prediction model using the first dataset to obtain at least one trained primary prediction model; training a secondary prediction model using the second dataset based on the trained at least one primary prediction model; fusing the trained at least one primary prediction model and the secondary prediction model; and verifying the fused primary prediction model and secondary prediction model using the third dataset.

[0013] According to any of the foregoing embodiments of the first aspect of this application, before inputting the target features into at least one trained primary prediction model and obtaining the first prediction result, the prediction method further includes: acquiring sample user data of sample users at preset intervals; and retraining at least one primary prediction model and a secondary prediction model using the sample user data to obtain at least one retrained primary prediction model and a retrained secondary prediction model.

[0014] According to any of the foregoing embodiments of the first aspect of this application, after obtaining the user data of the target user, the prediction method further includes: removing user data that has not had any usage behavior for a recent preset period of time from the user data to obtain the original data; processing the user data of the target user based on a preset unified feature engineering strategy to extract target features, specifically including: processing the original data based on the unified feature engineering strategy to extract target features.

[0015] Secondly, embodiments of this application provide a user churn prediction device, comprising: an acquisition module for acquiring user data of a target user; an extraction module for processing the user data of the target user based on a preset unified feature engineering strategy to extract target features; a first prediction module for inputting the target features into at least one trained primary prediction model to obtain a first prediction result; a second prediction module for inputting the first prediction result output by at least one primary prediction model into a trained secondary prediction model, wherein the secondary prediction model fuses the first prediction result output by at least one primary prediction model based on a target fusion algorithm to obtain a second prediction result; and an output module for sorting the prediction results of each category in the second prediction result according to their confidence level and outputting the sorted second prediction result.

[0016] Thirdly, embodiments of this application provide an electronic device, which includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the user churn prediction method provided in the first aspect.

[0017] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the user churn prediction method provided in the first aspect.

[0018] This application discloses a method, apparatus, device, and computer-readable storage medium for predicting user churn. The method acquires user data of a target user; processes the user data based on a preset unified feature engineering strategy to extract target features; inputs the target features into at least one trained primary prediction model to obtain a first prediction result; inputs the first prediction result output by the at least one primary prediction model into a trained secondary prediction model, which then fuses the first prediction results output by the at least one primary prediction model using a target fusion algorithm to obtain a second prediction result; and sorts the prediction results of each category in the second prediction result according to their confidence level, outputting the sorted second prediction result. The unified feature engineering strategy enables the automatic selection of suitable data processing methods for large amounts of user data in a short time and applies the extracted target features to model construction, avoiding the subjective influence of expert experience on data analysis and improving the efficiency of model construction. Furthermore, fusing different prediction models improves the model's fit, thereby further enhancing the accuracy of model prediction. Attached Figure Description

[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a flowchart illustrating a user churn prediction method provided in an embodiment of this application;

[0021] Figure 2 This is a flowchart illustrating another method for predicting user churn provided in an embodiment of this application;

[0022] Figure 3 This is a flowchart illustrating another user churn prediction method provided in an embodiment of this application;

[0023] Figure 4 This is a flowchart illustrating another method for predicting user churn provided in an embodiment of this application;

[0024] Figure 5 This is a flowchart illustrating another method for predicting user churn provided in an embodiment of this application;

[0025] Figure 6 This is a flowchart illustrating another method for predicting user churn provided in an embodiment of this application;

[0026] Figure 7 This is a schematic diagram of the structure of a user churn prediction device provided in an embodiment of this application;

[0027] Figure 8 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0028] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples.

[0029] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes said element.

[0030] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0031] Various modifications and variations can be made to this application without departing from its spirit or scope, which will be apparent to those skilled in the art. Therefore, this application is intended to cover modifications and variations falling within the scope of the corresponding claims (the claimed technical solutions) and their equivalents. It should be noted that the embodiments provided in this application can be combined with each other without contradiction.

[0032] Before describing the technical solutions provided in the embodiments of this application, in order to facilitate understanding of the embodiments of this application, this application first specifically explains the problems existing in the related technologies:

[0033] As mentioned above, the inventors of this application have discovered that related technologies typically use expert experience or model prediction methods to predict users who are about to churn. Expert experience prediction involves continuously identifying characteristics influencing user churn through methods such as user ratings during customer service processes, user follow-ups, and churn user analysis, and then identifying users who are about to churn through empirical rules. However, this method has the following problems: First, the analysis efficiency is low. Experts can often only analyze a small amount of user churn data and a few user characteristics at a time. When the data scale or user characteristics increase, it is necessary not only to analyze the impact of individual characteristics on target users, but also to analyze the mutual influence between characteristics. Expert prediction cannot meet the processing needs of large amounts of data and characteristics. Second, there is a large degree of subjective bias. Different experts have different understandings of user characteristics and reasons for user churn, which will bring a large degree of subjective bias to the analysis results. Third, it cannot quickly adapt to new characteristic changes. The reasons for user churn will continue to change with the development and use of the business, and experts often cannot analyze these rapidly changing characteristics in a timely manner.

[0034] Model prediction uses machine learning to build an analytical model based on the characteristics of historical churned users, and then uses the model to predict the probability of user churn. However, this method has the following problems: First, it fails to screen positive samples. All churned users within a period are used as positive samples during modeling, without removing users who have not used the service for several consecutive months, reducing the modeling difficulty and artificially inflating the model's accuracy. Second, it lacks a unified feature cleaning method. Modelers lack a unified standard to determine the optimal feature cleaning method, and manual judgment becomes inapplicable as the number of features used in modeling increases. Third, it uses few features and fails to build derived features. Only a few dozen features out of more than 170 user features are used in modeling, and the original features are used as model inputs without building derived features based on business needs. Fourth, it lacks a unified feature selection process. Redundant information between features is not handled during modeling, and features are not screened. Fifth, the model is relatively simple and underfits. The machine learning models used in modeling are mostly simple models, such as logistic regression and decision trees, which are prone to underfitting in the face of massive amounts of data. Sixth, it lacks model fusion. Currently, most modeling processes use a single model without model fusion.

[0035] In view of the inventors’ above-mentioned research findings, the embodiments of this application provide a method, apparatus, device and computer-readable storage medium for predicting user churn, which can solve the problems of low efficiency, high subjectivity and insufficient model prediction fitting and low accuracy in related technologies.

[0036] The following section first introduces the user churn prediction method provided in the embodiments of this application.

[0037] Figure 1 This is a flowchart illustrating a user churn prediction method provided in an embodiment of this application.

[0038] like Figure 1 As shown, the method may include the following steps:

[0039] S101. Obtain user data of the target user.

[0040] Based on historical analysis of users who left the network, the main reasons for user churn are user-related factors and user dissatisfaction with the operator's products or services. User-related factors mainly include changes in lifestyle, using multiple phone numbers, and service suspension due to unpaid bills. User dissatisfaction with the operator's products or services is primarily due to dissatisfaction with pricing.

[0041] Based on user-specific factors and user dissatisfaction with operator products or services, the reasons for user churn are categorized as follows: First, changes in the user's permanent residence. Users may change their permanent residence due to work or life reasons, leading to sudden roaming. This is determined by extracting relevant indicators such as roaming call duration, long-distance call duration, and trends of these indicators, as well as the stability of the user's core social circle over the past few months. Second, lack of suitable plans. Users may choose to churn due to high costs or poor user experience. This is determined by extracting indicators such as average revenue per user (ARPU), monthly call time (MOU), and monthly data flow of usage (DOU) over the past few months, as well as trends of these indicators, to determine if the user's plan is suitable. Third, the influence of the user's social circle. If a large number of users in the user's social circle have churned or use other networks, the user may choose to churn due to the influence of their social circle. This is determined by extracting features such as call duration and frequency with users on other networks.

[0042] Select target users for a given calendar month. Based on the classification results of the reasons for user churn, obtain user data for the target users for four months: the current month, the previous month, the two months prior, and the three months prior. User data can be categorized into numerical features and categorical features. Specific user data may include, but is not limited to, user attribute data, consumption behavior data, and call behavior data with other networks. Examples include user ID, whether the user is a churned user, network tenure, age, gender, recharge amount, total data usage, number of calls made to other networks, and number of complaints.

[0043] S102. Based on the preset unified feature engineering strategy, process the user data of the target user and extract the target features.

[0044] The pre-defined unified feature engineering strategy includes a series of data processing methods such as feature cleaning, feature scaling, and feature selection for user data, as well as methods for calculating derived features such as trends and proportions based on user data. Based on the pre-defined unified feature engineering strategy, user data of target users is processed, and derived features are constructed to extract target features from the user data.

[0045] S103. Input the target features into at least one trained primary prediction model to obtain the first prediction result.

[0046] Before acquiring user data of the target user, at least one primary prediction model is pre-trained. The target features extracted from the user data of the target user are input into different primary prediction models to obtain the user churn probability values ​​predicted by different primary prediction models, which are used as the first prediction results.

[0047] S104. Input the first prediction result output by at least one primary prediction model into the trained secondary prediction model. The secondary prediction model fuses the first prediction results output by at least one primary prediction model based on the target fusion algorithm to obtain the second prediction result.

[0048] Before acquiring user data for the target user, a secondary prediction model is pre-trained. The user churn probability values ​​predicted by different primary prediction models are input into the secondary prediction model. The secondary prediction model fuses the different user churn probability values ​​based on the target fusion algorithm to obtain the final predicted user churn probability value, which serves as the second prediction result.

[0049] S105. Sort the prediction results of each category in the second prediction results according to their confidence levels, and output the sorted second prediction results.

[0050] Sort the user churn probability values ​​of each category in the second prediction results according to their confidence level, and output the target users with the highest user churn probability values.

[0051] The user churn prediction method of this application embodiment acquires user data of the target user; processes the user data of the target user based on a preset unified feature engineering strategy to extract target features; inputs the target features into at least one trained primary prediction model to obtain a first prediction result; inputs the first prediction result output by at least one primary prediction model into a trained secondary prediction model, and the secondary prediction model fuses the first prediction results output by at least one primary prediction model based on a target fusion algorithm to obtain a second prediction result; sorts the prediction results of each category in the second prediction result according to their confidence level, and outputs the sorted second prediction result. Based on the unified feature engineering strategy, a suitable data processing method can be automatically selected for a large amount of user data in a short time, and the extracted target features can be applied to the model construction, avoiding the subjective influence of expert experience on data analysis and improving the efficiency of model construction. Furthermore, fusing different prediction models can improve the model's fit, thereby further improving the accuracy of model prediction.

[0052] In some embodiments, user data of target users is processed based on a preset unified feature engineering strategy to extract target features, specifically including: imputing missing values ​​in the user data of target users; handling outliers in the imputed user data; constructing derived features based on the outlier-handled user data; and selecting target features from the original features and derived features in the outlier-handled user data.

[0053] For example, based on a pre-defined unified feature engineering strategy, missing values ​​are imputed in the user data of the target user. Then, outlier handling is performed on the imputed user data. Combining the operator's business characteristics, derived features are constructed from the original features in the outlier-handled user data. Finally, the target feature is selected from the original features and the constructed derived features. The various stages of unified feature engineering are interconnected and progressively advanced. It can automatically select the most suitable missing value imputation strategy or outlier handling strategy based on the original features in the user data, eliminating the need for tedious manual trials. This approach is more flexible and adaptable, and its application to the construction of other new models significantly improves the efficiency of model building.

[0054] The derived features can include, but are not limited to, trend features, fluctuation features, and features reflecting whether categorical features have changed. Trend features can include, but are not limited to, traffic trends, average traffic trends, trends in the number of contact numbers, and average trends in the number of contact numbers. The trend value is the ratio of the current month's usage behavior to the average of the usage behavior over the past three months, and the average trend value is the average of the current month's trend value and the previous month's trend value. Fluctuation features can include, but are not limited to, traffic variation ratio, traffic standard deviation, variation ratio of the number of contact numbers, and standard deviation of contact numbers. The variation ratio is the ratio of the difference between the current month's usage behavior and the previous month's usage behavior to the usage behavior of the previous month, and the standard deviation is the standard deviation of the usage behavior over the past four months. For categorical features in user data, such as the city of residence, if the city of residence in the current month is different from the city of residence in the previous month, the derived feature reflecting "whether the city of residence has changed" will be set to 1; otherwise, it will be set to 0.

[0055] Figure 2 This is a flowchart illustrating another user churn prediction method provided in an embodiment of this application. For example... Figure 2 As shown, according to some embodiments of this application, optionally, filling missing values ​​in the user data of the target user may further include the following steps S201 to S207.

[0056] S201. Select a numerical feature from the user data.

[0057] S202. Calculate the percentage of the first missing value of the numerical feature and the first correlation coefficient between the numerical feature and the preset label, whereby the preset label is used to characterize whether the user has left the network.

[0058] Calculate the percentage of missing values ​​in the numerical features and the correlation coefficient between the numerical features and the preset labels, i.e., the percentage of the first missing value and the first correlation coefficient. If the target user is an offline user, their preset label is 1; if the target user is an online user, their preset label is 0.

[0059] S203. Based on the first comparison result between the preset correlation coefficient threshold and the first correlation coefficient, and the second comparison result between the preset missing value threshold and the proportion of the first missing value, determine whether to retain the numerical feature.

[0060] The higher the first correlation coefficient of a numerical feature, the higher the acceptable percentage of first missing values. Correlation coefficient thresholds and missing value thresholds are set in segments, with different intervals selected for processing based on the actual situation. For example, correlation coefficient thresholds α1, α2, α3 (α1 < α2 < α3) and missing value thresholds β1, β2, β3 (β1 < β2 < β3) are set. If the first correlation coefficient < α1 and the percentage of first missing values ​​< β1, the numerical feature is retained; if α2 ≤ first correlation coefficient ≤ α3 and the percentage of first missing values ​​< β2, the numerical feature is retained; if the first correlation coefficient > α3 and the percentage of first missing values ​​< β3, the numerical feature is retained; otherwise, the numerical feature is not retained, and the process returns to S201 to select a numerical feature from the user data.

[0061] S204. While retaining the numerical features, fill in the missing values ​​of the numerical features according to several preset filling strategies.

[0062] For the retained numerical features, fill in the missing values ​​of the numerical features with specified values, within-group mean, within-group median, within-group mode, and regression methods, respectively.

[0063] S205. Calculate the Fisher score of the numerical features after each filling strategy, and retain the numerical features filled by the filling strategy with the highest Fisher score.

[0064] Calculate the Fisher score for the numerical features filled with specified values, within-group mean, within-group median, within-group mode, and regression. The filling strategy with the highest Fisher score is selected as the optimal missing value filling strategy, and the numerical features filled by this strategy are retained. The formula for calculating the Fisher score is shown in formula (1):

[0065]

[0066] Among them, u j and ρ j These are the mean and variance of the feature in category j, respectively, where u is the mean of the feature and n is the variance of the feature. jdenoted as the number of samples in category j. A higher Fisher score indicates greater feature importance, as it represents greater variability between different categories and less variability within the same category.

[0067] S206. Determine whether there are any unprocessed numerical features in the user data. If there are unprocessed numerical features in the user data, return to S201 to select one numerical feature from the user data.

[0068] If there are unprocessed numerical features in the user data, select a numerical feature from the user data again and continue to execute steps S202 to S205; if there are no unprocessed numerical features in the user data, execute step S207 to output the numerical features after missing value filling.

[0069] Figure 3 This is a flowchart illustrating another user churn prediction method provided in an embodiment of this application. For example... Figure 3 As shown, according to some embodiments of this application, optionally, filling missing values ​​in the user data of the target user may further include the following steps S301 to S307.

[0070] S301. Select a categorical feature from the user data.

[0071] S302. Calculate the proportion of the second missing value of the categorical feature and the second correlation coefficient between the categorical feature and the preset label, which is used to characterize whether the user has left the network.

[0072] S303. Based on the first comparison result between the preset correlation coefficient threshold and the second correlation coefficient, and the second comparison result between the preset missing value threshold and the second missing value ratio, determine whether to retain the categorical feature.

[0073] S301 to S303 are the same as S201 to S203 in the above embodiments, and will not be described in detail here for the sake of brevity.

[0074] S304. While retaining categorical features, fill in the missing values ​​of categorical features according to several preset filling strategies.

[0075] For the retained categorical features, fill the missing values ​​of the categorical features with the specified values ​​and the mode of the group, respectively.

[0076] S305. Calculate the correlation confidence of the categorical features after filling each filling strategy based on the chi-square test algorithm, and retain the categorical features filled by the filling strategy with the highest correlation confidence.

[0077] The chi-square test algorithm is used to calculate the correlation confidence of categorical features filled with specified values ​​and the mode within a group. The filling strategy with the highest correlation confidence is taken as the best filling strategy, and the categorical features filled by this strategy are retained.

[0078] S306. Determine whether there are unprocessed categorical features in the user data. If there are unprocessed categorical features in the user data, return to S301 to select one categorical feature from the user data.

[0079] If there are unprocessed categorical features in the user data, select a categorical feature from the user data and continue to execute steps S302 to S305; if there are no unprocessed categorical features in the user data, execute step S307 to output the categorical features after missing value filling.

[0080] Figure 4 This is a flowchart illustrating another user churn prediction method provided in an embodiment of this application. For example... Figure 4 As shown, according to some embodiments of this application, optionally, outlier processing of user data after missing value filling may further include the following steps S401 to S407.

[0081] S401. Select a numerical feature from the user data after missing values ​​have been filled.

[0082] S402. Calculate the skewness of numerical features.

[0083] S403. Determine the target location of outliers in numerical features based on the skewness of the numerical features.

[0084] If the numerical feature is right-skewed, the target location of outliers is at the larger end of the data set, and outlier handling needs to be performed on the larger end of the user data set; if the data is left-skewed, the target location of outliers is at the smaller end of the data set, and outlier handling needs to be performed on the smaller end of the user data set.

[0085] S404. Process the outliers at the target location according to multiple preset outlier filling strategies.

[0086] Outliers at the target location were filled or removed using different filling strategies: no processing, filling with upper and lower limits set at 0.5% using the percentile method, directly removing data with upper and lower limits set at 0.5% using the percentile method, filling with upper and lower limits set at 1.5 times the interquartile range using the box plot method, and directly removing data with upper and lower limits set at 1.5 times the interquartile range using the box plot method.

[0087] S405. Calculate the Fisher score of each outlier filling strategy for the numerical features, and retain the numerical features processed by the filling strategy with the highest Fisher score.

[0088] Calculate the Fisher score of the numerical features after processing by each outlier filling strategy according to formula (1), and take the filling strategy with the highest Fisher score as the best outlier processing strategy and retain the numerical features processed by the strategy.

[0089] S406. Determine whether there are unprocessed numerical features in the user data after missing value filling. If there are unprocessed numerical features in the user data after missing value filling, return to S401 to select one numerical feature in the user data after missing value filling.

[0090] If there are unprocessed numerical features in the user data after missing value filling, select one numerical feature from the user data after missing value filling and continue to execute steps S402 to S405; if there are no unprocessed numerical features in the user data after missing value filling, execute step S407 to output the numerical features after outlier processing.

[0091] Figure 5 This is a flowchart illustrating another user churn prediction method provided in an embodiment of this application. For example... Figure 5 As shown, according to some embodiments of this application, optionally, outlier processing of user data after missing value filling may also include the following steps S501 to S506.

[0092] S501. Select a categorical feature from the user data after missing values ​​have been filled.

[0093] S502. Calculate the percentage of the third missing value for categorical features.

[0094] S503. Based on the proportion of the third missing value of the categorical feature, select at least one outlier imputation strategy to process the categorical feature.

[0095] Outliers are filled or removed by employing filling strategies of not processing, removing data with a proportion <0.01, and filling data with a proportion <0.01 according to rules.

[0096] S504. Calculate the correlation confidence of the categorical features after processing by each outlier filling strategy based on the chi-square test algorithm, and retain the categorical features processed by the outlier filling strategy with the highest correlation confidence.

[0097] The chi-square test algorithm is used to calculate the correlation confidence of the categorical features after processing by each outlier filling strategy. The filling strategy with the highest correlation confidence is taken as the best outlier processing strategy, and the categorical features processed by this strategy are retained.

[0098] S505. Determine whether there are unprocessed categorical features in the user data after missing value imputation. If there are unprocessed categorical features in the user data after missing value imputation, return to S501 to select one categorical feature from the user data after missing value imputation.

[0099] If there are unprocessed categorical features in the user data after missing value filling, select one categorical feature from the user data after missing value filling and continue to execute steps S502 to S504; if there are no unprocessed categorical features in the user data after missing value filling, execute step S506 to output the categorical features after outlier processing.

[0100] In some embodiments, selecting target features from the original features and derived features in the outlier-processed user data specifically includes: selecting a first number of features from the original features and derived features based on a filtering algorithm; selecting a second number of features from the original features and derived features based on a heuristic search algorithm; selecting a third number of features from the original features and derived features based on a model-building method; and calculating the intersection or union of the first number of features, the second number of features, and the third number of features to obtain the target features.

[0101] For example, the user data after outlier processing contains approximately 200 original and derived features. Since there are correlations between original features, between original and derived features, and between derived features themselves, feature redundancy exists, necessitating feature selection. Commonly used feature selection methods include filtering algorithms, wrapping algorithms, and embedding algorithms; this application embodiment comprehensively considers all three algorithms.

[0102] Fisher scores are calculated based on the filtering algorithm for the original features, derived features, and preset labels. All features are sorted in descending order of Fisher scores, and the top number of features with the highest Fisher scores are retained as the result of feature selection.

[0103] The heuristic search algorithm in the packaging algorithm is a sequential forward selection method. Based on this heuristic search algorithm, all original and derived features are used as candidate feature sets. An empty set is constructed as the selected feature set. Each time, a feature that optimizes the model's evaluation metric is selected from the candidate feature set and added to the selected feature set. A model is trained based on the selected feature set until adding more features to the selected feature set no longer improves the model's performance. The output is a selected feature set containing a second number of features. To reduce computational complexity, when using heuristic search for feature selection, this embodiment randomly samples small batches of data from all user data to train the model. The trained model uses a decision tree algorithm with a maximum depth of 5 to prevent overfitting.

[0104] Embedding algorithms are a model-based approach. They train a random forest model using all original and derived features, calculate the importance of each feature using the random forest model, sort all features in descending order of importance, and retain the top three most important features as the result of feature selection.

[0105] The intersection or union of the first number of features selected by the filtering algorithm, the second number of features selected by the heuristic search algorithm, and the third number of features selected by the model-based method is taken as the final feature selection result output, thus obtaining the target features.

[0106] In some embodiments, before acquiring user data of the target user, the prediction method further includes: acquiring sample user data of sample users; processing the sample user data based on a unified feature engineering strategy to extract sample target features; dividing the sample target features into a first dataset, a second dataset, and a third dataset in proportion; training at least one primary prediction model using the first dataset to obtain at least one trained primary prediction model; training a secondary prediction model using the second dataset based on the trained at least one primary prediction model; fusing the trained at least one primary prediction model and the secondary prediction model; and validating the fused primary prediction model and secondary prediction model using the third dataset.

[0107] For example, sample user data is processed based on a unified feature engineering strategy to obtain sample target features. These target features are then divided proportionally, for instance, 70% of the target features are assigned to the first dataset, 20% to the second dataset, and 10% to the third dataset. A grid search combined with ten-fold cross-validation is used to train at least one primary prediction model on the first dataset and a secondary prediction model on the second dataset.

[0108] Grid search is a model hyperparameter optimization technique, commonly used to optimize three or fewer hyperparameters; essentially, it's an exhaustive search method. For each hyperparameter, the user defines a small finite set as the parameter search space. The Cartesian product of these hyperparameters yields several sets of hyperparameters. Each set of hyperparameters is used to train the model, and the hyperparameter with the smallest validation set error is selected as the optimal hyperparameter. The model is then retrained using the optimal hyperparameter. For example, if there are three hyperparameters A, B, and C to optimize, with candidate values ​​{1,2}, {3,4}, and {5,6}, then all possible combinations of parameter values ​​form an 8-point 3D grid space as follows: {(1,3,5), (1,3,6), (1,4,5), (1,4,6), (2,3,5), (2,3,6), (2,4,5), (2,4,6)}. Grid search iterates through these 8 possible combinations of parameter values, performing training and validation to ultimately obtain the optimal hyperparameter.

[0109] Cross-validation first divides the dataset D into k mutually exclusive subsets of similar size, i.e. Each subset strives to maintain a consistent data distribution, meaning it is obtained by stratified sampling from D. Each time, the union of k-1 subsets is used as the training set, and the remaining subset is used as the test set. This results in k training and test sets, allowing for k training and testing iterations. The final output is the average of the results from the k training and testing iterations. The stability and fidelity of cross-validation largely depend on the choice of k value; therefore, this method is also known as "k-fold cross-validation." When k is 10, it is called ten-fold cross-validation.

[0110] The embodiments of this application are based on a grid search combined with ten-fold cross-validation. The primary prediction models trained on the first dataset mainly include random forest model, gradient boosting decision tree (GBDT) model and catBoost model.

[0111] Random forest models are based on the bootstrap aggregating (Bagging) algorithm and use decision trees as base learners. Traditional decision trees select the optimal attribute from the current node's attribute set when choosing the splitting attribute. In contrast, for each node in the base decision tree, a subset containing k attributes is first randomly selected from the node's attribute set (assuming d attributes). Then, the optimal attribute is selected from this subset for the split. The parameter k controls the degree of randomness introduced. Random forest models are simple, easy to implement, and computationally inexpensive, demonstrating powerful performance in many real-world tasks.

[0112] In this embodiment, grid search was used to tune several of the most important parameters of the random forest model, such as the number of base learners, the maximum depth of base learners, the minimum number of node splits, the minimum number of samples per node, and the maximum number of features. The tuning range for the number of base learners was 20-150, the maximum depth was 5-15, the minimum number of node splits and the minimum number of samples per node were 10-200, and the maximum number of features was 7-20. The tuning results showed that the model performance basically stopped improving after the number of base learners exceeded 50, and the maximum depth was prone to overfitting if it exceeded 10. Therefore, considering both model performance and training / prediction efficiency, the following settings were chosen: 50 base learners, 10 maximum depth, 20 minimum number of node splits, 20 minimum number of samples per node, and 15 maximum number of features.

[0113] The gradient boosting decision tree model is based on the boosting algorithm and uses a Classification and Regression Tree (CART) as the base learner. Unlike guided aggregation algorithms, which focus on reducing the variance of the learner, boosting algorithms focus on reducing the bias of the learner, mainly addressing the underfitting problem. Its basic process is as follows: Initialize a weak learner f0(x); calculate the negative gradient for each sample to approximate the residual, and use the negative gradient as the new true value of the sample, as the training data for the next regression tree, to obtain the new regression tree f0(x). m (x) Then calculate the best-fit value of its leaf node and update the strong learner; after M iterations, the final learner is obtained.

[0114] In this embodiment, grid search was used to tune the parameters of the gradient boosting decision tree model, including the number of base learners, maximum depth of base learners, minimum number of node splits, and minimum number of samples per node. The tuning range for the number of base learners was 20-200, the maximum depth was 5-15, and the minimum number of node splits and minimum number of samples per node were 10-200. The tuning results showed that the model performance did not improve significantly after the number of base learners exceeded 100, and the performance improvement was also minimal after the maximum depth exceeded 10. Therefore, considering both model performance and training / prediction efficiency, a base learner count of 100, a maximum depth of 10, a minimum number of node splits of 10, and a minimum number of samples of 20 were selected.

[0115] The CatBoost model is an improvement on the gradient boosting decision tree framework. It uses symmetric decision trees as base learners, achieving a gradient boosting decision tree framework with fewer parameters, support for categorical variables, and high accuracy, efficiently and reasonably handling categorical features. Furthermore, the CatBoost model addresses gradient bias and prediction offset issues, thereby reducing overfitting and improving the algorithm's accuracy and generalization ability.

[0116] In this embodiment, grid search was used to tune the parameters of the CatBoost model, including the number of base learners, maximum base learner depth, L2 regularization coefficient, and number of numerical feature splits. The tuning range for the number of base learners was 20-200, the maximum depth was 5-15, the L2 regularization coefficient was 1-20, and the number of numerical feature splits was 64-256. Similar to the gradient boosting decision tree model, the tuning results were as follows: 100 base learners, 10 maximum depth, and 9 L2 regularization coefficient were selected. Since a number of numerical splits greater than 64 has little impact on model performance, 64 numerical splits were chosen to consider training speed.

[0117] Based on at least one trained primary prediction model, the Stacking fusion algorithm is used to take the user churn probability values ​​predicted by the three primary prediction models as input to the secondary prediction model. The secondary prediction model is trained on the second dataset. The trained primary prediction model and the secondary prediction model are then fused to obtain the fused model.

[0118] In this application embodiment, the secondary prediction model mainly includes the Logistic Regression (LR) model. The Logistic Regression model can directly model the probability of classification without prior assumptions about the data distribution, thus avoiding the problems caused by inaccurate distribution. It can not only predict the category, but also obtain an approximate probability, which is very helpful for selecting target users with a high probability of leaving the network.

[0119] The logistic regression model uses the Sigmoid function as the predicted value and obtains the loss function through maximum likelihood estimation. The Sigmoid function is shown in Equation (2):

[0120]

[0121] The loss function is shown in equation (3):

[0122]

[0123] In the parameter tuning process of the logistic regression model in this application embodiment, a suitable loss function optimizer is first selected. Through grid tuning results, it is found that the quasi-Newton method "lbfgs" optimizer has better performance and training speed. Since the "lbfgs" optimizer only supports L2 regularization, the parameter optimizer is selected as "lbfgs", and the regularization is L2. Since offline users usually account for a small proportion of the total users, it is necessary to increase the weight of offline user samples. The type weight parameter is further tuned, with a tuning range of {'0':0.5,'1':0.5} to {'0':0.1,'1':0.9}. Based on the tuning results, the type weight is selected as {'0':0.7,'1':0.3}.

[0124] The fused model of the primary and secondary prediction models was validated on a third dataset. The predicted user churn probability values ​​of the fused model were compared with the actual user churn probability values ​​to obtain the evaluation results of the fused model. The fused model possesses the predictive performance advantages of each complex machine learning model, and its prediction results are closer to the actual user churn probability values ​​than those of a single primary prediction model, thus improving the accuracy of the model's predictions.

[0125] After validating the fused model on the third dataset, the predicted user churn probability values ​​of the fused model are sorted according to confidence level, and the target users with the highest user churn probability values ​​are output.

[0126] Figure 6 This is a flowchart illustrating another user churn prediction method provided in an embodiment of this application. For example... Figure 6 As shown, according to some embodiments of this application, optionally, before inputting the target features into at least one trained primary prediction model in S103 to obtain the first prediction result, the user churn prediction method provided in the embodiments of this application may further include the following steps S601 to S602.

[0127] S601. Obtain sample user data of sample users at preset intervals;

[0128] S602. Retrain at least one primary prediction model and one secondary prediction model using sample user data to obtain at least one retrained primary prediction model and one retrained secondary prediction model.

[0129] For example, before performing model prediction, the user churn prediction device automatically acquires the latest sample user data every preset time interval, and retrains at least one primary prediction model and a secondary prediction model based on the latest acquired sample user data, selects the model parameters that make the evaluation index optimal to update the prediction model, so that the prediction model can adapt to new user data changes in a timely manner.

[0130] In some embodiments, after obtaining the user data of the target user, the prediction method further includes: removing user data that has not had any usage behavior for a recent preset period of time from the user data to obtain the original data; and processing the user data of the target user based on a preset unified feature engineering strategy to extract target features, specifically including: processing the original data based on the unified feature engineering strategy to extract target features.

[0131] For example, after obtaining user data from the target users, some users have not used the platform for several consecutive months. These users are easily identified by the model, reducing the difficulty of modeling and artificially inflating the model's accuracy. Furthermore, in the customer service retention process, the retention rate for these unreachable users is extremely low. Therefore, the user data of these users should be removed from the obtained user data. Using the removed user data as the original data avoids unnecessary predictions for these users and improves the efficiency of customer service retention.

[0132] Based on the user churn prediction method provided in the above embodiments, this application also provides a specific implementation of a user churn prediction device. Please refer to the following embodiments.

[0133] First see Figure 7 The user churn prediction device 70 provided in this application embodiment includes the following modules:

[0134] Module 701 is used to acquire user data of the target user;

[0135] The extraction module 702 is used to process the user data of the target user based on a preset unified feature engineering strategy and extract the target features.

[0136] The first prediction module 703 is used to input the target features into at least one trained primary prediction model to obtain a first prediction result.

[0137] The second prediction module 704 is used to input the first prediction result output by at least one primary prediction model into the trained secondary prediction model. The secondary prediction model fuses the first prediction result output by at least one primary prediction model based on the target fusion algorithm to obtain the second prediction result.

[0138] The output module 705 is used to sort the prediction results of each category in the second prediction result according to the confidence level and output the sorted second prediction result.

[0139] The user churn prediction device of this application embodiment acquires user data of target users; processes the user data of target users based on a preset unified feature engineering strategy to extract target features; inputs the target features into at least one trained primary prediction model to obtain a first prediction result; inputs the first prediction result output by at least one primary prediction model into a trained secondary prediction model, and the secondary prediction model fuses the first prediction results output by at least one primary prediction model based on a target fusion algorithm to obtain a second prediction result; sorts the prediction results of each category in the second prediction result according to their confidence level, and outputs the sorted second prediction result. Based on the unified feature engineering strategy, a suitable data processing method can be automatically selected for a large amount of user data in a short time, and the extracted target features can be applied to the model construction, avoiding the subjective influence of expert experience on data analysis and improving the efficiency of model construction. Furthermore, fusing different prediction models can improve the model's fit, thereby further improving the accuracy of model prediction.

[0140] In some embodiments, the extraction module 702 is specifically used for: filling missing values ​​in the user data of the target user; performing outlier processing on the user data after missing value filling; constructing derived features based on the user data after outlier processing; and filtering out the target features from the original features and derived features in the user data after outlier processing.

[0141] In some embodiments, the extraction module 702 can also be used to: select a numerical feature from the user data; calculate the first missing value ratio of the numerical feature and the first correlation coefficient between the numerical feature and a preset label, wherein the preset label is used to characterize whether the user has left the network; determine whether to retain the numerical feature based on the first comparison result between the preset correlation coefficient threshold and the first correlation coefficient, and the second comparison result between the preset missing value threshold and the first missing value ratio; if the numerical feature is retained, fill the missing values ​​of the numerical feature according to a plurality of preset different filling strategies; calculate the Fisher score of the numerical feature after filling by each filling strategy, and retain the numerical feature filled by the filling strategy with the highest Fisher score; determine whether there are unprocessed numerical features in the user data, and if there are unprocessed numerical features in the user data, return to the step of selecting a numerical feature from the user data.

[0142] In some embodiments, the extraction module 702 described above can also be used to: select a categorical feature from the user data; calculate the proportion of second missing values ​​of the categorical feature and the second correlation coefficient between the categorical feature and a preset label, wherein the preset label is used to characterize whether a user has left the network; determine whether to retain the categorical feature based on a first comparison result between a preset correlation coefficient threshold and the second correlation coefficient, and a second comparison result between a preset missing value threshold and the proportion of second missing values; if the categorical feature is retained, fill in the missing values ​​of the categorical feature according to a plurality of preset filling strategies; calculate the correlation confidence of the categorical feature filled by each filling strategy based on the chi-square test algorithm, and retain the categorical feature filled by the filling strategy with the highest correlation confidence; determine whether there is an unprocessed categorical feature in the user data, and if there is an unprocessed categorical feature in the user data, return to the step of selecting a categorical feature from the user data.

[0143] In some embodiments, the extraction module 702 can also be used to: select a numerical feature from the user data after missing value imputation; calculate the skewness of the numerical feature; determine the target location of outliers in the numerical feature based on the skewness of the numerical feature; process the outliers at the target location according to a plurality of preset outlier imputation strategies; calculate the Fisher score of the numerical feature processed by each outlier imputation strategy, and retain the numerical feature processed by the imputation strategy with the highest Fisher score; determine whether there are unprocessed numerical features in the user data after missing value imputation, and if there are unprocessed numerical features in the user data after missing value imputation, return to the step of selecting a numerical feature from the user data after missing value imputation.

[0144] In some embodiments, the extraction module 702 may also be used to: select a categorical feature from the user data after missing value imputation; calculate the proportion of the third missing value of the categorical feature; select at least one outlier imputation strategy to process the categorical feature according to the proportion of the third missing value of the categorical feature; calculate the correlation confidence of the categorical feature processed by each outlier imputation strategy based on the chi-square test algorithm, and retain the categorical feature processed by the outlier imputation strategy with the highest correlation confidence; determine whether there is an unprocessed categorical feature in the user data after missing value imputation, and if there is an unprocessed categorical feature in the user data after missing value imputation, return to the step of selecting a categorical feature from the user data after missing value imputation.

[0145] In some embodiments, the extraction module 702 can also be used to: filter out a first number of features from the original features and derived features based on a filtering algorithm; filter out a second number of features from the original features and derived features based on a heuristic search algorithm; filter out a third number of features from the original features and derived features based on a model building method; and calculate the intersection or union of the first number of features, the second number of features, and the third number of features to obtain the target features.

[0146] In some embodiments, the user churn prediction device 70 may further include: a fusion module 706, configured to acquire sample user data of sample users; process the sample user data based on a unified feature engineering strategy to extract sample target features; divide the sample target features into a first dataset, a second dataset, and a third dataset in proportion; train at least one primary prediction model using the first dataset to obtain at least one trained primary prediction model; train a secondary prediction model using the second dataset based on the trained at least one primary prediction model; fuse the trained at least one primary prediction model and the secondary prediction model; and verify the fused primary prediction model and secondary prediction model using the third dataset.

[0147] In some embodiments, the user churn prediction device 70 may further include: an update module 707, configured to acquire sample user data of sample users at preset intervals; and retrain at least one primary prediction model and a secondary prediction model using the sample user data to obtain at least one retrained primary prediction model and a retrained secondary prediction model.

[0148] In some embodiments, the user churn prediction device 70 may further include: a filtering module 708, used to remove user data that has not been used for a preset period of time from user data to obtain raw data; and to process the user data of target users based on a preset unified feature engineering strategy to extract target features, specifically including: processing the raw data based on the unified feature engineering strategy to extract target features.

[0149] Figure 7 Each module in the device shown has the function of implementing each step in the user churn prediction method provided in the above method embodiments, and can achieve the corresponding technical effect. For the sake of brevity, it will not be described in detail here.

[0150] Based on the user churn prediction method provided in the above embodiments, this application also provides specific implementation methods for electronic devices. Please refer to the following embodiments.

[0151] Figure 8 A schematic diagram of the hardware structure of the electronic device provided in an embodiment of this application is shown.

[0152] Electronic devices may include a processor 801 and a memory 802 storing computer program instructions.

[0153] Specifically, the processor 801 may include a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.

[0154] Memory 802 may include mass storage for data or instructions. For example, and not limitingly, memory 802 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. In one example, memory 802 may include removable or non-removable (or fixed) media, or memory 802 may be non-volatile solid-state memory. Memory 802 may be internal or external to the integrated gateway disaster recovery device.

[0155] In one example, memory 802 may be read-only memory (ROM). In one example, the ROM may be a mask-programmed ROM, a programmable ROM (PROM), an erasable PROM (EPROM), an electrically erasable PROM (EEPROM), an electrically rewritable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0156] Memory 802 may include read-only memory (ROM), random access memory (RAM), disk storage media device, optical storage media device, flash memory device, electrical, optical, or other physical / tangible memory storage device. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to one aspect of this application.

[0157] The processor 801 reads and executes the computer program instructions stored in the memory 802 to implement the methods / steps in the above method embodiments and achieve the corresponding technical effects achieved by the method embodiments in executing their methods / steps. For the sake of brevity, these details will not be repeated here.

[0158] In one example, the electronic device may also include a communication interface 803 and a bus 810. For example, Figure 8 As shown, the processor 801, memory 802, and communication interface 803 are connected through bus 810 and complete communication with each other.

[0159] The communication interface 803 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.

[0160] Bus 810 includes hardware, software, or both, that couples components of an electronic device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Extended Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 810 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, this application contemplates any suitable bus or interconnect.

[0161] Furthermore, in conjunction with the user churn prediction methods in the above embodiments, this application embodiment can provide a computer-readable storage medium for implementation. This computer-readable storage medium stores computer program instructions; when executed by a processor, these computer program instructions implement any of the user churn prediction methods in the above embodiments. Examples of computer-readable storage media include non-transitory computer-readable storage media, such as electronic circuits, semiconductor memory devices, ROM, random access memory, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, and hard disks.

[0162] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.

[0163] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.

[0164] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.

[0165] The aspects of this application have been described above with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block in the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that these instructions, executable via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowchart illustrations and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0166] The above description is merely a specific implementation of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.

Claims

1. A method for predicting user churn, characterized in that, include: Obtain user data from the target user; Based on a preset unified feature engineering strategy, the user data of the target user is processed to extract target features, including: imputing missing values ​​in the user data of the target user; performing outlier processing on the imputed user data; constructing derived features based on the outlier-processed user data; and selecting the target features from the original features and the derived features in the outlier-processed user data. The target features are input into at least one trained primary prediction model to obtain a first prediction result; The first prediction result output by the at least one primary prediction model is input into the trained secondary prediction model, and the secondary prediction model fuses the first prediction result output by the at least one primary prediction model based on the target fusion algorithm to obtain a second prediction result. Sort the prediction results of each category in the second prediction result according to their confidence level, and output the sorted second prediction result; The step of filtering the target feature from the original features and the derived features in the user data after outlier processing specifically includes: A first number of features are selected from the original features and the derived features based on a filtering algorithm; A second number of features are selected from the original features and the derived features based on a heuristic search algorithm; A third number of features are selected from the original features and the derived features based on a model-building method; The target feature is obtained by calculating the intersection or union of the first number of features, the second number of features, and the third number of features.

2. The method according to claim 1, characterized in that, The process of filling in missing values ​​for the user data of the target user specifically includes: Select a numerical feature from the user data; Calculate the percentage of first missing values ​​for the numerical feature and the first correlation coefficient between the numerical feature and the preset label, where the preset label is used to characterize whether the user has left the network; Based on the first comparison result between the preset correlation coefficient threshold and the first correlation coefficient, and the second comparison result between the preset missing value threshold and the proportion of the first missing value, it is determined whether to retain the numerical feature; While retaining the numerical features, the missing values ​​of the numerical features are filled according to a number of preset filling strategies. Calculate the Fisher score of the numerical feature after each of the filling strategies, and retain the numerical feature filled by the filling strategy with the highest Fisher score; Determine whether there are any unprocessed numerical features in the user data. If there are unprocessed numerical features in the user data, return to the step of selecting a numerical feature from the user data.

3. The method according to claim 1, characterized in that, The process of filling in missing values ​​for the user data of the target user specifically includes: Select one categorical feature from the user data; Calculate the percentage of second missing values ​​for the categorical feature and the second correlation coefficient between the categorical feature and a preset label, wherein the preset label is used to characterize whether a user has left the network; Based on the first comparison result between the preset correlation coefficient threshold and the second correlation coefficient, and the second comparison result between the preset missing value threshold and the proportion of the second missing value, it is determined whether to retain the categorical feature; While retaining the categorical features, the missing values ​​of the categorical features are filled according to a number of preset different filling strategies; The correlation confidence of the categorical features after filling each filling strategy is calculated based on the chi-square test algorithm, and the categorical features filled by the filling strategy with the highest correlation confidence are retained; Determine whether there are any unprocessed categorical features in the user data. If there are unprocessed categorical features in the user data, return to the step of selecting a categorical feature from the user data.

4. The method according to claim 1, characterized in that, The outlier handling process for the user data after missing value imputation specifically includes: Select one numerical feature from the user data after filling in missing values; Calculate the skewness of the numerical feature; Based on the skewness of the numerical features, determine the target location of outliers in the numerical features; The outliers at the target location are processed according to a number of preset outlier filling strategies. Calculate the Fisher score of the numerical feature after processing by each outlier filling strategy, and retain the numerical feature processed by the filling strategy with the highest Fisher score; Determine whether there are any unprocessed numerical features in the user data after missing value filling. If there are unprocessed numerical features in the user data after missing value filling, return to the step of selecting a numerical feature from the user data after missing value filling.

5. The method according to claim 1, characterized in that, The outlier handling process for the user data after missing value imputation specifically includes: Select a categorical feature from the user data after filling in missing values; Calculate the percentage of the third missing value for the categorical feature; Based on the proportion of the third missing value of the categorical feature, at least one outlier imputation strategy is selected to process the categorical feature. The correlation confidence of the categorical features after processing by each outlier filling strategy is calculated based on the chi-square test algorithm, and the categorical features processed by the outlier filling strategy with the highest correlation confidence are retained; Determine whether there are any unprocessed categorical features in the user data after missing value filling. If there are unprocessed categorical features in the user data after missing value filling, return to the step of selecting one categorical feature from the user data after missing value filling.

6. The method according to claim 1, characterized in that, Before obtaining the target user's user data, the process also includes: Obtain sample user data from sample users; Based on the unified feature engineering strategy, the sample user data is processed to extract the target features of the sample. The target features of the samples are divided into a first dataset, a second dataset, and a third dataset according to a certain ratio; Train at least one primary prediction model using the first dataset to obtain at least one trained primary prediction model. Based on at least one trained primary prediction model, a secondary prediction model is trained using the second dataset, and the trained primary prediction model and the secondary prediction model are then fused together. The primary prediction model and the secondary prediction model are validated using the third dataset.

7. The method according to claim 1, characterized in that, Before inputting the target features into at least one pre-trained primary prediction model to obtain the first prediction result, the method further includes: Sample user data of sample users is retrieved at preset intervals; The sample user data is used to retrain at least one primary prediction model and the secondary prediction model to obtain at least one retrained primary prediction model and the retrained secondary prediction model.

8. The method according to claim 1, characterized in that, After obtaining the target user's user data, the process also includes: Remove user data that has not shown any usage behavior within a preset time period from the user data to obtain the original data; The pre-defined unified feature engineering strategy processes the user data of the target user to extract target features, specifically including: The original data is processed based on the unified feature engineering strategy to extract the target features.

9. A device for predicting user churn, characterized in that, include: The acquisition module is used to acquire user data of the target user; The extraction module is used to process the user data of the target user based on a preset unified feature engineering strategy and extract target features, including: imputing missing values ​​in the user data of the target user; performing outlier processing on the imputed user data; constructing derived features based on the outlier-processed user data; and filtering the target features from the original features and the derived features in the outlier-processed user data. The first prediction module is used to input the target features into at least one trained primary prediction model to obtain a first prediction result. The second prediction module is used to input the first prediction result output by the at least one primary prediction model into the trained secondary prediction model. The secondary prediction model fuses the first prediction result output by the at least one primary prediction model based on the target fusion algorithm to obtain the second prediction result. The output module is used to sort the prediction results of each category in the second prediction result according to the confidence level and output the sorted second prediction result. The step of filtering the target feature from the original features and the derived features in the user data after outlier processing specifically includes: A first number of features are selected from the original features and the derived features based on a filtering algorithm; A second number of features are selected from the original features and the derived features based on a heuristic search algorithm; A third number of features are selected from the original features and the derived features based on a model-building method; The target feature is obtained by calculating the intersection or union of the first number of features, the second number of features, and the third number of features.

10. An electronic device, characterized in that, The electronic device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the user churn prediction method as described in any one of claims 1 to 8.

11. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the user churn prediction method as described in any one of claims 1 to 8.