Churned user identification method, apparatus, device, and storage medium
By generating new churn samples and training a classification model using the Gini coefficient, the problem of low accuracy in identifying churned users was solved, achieving higher identification accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA UNIONPAY
- Filing Date
- 2023-12-11
- Publication Date
- 2026-05-15
AI Technical Summary
In existing technologies, the uneven distribution of churned and non-churned users makes it difficult for classification models to accurately identify churned users, resulting in low accuracy.
By generating new lapsed samples to balance the number of lapsed and non-lapsed samples, and using the Gini coefficient calculated from the misclassification cost parameter to train the classification model, the accuracy of the classification model is improved.
It enables accurate identification of churned users, improves the recognition accuracy of the classification model, and reduces the probability of misidentifying churned users as non-churned users.
Smart Images

Figure CN117743918B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data processing, and in particular relates to a method, apparatus, device and storage medium for identifying lost users. Background Technology
[0002] As the user base for payment services continues to expand, user needs are also constantly evolving. Some users will churn. To improve the user experience for churned users, it's necessary to promptly identify and analyze those in the decline or churn phase, and then take appropriate measures to enhance their experience.
[0003] However, in business scenarios, the distribution of churned users and non-business churned users is uneven, with a severely imbalanced ratio. For example, the ratio of churned users to non-churned users is approximately 1:100. Classification models trained based on samples of churned and non-churned users with this imbalanced ratio struggle to accurately identify churned users, resulting in low accuracy in churned user identification. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for identifying churned users, which can improve the accuracy of identifying churned users.
[0005] In a first aspect, embodiments of this application provide a method for identifying churned users, comprising: acquiring training samples based on historical data, the training samples including feature vectors of churned users as churned samples and feature vectors of non-churned users as non-churned samples, the feature vectors being used to reflect the attribute characteristics of users; generating new churned samples based on the training samples and similarity parameters between the training samples, so that the number of churned samples and the number of non-churned samples meet a balance condition; training a classification model using the churned samples, non-churned samples, and the Gini coefficient calculated based on the acquired misclassification cost parameter; and classifying the feature vectors of the input user to be identified using the classification model that meets the training requirements, to determine whether the user to be identified is a churned user or a non-churned user.
[0006] Secondly, embodiments of this application provide a churned user identification device, comprising: an acquisition module, configured to acquire training samples based on historical data, the training samples including feature vectors of churned users as churned samples and feature vectors of non-churned users as non-churned samples, the feature vectors being used to reflect the attribute characteristics of users; a sample generation module, configured to generate new churned samples based on the training samples and similarity parameters between the training samples, so that the number of churned samples and the number of non-churned samples meet a balance condition; a model training module, configured to train a classification model using churned samples, non-churned samples, and a Gini coefficient calculated based on the acquired misclassification cost parameter; and a classification module, configured to classify the feature vectors of the input user to be identified using the classification model that meets the training requirements, and determine whether the user to be identified is a churned user or a non-churned user.
[0007] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory storing computer program instructions; the processor executes the computer program instructions to implement the churned user identification method of the first aspect.
[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer program instructions, which, when executed by a processor, implement the churned user identification method of the first aspect.
[0009] This application provides a method, apparatus, device, and storage medium for identifying churned users. It can acquire training samples, including churned and non-churned samples, from historical data. Based on similarity parameters between training samples, it generates new churned samples using the churned samples in the training samples, thereby increasing the number of churned samples in the training samples and achieving a balance between the number of churned and non-churned samples. The classification model is trained using these balanced churned and non-churned samples, resulting in a higher classification accuracy. The training process of the classification model also involves calculating the Gini coefficient based on the misclassification cost parameter. The participation of the Gini coefficient calculated based on the misclassification cost parameter can reduce the probability of the classification model misidentifying churned users as non-churned users, further improving the classification accuracy of the classification model, and thus improving the accuracy of identifying churned users. Attached Figure Description
[0010] 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.
[0011] Figure 1 A flowchart illustrating a churned user identification method provided in an embodiment of this application;
[0012] Figure 2 A flowchart of a churned user identification method provided in another embodiment of this application;
[0013] Figure 3 A schematic diagram illustrating an example of the processing procedure for training samples provided in an embodiment of this application;
[0014] Figure 4 A flowchart illustrating a churned user identification method provided in yet another embodiment of this application;
[0015] Figure 5 A flowchart illustrating a churned user identification method provided in another embodiment of this application;
[0016] Figure 6 This is a schematic diagram of the structure of a lost user identification device provided in an embodiment of this application;
[0017] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0018] 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. It should be noted that the acquisition, storage, use, and processing of information and data in the embodiments of this application are all authorized by users or relevant organizations and comply with the relevant provisions of national laws and regulations.
[0019] As the user base for payment services continues to expand, user needs are also constantly evolving. Some users will churn. To improve the user experience for churned users, it's crucial to promptly identify and analyze those in the decline or churn phase, and then implement appropriate measures to enhance their experience. However, in business scenarios, the distribution of churned users and non-churned users is uneven, with a severely imbalanced ratio—for example, approximately 1:100. Classification models trained using samples of churned and non-churned users with this imbalanced ratio struggle to accurately identify churned users, resulting in low accuracy in churn identification.
[0020] This application provides a method, apparatus, device, and storage medium for identifying churned users. It generates new churned samples based on similarity parameters between training samples, including churned and non-churned samples, thereby increasing the number of churned samples in the training samples and achieving a balance between churned and non-churned samples. The classification model trained using these balanced churned and non-churned samples achieves higher classification accuracy and can more accurately identify churned users. Furthermore, by using the Gini coefficient calculated based on the misclassification cost parameter in the training of the classification model, the probability of the model misidentifying churned users as non-churned users can be reduced, further improving the accuracy of the classification model in identifying churned users.
[0021] The following describes the method, apparatus, equipment, and storage medium for identifying lost users provided in this application.
[0022] The first aspect of this application provides a method for identifying churned users, which can be applied to scenarios where it is necessary to predict whether users participating in a business are about to churn. The type of business is not limited here; in this embodiment, a transaction-related business is used as an example for illustration. This method for identifying churned users can be executed by a churned user identification device, electronic equipment, etc., and is not limited thereto. Figure 1 A flowchart of a churned user identification method provided in an embodiment of this application is shown below. Figure 1 As shown, the method for identifying lost users may include steps S101 to S104.
[0023] In step S101, training samples are obtained based on historical data.
[0024] Historical data includes user attribute characteristics within a historical period, encompassing both churned and non-churned users. Attribute characteristics can include user attribute characteristics and transaction attribute characteristics. User attribute characteristics reflect a user's personal attributes; in some examples, these may include, but are not limited to, one or more of the following: personal attribute characteristics, payment card attribute characteristics, and device attribute characteristics. Personal attribute characteristics may include user age, gender, etc. Payment card attribute characteristics may include the number of payment cards, card type, and card level, etc. Device attribute characteristics may include device model, etc. Transaction attribute characteristics reflect a user's transaction-related attributes; in some examples, these may include, but are not limited to, one or more of the following: user transaction characteristics, transaction trend characteristics, transaction cycle characteristics, and participation in promotional activities, etc. User transaction characteristics may include transaction amount, transaction time, etc. Transaction trend characteristics may include trends in transaction amount changes and transaction frequency changes, etc. Transaction cycle characteristics may include transaction cycle length, transaction amount within a preset transaction cycle, and number of transactions within a preset transaction cycle, etc. User participation characteristics in promotional activities can include whether the user participated in the promotion, the type of promotion the user participated in, and the depth of the user's participation. Based on the user's attribute characteristics, a user feature vector can be generated. The elements of the feature vector can be the user's attribute characteristics; that is, the feature vector is used to represent the user's attribute characteristics.
[0025] The training samples include the feature vectors of churned users (serving as churned samples) and the feature vectors of non-churned users (serving as non-churned samples). Every churned user and every non-churned user is part of the training samples. The training samples are used to train the classification model.
[0026] In some examples, user attribute features can be obtained from historical data, preprocessed, and then used to generate training samples. Specifically, user attribute features can be obtained from historical data; the attribute features can be normalized; the correlation coefficients between the pairwise normalized attribute features can be calculated; one of the two attribute features whose correlation coefficient is higher than a preset correlation threshold can be deleted; and training samples can be generated based on the retained attribute features. The dimensions or units of measurement of user attribute features obtained from historical data may be different, and the range of variation of the attribute features may also be at different orders of magnitude. If these attribute features are directly used for model training, some indicators in the model training will be ignored, thus affecting the effectiveness of model training and data analysis. Attribute features can be normalized. For example, a maximum-minimum normalization method can be used, setting the maximum value of each attribute feature to 1 and the minimum value to zero. Values of other attribute features between the minimum and maximum values can be proportionally transformed, ensuring that each attribute feature's value is between 0 and 1 (inclusive). Normalized attribute features do not alter the original data's order of magnitude or the relative differences between values. Among numerous attribute features, there may be redundant features with high overlap. The correlation coefficient between different attribute features can be calculated to determine their correlation. Correlation coefficients can characterize the correlation; for example, they can include Pearson and Spearman correlation coefficients. A preset correlation threshold is used to determine the correlation of redundant attribute features. This threshold can be set based on the scenario, requirements, experience, etc., and is not limited here. If the correlation coefficient between two attribute features is higher than the preset correlation threshold, the two attribute features are redundant. Either attribute feature can be deleted, i.e., only one is retained. Training samples are generated based on the retained attribute features after deletion. For example, each user has features A1, A2, A3, and A4. The correlation coefficient between features A2 and A3 indicates a correlation higher than a preset correlation threshold, so feature A2 can be deleted. The generated feature vector for the user can be (feature A1, feature A3, feature A4).
[0027] In step S102, new lost samples are generated based on the training samples and the similarity parameters between the training samples, so that the number of lost samples and the number of non-lost samples meet the balance condition.
[0028] The similarity parameter between training samples is used to characterize the similarity between training samples. The similarity parameter can be positively or negatively correlated with similarity. In this embodiment, an example of a negative correlation between the similarity parameter and similarity is used for illustration. The similarity parameter can be implemented as a parameter that reflects similarity, such as Euclidean distance. Euclidean distance is negatively correlated with similarity; that is, the smaller the Euclidean distance between two training samples, the higher the similarity between the two training samples. The similarity parameter between training samples may include one or more of the following: the similarity parameter between churned and non-churned samples, the similarity parameter between churned samples, and the similarity parameter between non-churned samples.
[0029] Based on the similarity parameter between training samples, it can be determined which training samples to use to generate new non-churn samples, so that the generated new churn samples have the characteristics of churned users. In some examples, in order to retain as much original training sample information as possible, some non-churn samples can also be converted into churn samples based on the similarity between training samples, thereby increasing the number of churn samples and balancing the ratio of churn to non-churn samples. The balancing condition includes the condition for determining that the number of churn and non-churn samples is in balance, which can be set according to the scenario, needs, experience, etc., and is not limited here.
[0030] In step S103, the classification model is trained using the lost samples, the non-lost samples, and the Gini coefficient calculated based on the obtained misclassification cost parameters.
[0031] In this embodiment, the Gini coefficient is calculated based on the misclassification cost parameter. The misclassification cost parameter characterizes the cost of misclassifying a user of one class as another, and can be used as a model parameter for the classification model. The Gini coefficient can help determine the strength of the role of attribute features in the classification model during the classification process. The classification model can classify the feature vector of the input user based on the Gini coefficient and the attribute features, thereby determining whether the user is a churned or non-churned user.
[0032] The classification model can be trained using supervised machine learning, undergoing multiple iterations until it meets the training requirements. Once trained, the model can be used to classify users, i.e., to identify churned users. Multiple misclassification cost parameters can be preset. During the multiple iterations of training, a grid search method is used to adjust these parameters. By comparing the classification performance of different parameters, the best-performing misclassification cost parameter is selected as the model parameter for the classification model that meets the training requirements. By refining the misclassification cost parameters into adjustable model parameters, their optimal values can be obtained during training. Compared to manually pre-setting misclassification cost parameters, this approach improves the accuracy of the misclassification cost parameters used in the deployed classification model and reduces the complexity of determining these parameters.
[0033] In step S104, the feature vector of the input user to be identified is classified using a classification model that meets the training requirements to determine whether the user to be identified is a churned user or a non-churned user.
[0034] Based on the user data of the user to be identified, a feature vector of the user to be identified can be generated. The feature vector of the user to be identified is input into a classification model that meets the training requirements. The classification model that meets the training requirements will classify the feature vector of the user to be identified and determine whether the feature vector of the user to be identified is the feature vector of a churned user or a non-churned user. That is, it determines whether the user to be identified is a churned user or a non-churned user.
[0035] In this embodiment, training samples, including churned and non-churned samples, can be obtained from historical data. Based on the similarity parameter between the training samples, new churned samples are generated using the churned samples in the training samples, thereby increasing the number of churned samples in the training samples and achieving a balance between the number of churned and non-churned samples. The classification model is trained using these balanced churned and non-churned samples, resulting in a higher classification accuracy. The training process of the classification model also involves the Gini coefficient calculated based on the misclassification cost parameter. The participation of the Gini coefficient calculated based on the misclassification cost parameter can reduce the probability of the classification model identifying churned users as non-churned users, further improving the classification accuracy of the classification model, thereby improving the accuracy of identifying churned users.
[0036] In some embodiments, to preserve as many original training samples as possible, some non-dropped samples can be converted into dropped samples first, and then the dropped samples can be clustered to synthesize new dropped samples. Since the boundary between dropped and non-dropped samples in the training samples is blurred, it can adversely affect the accuracy of the classification model trained subsequently. The boundary between dropped and non-dropped samples at the boundary can be processed to ensure that the boundary between dropped and non-dropped samples is clear, thereby further improving the accuracy of the trained classification model. Figure 2 A flowchart of a churned user identification method provided in another embodiment of this application is shown. Figure 2 and Figure 1 The difference is that, Figure 1 Step S102 can be further refined as follows: Figure 2 Steps S1021 to S1024 in the process, Figure 2 The churned user identification method shown may also include steps S105 and S106.
[0037] In step S1021, based on the training samples and the similarity parameters between training samples, some non-dropout samples are converted into dropout samples.
[0038] The similarity between training samples can be determined using similarity parameters. Based on this similarity, the probability of converting a non-dropout sample into a streaming sample can be determined, and based on this probability, some non-dropout samples can be converted into dropout samples. Specifically, based on the similarity parameters between training samples, the minimum similarity parameter between each non-dropout sample and a dropout sample can be determined; based on the similarity parameters between training samples and a preset similarity parameter region, the density of non-dropout samples within the similarity parameter region corresponding to each non-dropout sample can be determined; based on the density corresponding to non-dropout samples and the minimum similarity parameter corresponding to non-dropout samples, the conversion probability of non-dropout samples is obtained; non-dropout samples with a conversion probability higher than or equal to a preset conversion threshold are converted into dropout samples.
[0039] For each non-dropped sample, the drop sample with the highest similarity to it can be determined. The similarity parameter between the non-dropped sample and the drop sample with the highest similarity is the minimum similarity parameter. If the similarity parameter is implemented as Euclidean distance, the minimum Euclidean distance between each non-dropped sample and the drop sample can be obtained. The similarity parameter region corresponding to the non-dropped sample can include any region where the similarity between any point and the non-dropped sample is greater than the preset similarity. If the similarity parameter is implemented as Euclidean distance, the similarity parameter region corresponding to the non-dropped sample can include any region where the Euclidean distance between any point and the non-dropped sample is less than the preset Euclidean distance. For example, the similarity parameter region corresponding to the non-dropped sample can be a region centered on the non-dropped sample with a radius of Euclidean distance r. The proportion of non-dropped samples in the similarity parameter region corresponding to the non-dropped sample to the training samples can be calculated as the density of the drop samples in the similarity parameter region corresponding to the non-dropped sample. The ratio of the density of the drop samples in the similarity parameter region corresponding to the non-dropped sample to the minimum similarity parameter between the non-dropped sample and the drop sample can be determined as the conversion probability. For example, the conversion probability of the non-dropped sample can be calculated according to the following formula (1):
[0040]
[0041] Where P(i) is the conversion probability of non-dropout sample i; ρ ir d represents the density of non-dropped samples within the similarity parameter region with a radius of Euclidean distance r, where non-dropped sample i is located; ij Let be the Euclidean distance between non-dropped sample i and dropped sample j, where dropped sample j is the dropped sample with the smallest Euclidean distance to non-dropped sample i.
[0042] A higher conversion probability for a non-dropped sample indicates a greater likelihood that the non-dropped sample will be converted into a dropped sample. The preset conversion threshold is a limit on the conversion probability of converting a non-dropped sample into a streaming sample. Non-dropped samples with a conversion probability higher than or equal to the preset threshold can be converted into streaming samples. Converting some non-dropped samples into dropped samples can preserve as much of the original sample information as possible and increase the number of dropped samples, improving the balance between the number of dropped and non-dropped samples.
[0043] In step S1022, the lost samples are clustered to obtain two or more lost sample clusters.
[0044] The churned samples used for clustering here include both the original churned samples and churned samples transformed from non-churned samples. In some examples, the KMeans clustering algorithm can be used to cluster the churned samples. Each churned sample cluster includes more than one churned sample. The number of churned sample clusters can be determined based on experiments, experience, etc., and the number of churned sample clusters that achieve the desired clustering effect can be selected for clustering the churned samples.
[0045] In step S1023, based on the similarity parameter between training samples, the nearest neighbor sample of the lost sample in each lost sample cluster and the k nearest neighbor samples of the nearest neighbor sample are determined.
[0046] The nearest neighbor of a churned sample within a churned sample cluster is the churned sample in the churned user sample cluster that has the highest similarity to the churned sample. The nearest neighbor of the nearest neighbor is a training sample with relatively high similarity to the nearest neighbor. The nearest neighbor of the nearest neighbor can include churned samples or non-churned samples. If the similarity parameter is implemented as Euclidean distance, the nearest neighbor of a churned sample within a churned sample cluster is the churned sample in the churned sample cluster that has the closest Euclidean distance to the churned sample. The k nearest neighbors of the nearest neighbor include the k training samples that have the closest Euclidean distance to the nearest neighbor. The k nearest neighbor algorithm can be used to select k nearest neighbors from the training samples, where k is a positive integer. The churned sample with the smallest similarity parameter to the churned sample in each churned sample cluster can be obtained and determined as the nearest neighbor of the churned sample in each churned sample cluster; the top k training samples with similarity parameters to the nearest neighbor in ascending order can be obtained and determined as the k nearest neighbors of the nearest neighbor.
[0047] In step S1024, a new lost sample is generated based on the nearest neighbor sample of the lost sample in each lost sample cluster and the k nearest neighbor samples of the nearest neighbor sample.
[0048] New streaming cytometer samples can be synthesized by weighting the nearest neighbor samples in each sample cluster using the lost samples. The synthesis weight of each nearest neighbor sample in the synthesis weighting process can be determined based on the k nearest neighbor samples of the nearest neighbor sample.
[0049] In some examples, the first proportion of the lost sample among the k nearest neighbors of the nearest neighbor sample can be obtained; based on the first proportion of the lost sample in the target lost sample cluster and the first proportion of the lost sample in each lost sample cluster, the composite weight of the nearest neighbor sample in the target lost sample cluster is determined, where the target lost sample cluster is any lost sample cluster; based on the nearest neighbor sample of the lost sample in the lost sample cluster and the composite weight of the nearest neighbor sample, a new lost sample is generated.
[0050] The k nearest neighbors of a churned sample may include churned samples or non-churned samples. The first proportion corresponding to the nearest neighbor sample reflects the purity of the churned samples among the k nearest neighbors of the nearest neighbor sample. The ratio of the first proportion corresponding to the nearest neighbor sample of a churned user in a churned sample cluster to the sum of the first proportions corresponding to the nearest neighbor samples of the churned user in each churned sample cluster can be determined as the composite weight of the nearest neighbor sample of the churned user in this churned sample cluster. Based on the nearest neighbor sample of the churned sample in the churned sample cluster and the composite weight of the nearest neighbor sample, a new churned sample can be obtained using a weighted algorithm. For example, the new churned sample can be obtained according to the following formulas (2) and (3):
[0051]
[0052]
[0053] Where x represents the newly synthesized lost sample; x pi Let a be the nearest neighbor of the lapsed sample in the i-th lapsed sample cluster; i For the nearest neighbor sample x pi The synthesis weights; m is the number of lost sample clusters; r pi For the nearest neighbor sample x pi The larger the first ratio, the higher the proportion of the nearest neighbor samples corresponding to that first ratio when generating new lost samples.
[0054] If the number of lost samples is n p The number of non-dropped samples is n n Then the balance between lost and non-lost samples can be expressed as u = n p / n n , u∈(0,1). To improve the balance between lost and non-lost samples, a sufficient number of new lost samples need to be synthesized. New lost samples can be synthesized sequentially based on the nearest neighbor of the existing lost sample and the k nearest neighbors of the nearest neighbor, until the number of lost samples and the number of non-lost samples meet the balance condition. In some examples, the upper balance condition may include the ratio of the number of newly generated lost samples to the difference in number reaching a preset synthesis ratio, where the difference in number is the difference between the number of non-lost samples and the number of lost samples before the new lost samples are generated. For example, the above balance condition can be implemented as the following equation (4):
[0055] n new =(n n -n p (4) * f, f∈[0,1]
[0056] Where, n new n is the number of new lost samples generated. nn represents the number of lost samples. p is the number of non-dropped samples; f is the synthesis ratio, which can be set according to needs, scenarios, experience, etc. The synthesis ratio can control the number of newly generated dropped samples.
[0057] In step S105, based on the similarity parameter between training samples, another training sample with the smallest similarity parameter to the training sample is obtained for each training sample.
[0058] When the similarity parameter is implemented as Euclidean distance, each training sample and the other training sample with the smallest Euclidean distance to it can be obtained. The training sample can be a churned sample or a non-churned sample, and the other training sample can be a churned sample or a non-churned sample.
[0059] In step S106, if one of the training samples and the other training sample with the smallest similarity parameter to the training sample is a lost sample and the other is a non-lost sample, then the training sample and the other training sample with the smallest similarity parameter to the training sample are deleted.
[0060] If a training sample is a churned sample, and the other training sample with the smallest similarity parameter to it is a non-churned sample, then both training samples are deleted. Alternatively, if a training sample is a non-churned sample, and the other training sample with the smallest similarity parameter to it is a churned sample, then both training samples are deleted. If both the training sample and the other training sample with the smallest similarity parameter to it are non-churned samples or both are churned samples, then both training samples are retained. If one of the training sample and the other training sample with the smallest similarity parameter to it is a churned sample and the other is a non-churned sample, it means that these two training samples are located in the boundary region between churned and non-churned samples. In this boundary region, the distinction between churned and non-churned samples is relatively blurred, resulting in a blurred boundary between churned and non-churned samples. Deleting training sample pairs with the smallest similarity parameter and different sample types ensures a clear boundary between churned and non-churned samples, thereby improving the accuracy of the classification model trained using churned and non-churned samples in identifying churned users.
[0061] To facilitate understanding, the processing procedure for training samples in the above embodiments will be explained below with reference to the illustrations. Figure 3 A schematic diagram illustrating an example of the processing procedure for training samples provided in an embodiment of this application, as shown below. Figure 3 As shown, the training sample processing can include a sample transformation stage, a clustering stage, an oversampling stage, and a boundary clarification stage. Figure 3 In the diagram, circles represent non-dropped samples, and triangles represent dropped samples.
[0062] During the sample conversion phase, the non-dropout samples that should be converted into dropout samples can be determined by calculating the conversion probability of non-dropout samples. For example, through... Figure 3 By comparing the training samples in the sample transformation stage and the clustering stage, it can be seen that the non-dropout samples with transformation arrows located between lines a1 and a2 in the sample transformation stage have been transformed into dropout samples in the clustering stage.
[0063] During the clustering phase, the original lost samples and the transformed lost samples are clustered. For example, in... Figure 3 In the clustering stage shown, the lost samples are clustered into three lost sample clusters. Triangles with the same shaded area are lost samples in the same lost sample cluster.
[0064] During the oversampling phase, new lapsed samples are synthesized using existing lapsed samples. For example, by... Figure 3 The comparison between the oversampling stage and the clustering stage shows that the oversampling stage adds several new synthetic loss samples, i.e. Figure 3 A triangle with no fill shade during the oversampling phase.
[0065] In the boundary clarification stage, the training sample pairs with the closest Euclidean distance are identified. If one training sample in a pair is a churned sample and the other is a non-churned sample, the pair is deleted to clarify the boundary between churned and non-churned samples. For example, through... Figure 3 The comparison between the boundary clarification stage and the oversampling stage is shown. The boundary clarification stage removes training sample pairs between churned and non-churned samples that have the closest Euclidean distance. After removal, a clear boundary line a3 can be obtained to distinguish between churned and non-churned samples. Using churned and non-churned samples with clear boundaries to train the classification model can further improve the accuracy of the classification model in identifying churned users.
[0066] The processing method for training samples in this embodiment can improve the balance between churned and non-churned samples while preserving the original data information as much as possible, and obtain churned and non-churned samples with clear boundaries, thereby providing effective support for the training of classification models and improving the accuracy of the trained classification models in identifying churned users.
[0067] In some embodiments, the misclassification cost parameter includes a first misclassification cost parameter and a second misclassification cost parameter. The first misclassification cost parameter represents the cost of misclassifying churned users as non-churned users, and the second misclassification cost parameter represents the cost of misclassifying non-churned users as churned users. The error cost parameter is refined into adjustable algorithm parameters, and the calculation of the Gini coefficient is introduced, thereby defining a new Gini coefficient function. Figure 4 A flowchart illustrating a churned user identification method provided in another embodiment of this application. Figure 4 and Figure 1 The difference is that, Figure 1 Step S103 can be further refined as follows: Figure 4 Steps S1031 to S1034 in the process.
[0068] In step S1031, the Gini coefficient of the attribute features is determined based on the attribute features in the lost samples, the attribute features in the non-lost samples, the first misclassification cost parameter, and the second misclassification cost parameter.
[0069] In this embodiment, the cost of misclassifying churned users as non-churned users is greater than the cost of misclassifying non-churned users as churned users; that is, the first misclassification cost parameter is greater than the second misclassification cost parameter. The Gini coefficient of the attribute features can be determined based on the weight of the impact of misclassifying churned samples as non-churned samples based on the attribute features of churned samples, and the weight of the impact of misclassifying non-churned samples as churned samples based on the attribute features of non-churned samples.
[0070] In some examples, the first product of attribute features in lapsed samples and the first misclassification cost parameter, and the second product of attribute features in non-lapsed samples and the second misclassification cost parameter can be obtained. The first ratio of the first product to the first sum and the second ratio of the second product to the first sum are calculated, where the first sum is the sum of the first and second products. The Gini coefficient is determined based on 1 and the sum of the squares of the first and second ratios. This method of calculating the Gini coefficient ensures that its value ranges from 0 to 1. Compared to related techniques that first calculate the Gini coefficient and then multiply it by the misclassification cost parameter, this method avoids a Gini coefficient that is too small, reducing the risk that attribute features may be ignored during classification model training due to an excessively small Gini coefficient.
[0071] For example, the Gini coefficient can be calculated according to the following formula (5):
[0072]
[0073] Where G(S) is the Gini coefficient; |S0| represents the attribute features of non-churned samples; C(0,1) is the second misclassification cost parameter; |S1| represents the attribute features of churned samples; and C(1,0) is the first misclassification cost parameter. The information gain derived from the Gini coefficient calculated in this way can effectively reduce the risk of attribute features being ignored due to insufficient information content caused by an excessively small misclassification cost parameter definition during classification model training. This reduces the probability that the trained classification model will identify churned users as non-churned users, further improving the accuracy of the classification model in identifying streaming users.
[0074] In step S1032, the lost samples and non-lost samples are input into the classification model, and the classification model is trained using the Gini coefficient.
[0075] The Gini coefficient can be used as a model parameter in the training of a classification model.
[0076] In step S1033, if the trained classification model does not meet the training conditions, the model parameters are adjusted, and the process jumps to step S1031.
[0077] Training conditions can be related to performance metrics or the number of training iterations. For example, training conditions may include the training classification model achieving a preset performance metric or the number of training iterations reaching a preset threshold. If the trained classification model does not meet the training conditions, it needs to undergo another round of iteration training, repeating steps S1031 and S1032 until the trained classification model meets the training requirements. That is, if the trained classification model does not meet the training conditions, the model parameters are adjusted, the Gini coefficient of the attribute features is determined again, and the classification model is trained until it meets the training requirements.
[0078] Model parameters may include at least one of a first misclassification cost parameter and a second misclassification cost parameter, and may also include other parameters, which are not listed here. The misclassification cost parameter can be adjusted using a basis grid search method to determine the optimal misclassification cost parameter required for training the classification model.
[0079] In step S1034, if the trained classification model meets the training conditions, the trained classification model is put into use.
[0080] In some embodiments, clustering and attribute feature difference analysis can be performed on churned users identified by the classification model, thereby adopting different retention measures for different types of churned users, improving the business experience of churned users, and increasing the activity of churned users. Figure 5 A flowchart illustrating another embodiment of the churned user identification method provided in this application. Figure 5 and Figure 1 The difference is that, Figure 5 The churned user identification method shown may further include steps S107 to S110.
[0081] In step S107, based on the feature vectors of churned users determined by the classification model, the identified churned users are clustered to obtain multiple churned user clusters.
[0082] This involves clustering the feature vectors of churned users, which is equivalent to clustering the churned users identified by the classification model. In some examples, density-based clustering (DBSCAN) can be used for clustering. Clustering performance metrics, such as the CH (Calinski-Harabasz) metric, can be used to evaluate the clustering results. By using a grid search approach, the optimal clustering performance is obtained, resulting in multiple clusters of churned users with the best clustering performance. Each cluster of churned users includes at least one churned user.
[0083] In step S108, attribute features are obtained from the feature vector, and the top N attribute features with variances arranged in descending order are determined as differential features.
[0084] Attribute features can be extracted from the feature vectors of each churned user, and the variance of each attribute feature can be calculated. The variance of an attribute feature can represent the fluctuation of different churned users on that attribute feature. The larger the variance, the better the attribute feature can distinguish churned users. Therefore, the N attribute features with the largest variances are determined as the differential features, where N is a positive integer. The value of N can be determined according to needs, scenarios, experience, etc., for example, N=10. The differential features are the main attribute features that can reflect the differences between churned users in different churned user clusters. The differential features can have business implications.
[0085] In step S109, the business classification result corresponding to the churned user cluster is determined based on the difference characteristics.
[0086] Based on the differences in characteristics, churned user groups can be classified according to their business functions, resulting in a business classification result. This result can include the business meaning of the classification, as well as a business explanation.
[0087] In step S110, business intervention processing corresponding to the business classification results is performed on the churned users in the churned user cluster.
[0088] Different churned user clusters may correspond to different business classification results, and different business classification results may correspond to different business interventions. Based on the business classification results corresponding to the churned user cluster, business interventions can be performed on the churned users in that churned user cluster to reduce the likelihood of churn among those users.
[0089] For example, by clustering churned users, two churned user clusters can be obtained. The differential features selected from the attribute features include transaction frequency and the number of payment cards. Based on the transaction frequency and whether they participate in promotional activities, it can be determined that the business classification result of one churned user cluster is low frequency, that is, the churned users in this cluster have too low a transaction frequency, and the business classification result of the other churned user cluster is low card quantity, that is, the churned users in this cluster hold too few payment cards. Transaction promotional activity information can be pushed to churned users in the low frequency churned user cluster to increase their transaction frequency, and card opening promotional activity information can be pushed to churned users in the low card quantity churned user cluster to increase their number of payment cards.
[0090] By classifying churned user groups based on their differences in characteristics and taking targeted business interventions, the business experience of churned users can be improved, and the likelihood of churn can be reduced.
[0091] The second aspect of this application provides a device for identifying lost users. Figure 6 This is a schematic diagram of the structure of a lost user identification device provided in an embodiment of this application, as shown below. Figure 6 As shown, the lost user identification device 200 may include an acquisition module 201, a sample generation module 202, a model training module 203, and a classification module 204.
[0092] The acquisition module 201 can be used to acquire training samples based on historical data. The training samples include feature vectors of churned users as churn samples and feature vectors of non-churned users as non-churn samples. The feature vectors are used to reflect the attribute characteristics of users.
[0093] The sample generation module 202 can be used to generate new churned samples based on training samples and similarity parameters between training samples, so that the number of churned samples and the number of non-churned samples meet the balance condition.
[0094] The model training module 203 is used to train the classification model using lost samples, non-lost samples, and the Gini coefficient calculated based on the acquired misclassification cost parameters.
[0095] The classification module 204 is used to classify the feature vector of the input user to be identified using a classification model that meets the training requirements, and to determine whether the user to be identified is a churned user or a non-churned user.
[0096] In this embodiment, training samples, including churned and non-churned samples, can be obtained from historical data. Based on the similarity parameter between the training samples, new churned samples are generated using the churned samples in the training samples, thereby increasing the number of churned samples in the training samples and achieving a balance between the number of churned and non-churned samples. The classification model is trained using these balanced churned and non-churned samples, resulting in a higher classification accuracy. The training process of the classification model also involves the Gini coefficient calculated based on the misclassification cost parameter. The participation of the Gini coefficient calculated based on the misclassification cost parameter can reduce the probability of the classification model identifying churned users as non-churned users, further improving the classification accuracy of the classification model, thereby improving the accuracy of identifying churned users.
[0097] In some embodiments, the sample generation module 202 may be specifically used to: convert some non-dropped samples into dropped samples based on training samples and similarity parameters between training samples; cluster the dropped samples to obtain two or more dropped sample clusters; determine the nearest neighbor sample and the k nearest neighbors of the dropped sample in each dropped sample cluster according to the similarity parameters between training samples, where k is a positive integer; and generate new dropped samples based on the nearest neighbor sample and the k nearest neighbors of the dropped sample in each dropped sample cluster.
[0098] In some examples, the sample generation module 202 may be specifically used to: determine the minimum similarity parameter between each non-dropped sample and a dropped sample based on the similarity parameter between training samples; determine the density of non-dropped samples within the similarity parameter region corresponding to each non-dropped sample based on the similarity parameter between training samples and a preset similarity parameter region; obtain the conversion probability of non-dropped samples according to the density corresponding to non-dropped samples and the minimum similarity parameter corresponding to non-dropped samples; and convert non-dropped samples with a conversion probability higher than or equal to a preset conversion threshold into dropped samples.
[0099] In some examples, the sample generation module 202 may be specifically used to: obtain the churn sample with the smallest similarity parameter to the churn sample in each churn sample cluster, and determine it as the nearest neighbor sample of the churn sample in each churn sample cluster; obtain the top k training samples with the nearest neighbor sample arranged in ascending order of similarity parameter, and determine them as the k nearest neighbor samples of the nearest neighbor sample.
[0100] In some examples, the sample generation module 202 may be specifically used to: obtain the first proportion of lost samples among the k nearest neighbor samples of the nearest neighbor sample; determine the synthesis weight of the nearest neighbor samples in the target lost sample cluster based on the first proportion of the nearest neighbor samples of the lost sample in the target lost sample cluster and the first proportion of the nearest neighbor samples of the lost sample in each lost sample cluster, wherein the target lost sample cluster is any lost sample cluster; generate new lost samples based on the nearest neighbor samples of the lost sample cluster and the synthesis weight of the nearest neighbor samples, wherein the balance condition includes the ratio of the number of newly generated lost samples to the difference in number reaching a preset synthesis ratio, and the difference in number is the difference between the number of non-lost samples and the number of lost samples before the new lost samples are generated.
[0101] In some embodiments, the churned user identification device 200 may further include a sample optimization module. The sample optimization module may be used to: obtain another training sample with the smallest similarity parameter to the training sample for each training sample based on the similarity parameter between the training samples; if one of the training sample and the other training sample with the smallest similarity parameter to the training sample is a churned sample and the other is a non-churned sample, then delete the training sample and the other training sample with the smallest similarity parameter to the training sample.
[0102] In some examples, the acquisition module 201 may be specifically used to: acquire user attribute features from historical data; normalize the attribute features; calculate the correlation coefficients in the attribute features after pairwise normalization; delete one of the two attribute features whose correlation coefficients represent a correlation higher than a preset correlation threshold; and generate training samples based on the retained attribute features.
[0103] In some embodiments, the misclassification cost parameter includes a first misclassification cost parameter and a second misclassification cost parameter. The first misclassification cost parameter represents the cost of misclassifying churned users as non-churned users, and the second misclassification cost parameter represents the cost of misclassifying non-churned users as churned users.
[0104] The model training module 203 can be specifically used to: determine the Gini coefficient of the attribute features based on the attribute features in the churned samples, the attribute features in the non-churned samples, the first misclassification cost parameter, and the second misclassification cost parameter; input the churned samples and non-churned samples into the classification model and train the classification model using the Gini coefficient; if the trained classification model does not meet the training conditions, adjust the model parameters, including at least one of the first misclassification cost parameter and the second misclassification cost parameter, and determine the Gini coefficient of the attribute features again to train the classification model until the trained classification model meets the training conditions.
[0105] In some examples, the model training module 203 may be specifically used to: obtain the first product of the attribute features in the lost samples and the first misclassification cost parameter and the second product of the attribute features in the non-lost samples and the second misclassification cost parameter; calculate the first ratio of the first product to the first sum and the second ratio of the second product to the first sum, wherein the first sum is the sum of the first product and the second product; and determine the Gini coefficient based on 1 and the sum of squares of the first ratio and the second ratio.
[0106] In some embodiments, the aforementioned lost user identification device 200 may further include a business classification module and an intervention processing module.
[0107] The business classification module can be used to: cluster identified churned users based on the feature vectors of churned users determined by the classification model to obtain multiple churned user clusters; extract attribute features from the feature vectors, and determine the top N attribute features with the largest variance in descending order as the difference features, where N is a positive integer; and determine the business classification result corresponding to the churned user clusters based on the difference features.
[0108] The intervention processing module can be used to perform business intervention processing corresponding to the business classification results for churned users in the churned user cluster.
[0109] A third aspect of this application also provides an electronic device. Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 7 As shown, the electronic device 300 includes a memory 301, a processor 302, and a computer program stored in the memory 301 and executable on the processor 302.
[0110] In some examples, the processor 302 described above may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits that may be configured to implement the embodiments of this application.
[0111] Memory 301 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 lost user identification method according to embodiments of this application.
[0112] The processor 302 reads the executable program code stored in the memory 301 to run the computer program corresponding to the executable program code, so as to implement the churned user identification method in the above embodiment.
[0113] In some examples, the electronic device 300 may also include a communication interface 303 and a bus 304. For example, Figure 7 As shown, the memory 301, processor 302, and communication interface 303 are connected through bus 304 and complete communication with each other.
[0114] The communication interface 303 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application. Input devices and / or output devices can also be connected through the communication interface 303.
[0115] Bus 304 includes hardware, software, or both, that couples components of electronic device 300 together. For example, and not limitingly, bus 304 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced 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 Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-E) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local Bus (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 304 may include one or more buses. Although specific buses are described and illustrated in the embodiments of this application, this application considers any suitable bus or interconnection.
[0116] A fourth aspect of this application also provides a computer-readable storage medium storing computer program instructions. When these computer program instructions are executed by a processor, they can implement the churned user identification method described in the above embodiments and achieve the same technical effect. To avoid repetition, further details are omitted here. The aforementioned computer-readable storage medium may include non-transitory computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, etc., and is not limited thereto.
[0117] This application provides a computer program product. When the instructions in the computer program product are executed by the processor of an electronic device, the electronic device performs the churned user identification method in the above embodiments and achieves the same technical effect. To avoid repetition, it will not be described again here.
[0118] It should be clarified that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. For the device embodiments, equipment embodiments, computer-readable storage medium embodiments, and computer program product embodiments, the relevant parts can be referred to the description section of the method embodiments. This application is not limited to the specific steps and structures described above and shown in the figures. 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. Furthermore, for the sake of brevity, detailed descriptions of known methods and techniques are omitted here.
[0119] 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.
[0120] Those skilled in the art will understand that the above embodiments are exemplary and not restrictive. Different technical features appearing in different embodiments can be combined to achieve beneficial effects. Based on a study of the drawings, specification, and claims, those skilled in the art should be able to understand and implement other variations of the disclosed embodiments. In the claims, the term "comprising" does not exclude other means or steps; the quantifier "a" does not exclude a plurality; the terms "first" and "second" are used to identify names and not to indicate any particular order. No reference numerals in the claims should be construed as limiting the scope of protection. The functionality of multiple parts appearing in the claims can be implemented by a single hardware or software module. The appearance of certain technical features in different dependent claims does not mean that these technical features cannot be combined to achieve beneficial effects.
Claims
1. A method for identifying churned users, characterized in that, include: Based on historical data, training samples are obtained. The training samples include feature vectors of churned users as churn samples and feature vectors of non-churned users as non-churn samples. The feature vectors are used to reflect the user's attribute characteristics. The historical data includes the user's attribute characteristics within a historical period. The attribute characteristics include user attribute characteristics and transaction attribute characteristics. The user attribute characteristics include one or more of the following: personal attribute characteristics, user payment card attribute characteristics, and user device attribute characteristics. The transaction attribute characteristics include one or more of the following: user transaction characteristics, user transaction trend characteristics, user transaction cycle characteristics, and user participation in promotional activities. Based on the training samples and the similarity parameters between training samples, some non-drop samples are converted into drop samples. Cluster the lost samples to obtain two or more lost sample clusters; Based on the similarity parameter between training samples, determine the nearest neighbor sample of each lost sample in each lost sample cluster, and the k nearest neighbors of the nearest neighbor sample, where k is a positive integer; Obtain the first proportion of lost samples among the k nearest neighbor samples of the nearest neighbor sample; Based on the first proportion of the nearest neighbor samples of the lost sample in the target lost sample cluster and the first proportion of the nearest neighbor samples of the lost sample in each lost sample cluster, the composite weight of the nearest neighbor samples in the target lost sample cluster is determined, where the target lost sample cluster is any lost sample cluster. Based on the nearest neighbor sample of the lost sample in the lost sample cluster and the synthesis weight of the nearest neighbor sample, a new lost sample is generated so that the number of lost samples and the number of non-lost samples meet the balance condition. The balance condition includes that the ratio of the number of newly generated lost samples to the difference in number reaches a preset synthesis ratio. The difference in number is the difference between the number of non-lost samples and the number of lost samples before the new lost sample is generated. The classification model is trained using lapsed samples, non-lapsed samples, and the Gini coefficient calculated based on the obtained misclassification cost parameters. The feature vector of the input user to be identified is classified using the classification model that meets the training requirements, and the user to be identified is determined to be a churned user or a non-churned user.
2. The method according to claim 1, characterized in that, The process of converting some non-dropout samples into dropout samples based on training samples and similarity parameters between training samples includes: Based on the similarity parameters between training samples, determine the minimum similarity parameter between each non-drop sample and the drop sample; Based on the similarity parameters between training samples and the preset similarity parameter region, the density of non-dropped samples within the similarity parameter region corresponding to each non-dropped sample is determined; Based on the density corresponding to the non-dropped sample and the minimum similarity parameter corresponding to the non-dropped sample, the conversion probability of the non-dropped sample is obtained; Non-drop samples with a conversion probability higher than or equal to a preset conversion threshold are converted into drop samples.
3. The method according to claim 1, characterized in that, The step of determining the nearest neighbor sample of a lost sample in each lost sample cluster and the k nearest neighbors of the nearest neighbor sample based on the similarity parameter between lost samples includes: Find the churn sample with the smallest similarity parameter to the churn sample in each churn sample cluster, and determine it as the nearest neighbor sample of the churn sample in each churn sample cluster; Obtain the top k training samples with similarity parameters to the nearest neighbor sample in ascending order, and determine them as the k nearest neighbors of the nearest neighbor sample.
4. The method according to claim 1, characterized in that, After generating a new lost sample based on the nearest neighbor sample of the lost sample in the lost sample cluster and the composite weight of the nearest neighbor sample, the method further includes: Based on the similarity parameter between training samples, obtain another training sample with the smallest similarity parameter to the training sample for each training sample; If one of the training samples and the other training sample with the smallest similarity parameter to the training sample is a lost sample and the other is a non-lost sample, then delete the training sample and the other training sample with the smallest similarity parameter to the training sample.
5. The method according to claim 1, characterized in that, The process of obtaining training samples based on historical data includes: Obtain user attribute characteristics from the historical data; Normalize the attribute features; Calculate the correlation coefficients among the attribute features after pairwise normalization; Delete one of the two attribute features whose correlation coefficient is higher than a preset correlation threshold. Training samples are generated based on the retained attribute features.
6. The method according to claim 1, characterized in that, The misclassification cost parameters include a first misclassification cost parameter and a second misclassification cost parameter. The first misclassification cost parameter represents the cost of misclassifying churned users as non-churned users, and the second misclassification cost parameter represents the cost of misclassifying non-churned users as churned users. The process of training the classification model using lost samples, non-lost samples, and the Gini coefficient calculated based on the acquired misclassification cost parameters includes: The Gini coefficient of the attribute features is determined based on the attribute features in the lost samples, the attribute features in the non-lost samples, the first misclassification cost parameter, and the second misclassification cost parameter. The lost samples and non-lost samples are input into the classification model, and the classification model is trained using the Gini coefficient. If the trained classification model does not meet the training conditions, the model parameters are adjusted. The model parameters include at least one of the first misclassification cost parameter and the second misclassification cost parameter. The Gini coefficient of the attribute feature is determined again, and the classification model is trained until the trained classification model meets the training conditions.
7. The method according to claim 6, characterized in that, The step of determining the Gini coefficient of the attribute features based on the attribute features in the churned samples, the attribute features in the non-churned samples, the first misclassification cost parameter, and the second misclassification cost parameter includes: Obtain the first product of the attribute features in the lost samples and the first misclassification cost parameter, and the second product of the attribute features in the non-lost samples and the second misclassification cost parameter; The first ratio of the first product to the first sum and the second ratio of the second product to the first sum are calculated, where the first sum is the sum of the first product and the second product. The Gini coefficient is determined based on 1 and the sum of the squares of the first ratio and the second ratio.
8. The method according to claim 1, characterized in that, Also includes: Based on the feature vectors of churned users determined by the classification model, the identified churned users are clustered to obtain multiple churned user clusters; Attribute features are obtained from the feature vector, and the top N attribute features with variances arranged in descending order are identified as differential features, where N is a positive integer; Based on the aforementioned differences, the business classification result corresponding to the churned user cluster is determined; Perform the business intervention processing corresponding to the business classification result on the churned users in the churned user cluster.
9. A churned user identification device, characterized in that, include: The acquisition module is used to acquire training samples based on historical data. The training samples include feature vectors of churned users as churn samples and feature vectors of non-churned users as non-churn samples. The feature vectors are used to reflect the attribute characteristics of users. The historical data includes the attribute characteristics of users within a historical period. The attribute characteristics include user attribute characteristics and transaction attribute characteristics. The user attribute characteristics include one or more of the following: personal attribute characteristics, user payment card attribute characteristics, and user device attribute characteristics. The transaction attribute characteristics include one or more of the following: user transaction characteristics, user transaction trend characteristics, user transaction cycle characteristics, and user participation in promotional activities characteristics. The sample generation module is used to convert some non-dropped samples into dropped samples based on training samples and similarity parameters between training samples; cluster the dropped samples to obtain two or more dropped sample clusters; determine the nearest neighbor sample of each dropped sample in each dropped sample cluster and the k nearest neighbors of the nearest neighbor sample, where k is a positive integer, according to the similarity parameters between training samples; and obtain the first proportion of dropped samples among the k nearest neighbors of the nearest neighbor sample. Based on the first proportion of the nearest neighbor samples of the lost sample in the target lost sample cluster and the first proportion of the nearest neighbor samples of the lost sample in each lost sample cluster, the composite weight of the nearest neighbor samples in the target lost sample cluster is determined, where the target lost sample cluster is any lost sample cluster; based on the nearest neighbor samples of the lost sample in the lost sample cluster and the composite weight of the nearest neighbor samples, a new lost sample is generated so that the number of lost samples and the number of non-lost samples meet a balance condition, where the balance condition includes the ratio of the number of newly generated lost samples to the number difference reaching a preset composite ratio, where the number difference is the difference between the number of non-lost samples and the number of lost samples before the new lost sample is generated. The model training module is used to train the classification model using lost samples, non-lost samples, and the Gini coefficient calculated based on the acquired misclassification cost parameters. The classification module is used to classify the feature vector of the input user to be identified using the classification model that meets the training requirements, and to determine whether the user to be identified is a churned user or a non-churned user.
10. An electronic device, characterized in that, include: Processor and memory storing computer program instructions; When the processor executes the computer program instructions, it implements the churned user identification method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program instructions that, when executed by a processor, implement the churned user identification method as described in any one of claims 1 to 8.