CN116522146A - Customer loss detection model training method, customer loss detection method and device - Google Patents
Customer loss detection model training method, customer loss detection method and device Download PDFInfo
- Publication number
- CN116522146A CN116522146A CN202310531694.0A CN202310531694A CN116522146A CN 116522146 A CN116522146 A CN 116522146A CN 202310531694 A CN202310531694 A CN 202310531694A CN 116522146 A CN116522146 A CN 116522146A
- Authority
- CN
- China
- Prior art keywords
- samples
- customer
- behavior data
- training
- learners
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000012549 training Methods 0.000 title claims abstract description 187
- 238000001514 detection method Methods 0.000 title claims abstract description 131
- 238000000034 method Methods 0.000 title claims abstract description 100
- 230000006399 behavior Effects 0.000 claims abstract description 139
- 238000012360 testing method Methods 0.000 claims abstract description 99
- 238000005070 sampling Methods 0.000 claims abstract description 50
- 238000003860 storage Methods 0.000 claims abstract description 22
- 238000012545 processing Methods 0.000 claims description 42
- 238000004590 computer program Methods 0.000 claims description 24
- 230000008569 process Effects 0.000 claims description 19
- 238000000605 extraction Methods 0.000 claims description 12
- 230000015654 memory Effects 0.000 claims description 11
- 230000002159 abnormal effect Effects 0.000 claims description 10
- 238000004140 cleaning Methods 0.000 claims description 6
- 238000000513 principal component analysis Methods 0.000 claims description 6
- 238000013473 artificial intelligence Methods 0.000 abstract description 4
- 238000010586 diagram Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 7
- 230000009467 reduction Effects 0.000 description 5
- 239000011159 matrix material Substances 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000012847 principal component analysis method Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 108010001267 Protein Subunits Proteins 0.000 description 2
- 230000014509 gene expression Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 239000000758 substrate Substances 0.000 description 2
- 238000009825 accumulation Methods 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 230000003542 behavioural effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 238000013527 convolutional neural network Methods 0.000 description 1
- 238000013136 deep learning model Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000005065 mining Methods 0.000 description 1
- 238000004806 packaging method and process Methods 0.000 description 1
- 238000013139 quantization Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000000306 recurrent effect Effects 0.000 description 1
- 230000000246 remedial effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 230000035945 sensitivity Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/214—Generating training patterns; Bootstrap methods, e.g. bagging or boosting
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/10—Pre-processing; Data cleansing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/213—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
- G06F18/2135—Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/21—Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
- G06F18/217—Validation; Performance evaluation; Active pattern learning techniques
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/23—Clustering techniques
- G06F18/232—Non-hierarchical techniques
- G06F18/2321—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
- G06F18/23213—Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/27—Regression, e.g. linear or logistic regression
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
- G06N20/20—Ensemble learning
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Bioinformatics & Cheminformatics (AREA)
- Evolutionary Biology (AREA)
- Bioinformatics & Computational Biology (AREA)
- Software Systems (AREA)
- Probability & Statistics with Applications (AREA)
- Medical Informatics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The disclosure provides a client loss detection model training method, a client loss detection device, electronic equipment and a storage medium, and can be applied to the technical field of artificial intelligence, the financial field or other fields. The customer churn detection model training method comprises the following steps: obtaining a plurality of customer behavior data samples based on customer history data recorded in a background database, wherein the plurality of customer behavior data samples comprise a plurality of first samples and a plurality of second samples, the labels of the first samples represent that customers are not lost, and the labels of the second samples represent that customers are lost; sampling the first samples and the second samples for multiple times to obtain a plurality of training sets and a plurality of testing sets; and performing integrated learning on a plurality of learners included in the initial model by using a plurality of training sets and a plurality of testing sets to obtain a customer loss detection model.
Description
Technical Field
The present disclosure relates to the field of artificial intelligence technology and finance, and more particularly, to a customer churn detection model training method, a customer churn detection method, a device, an electronic apparatus, and a storage medium.
Background
Financial activities in the pension financial scene have the characteristics of large investment of customers and small number of customer bodies, and if customer loss occurs, large loss is generally brought to financial institutions. Because the cost of recovering the customers about to run off is far lower than that of mining a new customer, the legal customers about to run off can be analyzed and distinguished with higher precision, and personalized marketing recovery according to the prediction results is quite necessary.
In the related art, the loss pre-judgment of the pension law customer is mainly based on experience, and a high-precision quantization model is lacked.
Disclosure of Invention
In view of this, the present disclosure provides a customer churn detection model training method, apparatus, electronic device, readable storage medium and computer program product.
One aspect of the present disclosure provides a customer churn detection model training method, comprising:
obtaining a plurality of customer behavior data samples based on customer history data recorded in a background database, wherein the customer behavior data samples comprise a plurality of first samples and a plurality of second samples, the labels of the first samples indicate that customers are not lost, and the labels of the second samples indicate that customers are lost; sampling the first samples and the second samples for multiple times to obtain a plurality of training sets and a plurality of testing sets; and performing integrated learning on a plurality of learners included in the initial model by using the plurality of training sets and the plurality of test sets to obtain a customer loss detection model.
According to an embodiment of the present disclosure, the sampling the plurality of first samples and the plurality of second samples, respectively, to obtain a plurality of training sets and a plurality of test sets includes: dividing the plurality of first samples into a plurality of first training samples and a plurality of first test samples based on a preset proportion in each sampling process; sampling the second samples for a plurality of times with replacement, so as to obtain a plurality of second training samples; determining a plurality of second test samples from the plurality of second samples based on the number of times of the put-back sampling; obtaining the training set based on the plurality of first training samples and the plurality of second training samples; and obtaining the test set based on the plurality of first test samples and the plurality of second test samples.
According to an embodiment of the present disclosure, the determining a plurality of second test samples from the plurality of second samples based on the number of times of the put-back sampling includes: determining a number of samples based on the number of times the sample is placed back and the number of the plurality of second samples; and determining the plurality of second test samples from the plurality of second samples based on the number of samples.
According to an embodiment of the present disclosure, the performing integrated learning on a plurality of learners included in an initial model by using the plurality of training sets and the plurality of test sets to obtain a client churn detection model includes: performing multiple iterative training on the multiple learners by using the multiple training sets respectively so as to adjust respective model parameters of the multiple learners and obtain multiple target learners; and performing multiple iterative tests on the multiple target learners by using the multiple test sets respectively to update the weights of the multiple learners so as to obtain the customer loss detection model.
According to an embodiment of the present disclosure, the performing, with the plurality of test sets, a plurality of iterative tests on the plurality of target learners, respectively, to update weights of the plurality of learners, to obtain the client churn detection model includes: in each iterative test process, respectively inputting the plurality of test sets into the plurality of target learners to obtain respective first output characteristics of the plurality of target learners; determining the detection accuracy times of the target learners based on the first output characteristics of the target learners and the labels of the test sets; and determining weights of the plurality of learners based on the respective detection accuracy times of the plurality of target learners.
According to an embodiment of the disclosure, the performing, with the plurality of training sets, multiple iterative training on the plurality of learners, respectively, to adjust model parameters of each of the plurality of learners, to obtain a plurality of target learners includes: in each iterative training process, for each learner, sequentially inputting the training sets into the learner to obtain a plurality of second output features; determining a training loss based on the plurality of second output features and the labels of each of the plurality of training sets; and adjusting model parameters of the learner using the training loss.
According to an embodiment of the present disclosure, the obtaining a plurality of customer behavior data samples based on the customer history data recorded in the background database includes: obtaining a plurality of historical behavior data related to each of a plurality of clients based on the client historical data; and extracting characteristics of the historical behavior data for each historical behavior data to obtain the customer behavior data sample.
According to an embodiment of the present disclosure, the feature extracting the historical behavior data to obtain the customer behavior data sample includes: performing principal component analysis on the historical behavior data to obtain a plurality of principal component features and contribution rates of the principal component features; determining a plurality of target principal component features from the plurality of principal component features based on a comparison result of the contribution rates of the plurality of principal component features and a preset threshold; and obtaining the customer behavior data sample based on the plurality of target principal component features.
According to an embodiment of the present disclosure, the above method further includes: respectively carrying out data cleaning on the plurality of historical behavior data to obtain a plurality of first historical behavior data; and extracting features of the historical behavior data for each historical behavior data to obtain the customer behavior data sample, wherein the steps comprise: and carrying out feature extraction on the first historical behavior data for each first historical behavior data to obtain the customer behavior data sample.
According to an embodiment of the disclosure, the performing data cleansing on the plurality of historical behavior data to obtain a plurality of first historical behavior data includes: for each piece of the historical behavior data, complementing missing values existing in the historical behavior data to obtain second historical behavior data; and detecting the abnormal value of the second historical behavior data to remove the abnormal value in the second historical behavior data, thereby obtaining the first historical behavior data.
Another aspect of the present disclosure provides a customer churn detection method, comprising: obtaining client behavior data of a target client based on the client data recorded in the background database; inputting the client behavior data into a client loss detection model to obtain a detection result of the target client; wherein the customer loss detection model is obtained by training the customer loss detection model training method.
According to an embodiment of the present disclosure, the above method further includes: receiving a client loss result of the target client; writing the customer behavior data and the customer loss result into a database; and in response to triggering a timing task, retraining the customer churn detection model by taking the customer behavior data recorded in the database as a training sample and the customer churn result as a label.
Another aspect of the present disclosure provides a customer churn test model training apparatus, comprising: the first processing module is used for obtaining a plurality of customer behavior data samples based on customer history data recorded in a background database, wherein the customer behavior data samples comprise a plurality of first samples and a plurality of second samples, the labels of the first samples indicate that customers are not lost, and the labels of the second samples indicate that customers are lost; the sampling module is used for respectively sampling the plurality of first samples and the plurality of second samples for a plurality of times to obtain a plurality of training sets and a plurality of test sets; and the training module is used for performing integrated learning on a plurality of learners included in the initial model by utilizing the plurality of training sets and the plurality of testing sets to obtain a customer loss detection model.
Another aspect of the present disclosure provides a customer churn detection apparatus, comprising: the second processing module is used for obtaining the client behavior data of the target client based on the client data recorded in the background database; the detection module is used for inputting the client behavior data into a client loss detection model to obtain a detection result of the target client; wherein the customer loss detection model is obtained by training the customer loss detection model training method.
Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more instructions that, when executed by the one or more processors, cause the one or more processors to implement the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are configured to implement a method as described above.
Another aspect of the present disclosure provides a computer program product comprising computer executable instructions which, when executed, are adapted to implement the method as described above.
According to the embodiment of the disclosure, a plurality of first samples representing that the client is not lost and a plurality of second samples representing that the client is lost can be obtained according to the client history data of each client and the duration condition of each client recorded in a background database. Multiple samples are taken from the first and second samples to obtain multiple training sets and multiple test sets. The initial model may be ensemble learned using multiple training sets and multiple test sets to obtain a customer churn detection model. By means of sampling the first sample and the second sample for multiple times, multiple training sets and testing sets which are different in proportion between samples which are not lost by the customer and samples which are lost by the customer can be generated, so that the influence of sample imbalance can be reduced, and the robustness and accuracy of a customer loss detection model can be effectively improved.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments thereof with reference to the accompanying drawings in which:
FIG. 1 schematically illustrates an exemplary system architecture to which customer churn detection model training methods, customer churn detection methods, and apparatus may be applied, in accordance with embodiments of the present disclosure.
Fig. 2 schematically illustrates a flow chart of a customer churn detection model training method according to an embodiment of the present disclosure.
Fig. 3A schematically illustrates a flow chart of a sample acquisition method according to an embodiment of the disclosure.
Fig. 3B schematically illustrates a flowchart showing a sample acquisition method according to another embodiment of the present disclosure.
Fig. 4A schematically illustrates a flow chart of a model training method according to an embodiment of the present disclosure.
Fig. 4B schematically illustrates a flow chart of a model training method according to an embodiment of the present disclosure.
Fig. 5 schematically illustrates a flow chart of a customer churn detection method according to an embodiment of the present disclosure.
Fig. 6 schematically illustrates a block diagram of a customer churn detection model training apparatus according to an embodiment of the present disclosure.
Fig. 7 schematically illustrates a block diagram of a customer churn detection apparatus according to an embodiment of the present disclosure.
Fig. 8 schematically illustrates a block diagram of an electronic device suitable for implementing a customer churn detection model training method and a customer churn detection method, in accordance with an embodiment of the present disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where expressions like at least one of "A, B and C, etc. are used, the expressions should generally be interpreted in accordance with the meaning as commonly understood by those skilled in the art (e.g.," a system having at least one of A, B and C "shall include, but not be limited to, a system having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
Embodiments of the present disclosure provide a customer churn detection model training method, a customer churn detection method, apparatus, electronic device, readable storage medium and computer program product. The customer churn detection model training method comprises the following steps: obtaining a plurality of customer behavior data samples based on customer history data recorded in a background database, wherein the plurality of customer behavior data samples comprise a plurality of first samples and a plurality of second samples, the labels of the first samples represent that customers are not lost, and the labels of the second samples represent that customers are lost; sampling the first samples and the second samples for multiple times to obtain a plurality of training sets and a plurality of testing sets; and performing integrated learning on a plurality of learners included in the initial model by using a plurality of training sets and a plurality of testing sets to obtain a customer loss detection model.
It should be noted that, the client loss detection model training method, the client loss detection method and the client loss detection device determined by the embodiments of the present disclosure may be used in the artificial intelligence technical field or the financial field, and may also be used in any field other than the artificial intelligence technical field and the financial field. The application fields of the client loss detection model training method, the client loss detection method and the client loss detection device determined by the embodiment of the disclosure are not limited.
In embodiments of the present disclosure, the collection, updating, analysis, processing, use, transmission, provision, disclosure, storage, etc., of the data involved (including, but not limited to, user personal information) all comply with relevant legal regulations, are used for legal purposes, and do not violate well-known. In particular, necessary measures are taken for personal information of the user, illegal access to personal information data of the user is prevented, and personal information security, network security and national security of the user are maintained.
In embodiments of the present disclosure, the user's authorization or consent is obtained before the user's personal information is obtained or collected.
It should be noted that, unless there is an execution sequence between different operations or an execution sequence between different operations in technical implementation, the execution sequence between multiple operations may be different, and multiple operations may also be executed simultaneously in the embodiment of the disclosure.
FIG. 1 schematically illustrates an exemplary system architecture to which customer churn detection model training methods, customer churn detection methods, and apparatus may be applied, in accordance with embodiments of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and/or wireless communication links, and the like.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as shopping class applications, web browser applications, search class applications, instant messaging tools, mailbox clients and/or social platform software, to name a few.
The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (e.g., the web page, information, or data obtained or generated according to the user request) to the terminal device.
It should be noted that the client churn detection model training method or the client churn detection method provided in the embodiments of the present disclosure may be generally performed by the server 105. Accordingly, the customer churn test model training device or customer churn test device provided by embodiments of the present disclosure may be generally provided in the server 105. The client churn detection model training method or client churn detection method provided by the embodiments of the present disclosure may also be performed by a server or server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the client churn detection model training apparatus or client churn detection apparatus provided in the embodiments of the present disclosure may also be provided in a server or server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Alternatively, the client churn detection model training method or the client churn detection method provided by the embodiments of the present disclosure may be performed by the terminal device 101, 102, or 103, or may be performed by other terminal devices different from the terminal device 101, 102, or 103. Accordingly, the client loss detection model training apparatus or the client loss detection apparatus provided in the embodiments of the present disclosure may also be provided in the terminal device 101, 102, or 103, or in another terminal device different from the terminal device 101, 102, or 103.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 schematically illustrates a flow chart of a customer churn detection model training method according to an embodiment of the present disclosure.
As shown in fig. 2, the method includes operations S210 to S230.
In operation S210, a plurality of customer behavior data samples are obtained based on the customer history data recorded in the background database, wherein the plurality of customer behavior data samples include a plurality of first samples and a plurality of second samples, the labels of the first samples indicate that the customer is not lost, and the labels of the second samples indicate that the customer is lost.
In operation S220, the plurality of first samples and the plurality of second samples are sampled multiple times, respectively, to obtain a plurality of training sets and a plurality of test sets.
In operation S230, a plurality of learners included in the initial model are ensemble-learned by using a plurality of training sets and a plurality of test sets, to obtain a customer churn detection model.
According to embodiments of the present disclosure, the customer history data may be a data record that is maintained by a financial institution after a business operation is completed with the customer. Customer history data may include basic attribute data, macro data, asset data, product data, transaction data, and the like. The basic attribute data may include, for example, industry type, economic type, customer property, etc., the macro data may be, for example, average production value data of the customer site, the asset data may include, for example, registered capital, fund size, etc., the product data may include, for example, planned product type, investment damage, etc., and the transaction data may include, for example, inflow and outflow amount, historical transaction amount in the dimension of the enterprise, etc.
According to embodiments of the present disclosure, a tag indicating whether the client is already lost may also be included in the client history data, for example, a "1" may be used to indicate that the client is already lost, and a "0" may be used to indicate that the client is not already lost, which is not limited herein.
The manner in which the plurality of first samples or the plurality of second samples are sampled may include, without limitation, with or without a sample back, according to embodiments of the present disclosure. The number of first samples or second samples required for the training set or the test set in each sampling is not limited herein, and the ratio between the first samples and the second samples included in the training set or the test set is not limited herein. For example, the number of samples of the training set obtained by the first sampling is 10, including 4 first samples and 6 second samples, and the number of samples of the training set obtained by the second sampling is 15, including 8 first samples and 7 second samples.
According to embodiments of the present disclosure, the plurality of learners included in the initial model may be a plurality of homogenous learners, i.e., a plurality of learners may be obtained based on the same network architecture. The network architecture may be any deep learning model network architecture that may be used to implement two classifications, such as deep convolutional neural networks, recurrent neural networks, and the like, and is not limited herein. The initial model parameters of each of the plurality of learners may differ.
According to an embodiment of the present disclosure, the output of the initial model may be a weighted average of the outputs of a plurality of learners, and the initial weights of each of the plurality of learners may be equal.
According to the embodiment of the disclosure, a plurality of first samples representing that the client is not lost and a plurality of second samples representing that the client is lost can be obtained according to the client history data of each client and the duration condition of each client recorded in a background database. Multiple samples are taken from the first and second samples to obtain multiple training sets and multiple test sets. The initial model may be ensemble learned using multiple training sets and multiple test sets to obtain a customer churn detection model. By means of sampling the first sample and the second sample for multiple times, multiple training sets and testing sets which are different in proportion between samples which are not lost by the customer and samples which are lost by the customer can be generated, so that the influence of sample imbalance can be reduced, and the robustness and accuracy of a customer loss detection model can be effectively improved.
The method illustrated in fig. 2 is further described below with reference to fig. 3A-3B and fig. 4A-4B in conjunction with specific embodiments.
Fig. 3A schematically illustrates a flow chart of a sample acquisition method according to an embodiment of the disclosure.
As shown in fig. 3A, the method includes operations S211 to S212.
In operation S211, a plurality of historical behavior data associated with each of the plurality of customers is obtained based on the customer history data.
In operation S212, for each historical behavior data, feature extraction is performed on the historical behavior data to obtain a customer behavior data sample.
According to embodiments of the present disclosure, for each customer, historical behavior data associated with the customer may be represented as a customer representation of the customer. The customer representation may abstract an information overview of a customer by tagging the customer information, including quantized business and behavioral characteristics of the customer.
According to the embodiment of the disclosure, since the constructed customer portrait contains more independent variables, which may cause problems of multiple collinearity, overfitting and the like, the dimension reduction method can be used for dimension reduction of the customer portrait, namely, feature extraction is performed on the historical behavior data, so that the plurality of independent variables contained in the customer portrait can be integrated into a plurality of large indexes on the premise of losing effective information as little as possible. The dimension reduction method may include, for example, a K-means mean clustering method, a principal component analysis method, and the like.
Taking a dimension reduction method as a principal component analysis method as an example, according to an embodiment of the present disclosure, performing feature extraction on historical behavior data, and obtaining a customer behavior data sample may include the following operations:
performing principal component analysis on the historical behavior data to obtain a plurality of principal component features and contribution rates of the principal component features; determining a plurality of target principal component features from the plurality of principal component features based on a comparison result of the contribution rates of the plurality of principal component features with a preset threshold; and obtaining a customer behavior data sample based on the plurality of target principal component features.
According to embodiments of the present disclosure, after performing a principal component analysis on the historical behavior data, the resulting output may include a matrix and a vector. Each column vector of the matrix may be represented as a principal component feature. Each element of the vector may be represented as a contribution rate of the corresponding principal component feature.
According to embodiments of the present disclosure, the preset threshold may be set according to a specific application scenario. Alternatively, the preset threshold may be set according to the value of each contribution rate, for example, in the case where the computational power resource is limited, a fixed number of principal component features may be taken as the target principal component feature, and accordingly, the preset threshold may be set to a value smaller than the minimum contribution rate of the fixed number of principal component features. Alternatively, the preset threshold may be set to a fixed value, and when the contribution rate of the principal component feature is greater than the preset threshold, the principal component feature may be considered to be trusted for training of the model, and correspondingly, the principal component feature whose contribution rate is less than the preset threshold may be considered to be noise. When determining the target principal component feature, a principal component feature having a contribution rate greater than the preset threshold may be selected as the target principal component feature.
According to the embodiment of the disclosure, a plurality of target principal component features can be combined into a matrix, and thus a customer behavior data sample is obtained.
According to an embodiment of the present disclosure, taking a dimension reduction method as an example of a principal component analysis method as an alternative implementation manner, performing feature extraction on historical behavior data to obtain a customer behavior data sample may further include the following operations:
performing principal component analysis on the historical behavior data to obtain a plurality of principal component features and contribution rates of the principal component features; sorting the main component features in descending order according to the contribution rate of each main component feature; sequentially accumulating the contribution rates of the plurality of sequenced main component features to obtain a total contribution rate until the total contribution rate is greater than a preset threshold value; taking the principal component characteristics subjected to the accumulation operation as target principal component characteristics; and generating a customer behavior data sample based on the obtained target principal component characteristics. According to an embodiment of the present disclosure, as an alternative implementation, the historical behavior data may also be subjected to data cleaning before feature extraction is performed.
Fig. 3B schematically illustrates a flowchart showing a sample acquisition method according to another embodiment of the present disclosure.
As shown in fig. 3B, the method includes operations S211 and operations S213 to S214.
In operation S211, a plurality of historical behavior data associated with each of the plurality of customers is obtained based on the customer history data.
In operation S213, data cleansing is performed on the plurality of historical behavior data, so as to obtain a plurality of first historical behavior data.
In operation S214, for each first historical behavior data, feature extraction is performed on the first historical behavior data, so as to obtain a customer behavior data sample.
According to an embodiment of the present disclosure, missing or abnormal data may exist in the historical behavior data, and the data cleansing of the plurality of historical behavior data may be to process the missing value and the abnormal value included in the historical behavior data, respectively. Specifically, the data cleansing is performed on the plurality of historical behavior data respectively, and obtaining the plurality of first historical behavior data may include the following operations:
for each historical behavior data, complementing missing values existing in the historical behavior data to obtain second historical behavior data; and detecting the abnormal value of the second historical behavior data to remove the abnormal value in the second historical behavior data, so as to obtain the first historical behavior data.
According to the embodiment of the disclosure, different methods can be selected to process the missing value according to the variable type of the missing value. For example, where the variable type of the missing value is a continuous variable, a regression algorithm may be used to implement the replenishment of the missing value. Specifically, a regression model may be established based on sample data without missing values, a random mask may be added to the sample data without missing values to generate a training set, and the sample data without missing values itself is used as a label to train the regression model. After training is completed, sample data with missing values can be input into the regression model to estimate the missing values. For another example, when the variable type of the missing value is a discrete variable, the completion of the missing value may be achieved using various classification and clustering algorithms. Specifically, K samples nearest to the missing value sample may be determined according to the euclidean distance using a K-nearest neighbor algorithm, and the missing value is estimated based on a weighted average of the K samples.
According to the embodiment of the present disclosure, the determination of the outlier may be performed based on the 3σ principle of the normal distribution, that is, when the absolute value of the residual of a certain value in the historical behavior data is greater than 3σ, the value may be regarded as the outlier. After the outlier is proposed, the data may also be complemented using the missing value complement method described above.
According to the embodiment of the disclosure, the defects of the data can be eliminated through data cleaning, so that the accuracy of the model is indirectly improved.
According to the embodiment of the disclosure, in the old-fashioned financial scene, the flow of the legal customer replacement management mechanism is long and complex, so that the number of lost samples, namely the number of second samples, in the customer history data recorded in the background database is generally far smaller than the number of normal-state samples, namely the number of first samples. The ratio between the first sample and the second sample may thus be configured in the training set or the test set by means of sampling.
According to an embodiment of the present disclosure, operation S220 may include the following operations:
dividing the plurality of first samples into a plurality of first training samples and a plurality of first test samples based on a preset proportion in each sampling process; sampling the second samples for a plurality of times with replacement to obtain a plurality of second training samples; determining a plurality of second test samples from the plurality of second samples based on the number of times the sample is replaced; obtaining a training set based on the plurality of first training samples and the plurality of second training samples; and obtaining a test set based on the plurality of first test samples and the plurality of second test samples.
According to the embodiment of the disclosure, the preset proportion can be set according to a specific application scene. Alternatively, the preset ratio may be calculated based on the number of samples according to a statistical principle. For example, for a sample set of sample size n, if the sample set is sampled back k times, the number of samples n of the sample set that are not sampled 0 Can be shown as formula (1):
n 0 =n×(1-1/k) k (1)
accordingly, the preset ratio can be expressed as (1-1/k) k Is a value of (2). Still alternatively, the preset ratio may be set to a fixed value. For example, based on equation (1), k may be set to a larger value, if k approaches infinity, and the preset ratio may be as shown in equation (2):
according to embodiments of the present disclosure, the same second sample may be present in the plurality of first test samples.
According to an embodiment of the present disclosure, determining a plurality of second test samples from the plurality of second samples based on the number of times of the put-back sampling may include the operations of:
determining a number of samples based on the number of times the sample is replaced and the number of the plurality of second samples; and determining a plurality of second test samples from the plurality of second samples based on the number of samples.
According to embodiments of the present disclosure, in particular, the number of samples may be set based on the number of samples that are not sampled after k times of the subsampled. I.e. the number of samples that are not sampled as shown in equation (1) can be used as the number of samples.
According to embodiments of the present disclosure, the plurality of second test samples may be sampled a corresponding number of times with or without a put back sample according to the number of samples, thereby obtaining a plurality of second test samples.
According to embodiments of the present disclosure, the ratio between the first sample and the second sample included in the training set or the test set may be adjusted by adjusting the number of times that the samples are put back, thereby at least partially overcoming sample imbalance and small sample problems.
According to the embodiment of the disclosure, when training an initial model, training of model parameters of each learner may be performed first, and then training of weights between learners may be performed.
Fig. 4A schematically illustrates a flow chart of a model training method according to an embodiment of the present disclosure.
As shown in fig. 4A, the method may include operations S231 to S232.
In operation S231, a plurality of learners are respectively trained in multiple iterations by using the multiple training sets to adjust model parameters of each of the learners, thereby obtaining a plurality of target learners.
In operation S232, a plurality of iterative tests are performed on the plurality of target learners by using the plurality of test sets, so as to update weights of the plurality of learners, thereby obtaining a customer loss detection model.
According to embodiments of the present disclosure, for each learner, one iterative training of the learner may include training the learner using multiple training sets. Specifically, in each iterative training process, for each learner, a plurality of training sets are sequentially input into the learner to obtain a plurality of second output features; determining a training loss based on the plurality of second output features and the labels of each of the plurality of training sets; and adjusting model parameters of the learner using the training loss.
According to the embodiment of the disclosure, the model parameters of the learner may be updated and adjusted after completing one iteration training, or the model parameters of the learner may be updated and adjusted after completing a certain batch of training set training in one iteration training, which is not limited herein.
In accordance with embodiments of the present disclosure, in a pension finance scenario, an institution may make a decision whether to retrieve a customer based on the output of the customer churn detection model. But if the decision is wrong, different results may be caused. For example, if a normal state customer is incorrectly determined to be a potential attrition customer, the result is simply an addition of remedial means, such as an addition of unnecessary marketing retrieval. But if a potential attrition customer is determined to be a normal customer, the best opportunity to retrieve the customer is lost. Therefore, when model parameters of learners are adjusted by using training loss, an adjustment coefficient can be added for the training loss, so that the adjustment coefficient can be set based on the sensitivity to the lost clients, thereby influencing the training results of the learners.
According to the embodiment of the disclosure, in each iterative test process, a plurality of test sets are respectively input into a plurality of target learners to obtain respective first output characteristics of the plurality of target learners; determining the detection accuracy times of each of the plurality of target learners based on the first output characteristics of each of the plurality of target learners and the labels of each of the plurality of test sets; and determining weights of the plurality of learners based on the respective detection accuracy times of the plurality of target learners.
According to embodiments of the present disclosure, the plurality of target learners may be denoted as h1, h2, …, hn, respectively, and the outputs of the plurality of target learners may be denoted as s1, s2, …, sn, respectively. When not trained, the initial weights of the plurality of target learners may be equal, for example, the initial weights of the plurality of target learners may be set to 1/n, n may represent the number of the plurality of target learners, that is, the output of the model may be as shown in formula (3):
in equation (3), y may represent the output of the model.
According to the embodiment of the disclosure, in each iteration process, whether the output of the target learner is accurate or not may be determined according to the first output characteristic of the target learner and the label of the corresponding data, specifically, for each test set, a plurality of input samples included in the test set may be sequentially input into the target learner, and the obtained first output characteristic may include the output characteristic obtained after the input of the plurality of input samples. The first output feature may be binarized, and the binarized feature may be compared with each element in the label of the test set in sequence, and the number of the same elements may be recorded, and if the number of the same elements is greater than a certain threshold, the output of the target learner with respect to the test set may be considered accurate.
According to the embodiment of the disclosure, for each target learner, the score of the target learner may be determined according to the accurate number of times of detection of the target learner, as shown in formula (4):
in equation (4), score i The score of the ith target learner may be represented, and t may represent the number of times the ith target learner is detected accurately.
According to an embodiment of the present disclosure, the weights of the respective target learners may be updated according to the respective scores of the target learners, as shown in formula (5):
in formula (5), w i The weight of the i-th updated object learner can be represented, and the sum of the weights of the n object learners can be 1, namely
According to an embodiment of the present disclosure, after updating the weights, the output of the model may be as shown in formula (6):
in equation (6), y' may represent the output of the model after the weight update.
According to embodiments of the present disclosure, model parameters and weights of multiple learners may also be trained alternately, as an alternative implementation.
Fig. 4B schematically illustrates a flow chart of a model training method according to an embodiment of the present disclosure.
As shown in fig. 4B, the method may include operations S233 to S238.
In operation S233, the plurality of learners are trained using the plurality of training sets, respectively, to adjust model parameters of the respective learners.
In operation S234, the plurality of parameter-adjusted learners are trained using the plurality of training sets to adjust weights of the plurality of parameter-adjusted learners, respectively.
In operation S235, a plurality of parameter-adjusted and weight-adjusted learners are tested by using a plurality of test sets, and test results are obtained.
In operation S236, it is determined whether training is completed based on the test result. In the case where it is determined that training is not completed, operation S237 is performed. In case it is determined that the training is completed, operation S238 is performed.
In operation S237, the parameter-adjusted and weight-adjusted learner is used as a new learner. After the operation S237 is completed, operation S233 is returned.
In operation S238, a customer churn detection model is obtained based on the plurality of parameter-adjusted and weight-adjusted learners.
According to an embodiment of the present disclosure, as an alternative implementation, in operation S234, the adjustment process of the weight of the learner may also be implemented using the test set as a training sample, which is not limited herein.
According to an embodiment of the present disclosure, as an alternative implementation, the testing process of the plurality of parameter-adjusted and weight-adjusted learners may also be implemented using the training set as a test sample in operation S235, which is not limited herein.
Fig. 5 schematically illustrates a flow chart of a customer churn detection method according to an embodiment of the present disclosure.
As shown in fig. 5, the method includes operations S510 to S520.
In operation S510, customer behavior data of the target customer is obtained based on the customer data recorded in the background database.
In operation S520, the customer behavior data is input into the customer churn detection model to obtain the detection result of the target customer.
According to the embodiments of the present disclosure, the customer loss detection model may be obtained by training using the customer loss detection model training method as described above, and the description of the customer loss detection model training method section specifically refers to the foregoing customer loss detection model training method section, and will not be described herein.
According to the embodiment of the present disclosure, the client behavior data may be obtained by using the data cleaning and feature extraction methods described above for the client data recorded in the background database, which will not be described herein.
According to embodiments of the present disclosure, customer churn results entered by an institution may be received, which may indicate whether the customer churn. The customer churn results may be written into a database along with customer behavior data,
according to the embodiment of the disclosure, the parameter update of the customer churn detection model can be performed regularly according to the data recorded in the database. Specifically, the customer churn detection model may be retrained with the customer behavior data recorded in the database as training samples and the customer churn results as labels in response to triggering the timing tasks.
Fig. 6 schematically illustrates a block diagram of a customer churn detection model training apparatus according to an embodiment of the present disclosure.
As shown in fig. 6, the customer churn test model training apparatus 600 includes a first processing module 610, a sampling module 620, and a training module 630.
The first processing module 610 is configured to obtain a plurality of customer behavior data samples based on customer history data recorded in a background database, where the plurality of customer behavior data samples includes a plurality of first samples and a plurality of second samples, a label of the first sample indicates that the customer is not lost, and a label of the second sample indicates that the customer is lost.
The sampling module 620 is configured to sample the first samples and the second samples for multiple times, to obtain multiple training sets and multiple testing sets.
The training module 630 is configured to perform integrated learning on a plurality of learners included in the initial model by using a plurality of training sets and a plurality of test sets, so as to obtain a customer churn detection model.
According to an embodiment of the present disclosure, the sampling module 620 may include a first sampling unit, a second sampling unit, a third sampling unit, a fourth sampling unit, and a fifth sampling unit.
The first sampling unit is used for dividing the plurality of first samples into a plurality of first training samples and a plurality of first test samples based on a preset proportion in each sampling process.
And the second sampling unit is used for carrying out multiple-time replacement sampling on the plurality of second samples to obtain a plurality of second training samples.
And a third sampling unit for determining a plurality of second test samples from the plurality of second samples based on the number of times of the subsampling.
And the fourth sampling unit is used for obtaining a training set based on the plurality of first training samples and the plurality of second training samples.
And the fifth sampling unit is used for obtaining a test set based on the first test samples and the second test samples.
According to an embodiment of the present disclosure, the third sampling unit includes a first sampling subunit and a second sampling subunit.
A first sampling subunit for determining a number of samples based on the number of times there are put back samples and the number of the plurality of second samples.
A second sampling subunit for determining a plurality of second test samples from the plurality of second samples based on the number of samples.
According to an embodiment of the present disclosure, training module 630 includes a first training unit and a second training unit.
The first training unit is used for performing repeated iterative training on the multiple learners by utilizing the multiple training sets respectively so as to adjust respective model parameters of the multiple learners and obtain multiple target learners.
And the second training unit is used for respectively carrying out repeated iterative tests on the plurality of target learners by using the plurality of test sets so as to update the weights of the plurality of learners and obtain a customer loss detection model.
According to an embodiment of the present disclosure, the second training unit comprises a first training subunit, a second training subunit and a third training subunit.
And the first training subunit is used for respectively inputting the plurality of test sets into the plurality of target learners in each iterative test process to obtain respective first output characteristics of the plurality of target learners.
And the second training subunit is used for determining the accurate detection times of the plurality of target learners based on the first output characteristics of the plurality of target learners and the labels of the plurality of test sets.
And the third training subunit is used for determining the weight of each of the plurality of learners based on the accurate detection times of each of the plurality of target learners.
According to an embodiment of the present disclosure, the first training unit includes a fourth training subunit, a fifth training subunit, and a sixth training subunit.
And the fourth training subunit is used for inputting a plurality of training sets into each learner in turn for each learner in each iterative training process to obtain a plurality of second output characteristics.
And a fifth training subunit configured to determine a training loss based on the plurality of second output features and the labels of each of the plurality of training sets.
And a sixth training subunit for adjusting model parameters of the learner using the training loss.
According to an embodiment of the present disclosure, the first processing module 610 includes a first processing unit and a second processing unit.
The first processing unit is used for obtaining a plurality of historical behavior data related to each of a plurality of clients based on the client historical data.
And the second processing unit is used for carrying out feature extraction on the historical behavior data for each historical behavior data to obtain a customer behavior data sample.
According to an embodiment of the present disclosure, the second processing unit includes a first processing subunit, a second processing subunit, and a third processing subunit.
And the first processing subunit is used for carrying out principal component analysis on the historical behavior data to obtain a plurality of principal component characteristics and contribution rates of the principal component characteristics.
And the second processing subunit is used for determining a plurality of target principal component features from the plurality of principal component features based on the comparison result of the contribution rates of the plurality of principal component features and a preset threshold value.
And the third processing subunit is used for obtaining a customer behavior data sample based on the plurality of target principal component characteristics.
According to an embodiment of the present disclosure, the first processing module 610 further includes a third processing unit.
And the third processing unit is used for respectively carrying out data cleaning on the plurality of historical behavior data to obtain a plurality of first historical behavior data.
According to an embodiment of the present disclosure, the second processing unit comprises a fourth processing subunit.
And the fourth processing subunit is used for carrying out feature extraction on the first historical behavior data for each first historical behavior data to obtain a customer behavior data sample.
According to an embodiment of the present disclosure, the third processing unit includes a fifth processing subunit and a sixth processing subunit.
And the fifth processing subunit is used for complementing the missing values in the historical behavior data for each historical behavior data to obtain second historical behavior data.
And the sixth processing subunit is used for detecting the abnormal value of the second historical behavior data so as to remove the abnormal value in the second historical behavior data and obtain the first historical behavior data.
Fig. 7 schematically illustrates a block diagram of a customer churn detection apparatus according to an embodiment of the present disclosure.
As shown in fig. 7, the customer churn detection device 700 includes a second processing module 710 and a detection module 720.
The second processing module 710 is configured to obtain the client behavior data of the target client based on the client data recorded in the background database.
The detection module 720 is configured to input the client behavior data into a client churn detection model, and obtain a detection result of the target client.
According to the embodiments of the present disclosure, the customer loss detection model may be trained by using the customer loss detection model training method described above, and will not be described in detail herein.
According to embodiments of the present disclosure, the customer churn detection apparatus 700 may further include a receiving module, a writing module, and a retraining module.
And the receiving module is used for receiving the client loss result of the target client.
And the writing module is used for writing the customer behavior data and the customer loss result into the database.
And the retraining module is used for retraining the customer loss detection model by taking the customer behavior data recorded in the database as a training sample and the customer loss result as a label in response to triggering the timing task.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Alternatively, one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which when executed, may perform the corresponding functions.
For example, the first processing module 610, the sampling module 620, and the training module 630, or any of the second processing module 710 and the detection module 720 may be combined in one module/unit/sub-unit, or any of the modules/units/sub-units may be split into a plurality of modules/units/sub-units. Alternatively, at least some of the functionality of one or more of these modules/units/sub-units may be combined with at least some of the functionality of other modules/units/sub-units and implemented in one module/unit/sub-unit. According to embodiments of the present disclosure, at least one of the first processing module 610, the sampling module 620, and the training module 630, or the second processing module 710 and the detection module 720, may be implemented at least in part as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system on a chip, a system on a substrate, a system on a package, an Application Specific Integrated Circuit (ASIC), or may be implemented in hardware or firmware in any other reasonable way of integrating or packaging the circuitry, or in any one of or a suitable combination of any of the three. Alternatively, at least one of the first processing module 610, the sampling module 620, and the training module 630, or the second processing module 710 and the detection module 720, may be at least partially implemented as computer program modules, which when executed, may perform the respective functions.
It should be noted that, in the embodiment of the present disclosure, the client loss detection model training device portion corresponds to the client loss detection model training method portion in the embodiment of the present disclosure, and the description of the client loss detection model training device portion specifically refers to the client loss detection model training method portion, which is not described herein. The client loss detection device portion in the embodiment of the present disclosure corresponds to the client loss detection method portion in the embodiment of the present disclosure, and the description of the client loss detection device portion specifically refers to the client loss detection method portion and is not described herein.
Fig. 8 schematically illustrates a block diagram of an electronic device suitable for implementing a customer churn detection model training method and a customer churn detection method, in accordance with an embodiment of the present disclosure. The electronic device shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 8, a computer electronic device 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 801 may also include on-board memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the disclosure.
In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or the RAM 803. Note that the program may be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 800 may also include an input/output (I/O) interface 805, the input/output (I/O) interface 805 also being connected to the bus 804. The electronic device 800 may also include one or more of the following components connected to an input/output (I/O) interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to an input/output (I/O) interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 801. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/device/system described in the above embodiments; or may exist alone without being assembled into the apparatus/device/system. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium. Examples may include, but are not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 802 and/or RAM 803 and/or one or more memories other than ROM 802 and RAM 803 described above.
Embodiments of the present disclosure also include a computer program product comprising a computer program comprising program code for performing the methods provided by the embodiments of the present disclosure, when the computer program product is run on an electronic device, for causing the electronic device to implement the client churn detection model training method provided by the embodiments of the present disclosure.
The above-described functions defined in the system/apparatus of the embodiments of the present disclosure are performed when the computer program is executed by the processor 801. The systems, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
In one embodiment, the computer program may be based on a tangible storage medium such as an optical storage device, a magnetic storage device, or the like. In another embodiment, the computer program may also be transmitted, distributed, and downloaded and installed in the form of a signal on a network medium, and/or from a removable medium 811 via a communication portion 809. The computer program may include program code that may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
According to embodiments of the present disclosure, program code for performing computer programs provided by embodiments of the present disclosure may be written in any combination of one or more programming languages, and in particular, such computer programs may be implemented in high-level procedural and/or object-oriented programming languages, and/or assembly/machine languages. Programming languages include, but are not limited to, such as Java, c++, python, "C" or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, partly on a remote computing device, or entirely on the remote computing device or server. In the case of remote computing devices, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., connected via the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions. Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be combined in various combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. However, these examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.
Claims (17)
1. A customer churn detection model training method comprising:
obtaining a plurality of customer behavior data samples based on customer history data recorded in a background database, wherein the customer behavior data samples comprise a plurality of first samples and a plurality of second samples, the labels of the first samples represent that customers are not lost, and the labels of the second samples represent that customers are lost;
sampling the first samples and the second samples for multiple times to obtain a plurality of training sets and a plurality of testing sets; and
and performing integrated learning on a plurality of learners included in the initial model by using the training sets and the testing sets to obtain a customer loss detection model.
2. The method of claim 1, wherein the sampling the plurality of first samples and the plurality of second samples, respectively, a plurality of training sets and a plurality of test sets comprises:
dividing the plurality of first samples into a plurality of first training samples and a plurality of first test samples based on a preset proportion in each sampling process;
sampling the second samples for a plurality of times with replacement to obtain a plurality of second training samples;
determining a plurality of second test samples from the plurality of second samples based on the number of times of the put-back sampling;
obtaining the training set based on the plurality of first training samples and the plurality of second training samples; and
the test set is obtained based on the plurality of first test samples and the plurality of second test samples.
3. The method of claim 2, wherein the determining a plurality of second test samples from the plurality of second samples based on the number of times of the put-back sampling comprises:
determining a number of samples based on the number of times the sample is put back and the number of the plurality of second samples; and
the plurality of second test samples is determined from the plurality of second samples based on the number of samples.
4. The method of claim 1, wherein the performing integrated learning on a plurality of learners included in an initial model by using the plurality of training sets and the plurality of test sets to obtain a client churn detection model comprises:
performing repeated iterative training on the learners by using the training sets to adjust model parameters of the learners respectively to obtain a plurality of target learners; and
and respectively carrying out repeated iterative tests on the target learners by using the test sets so as to update the weights of the learners and obtain the customer loss detection model.
5. The method of claim 4, wherein the performing, with the plurality of test sets, a plurality of iterative tests on the plurality of target learners, respectively, to update weights of the plurality of learners, respectively, to obtain the customer churn detection model includes:
in each iterative test process, respectively inputting the multiple test sets into the multiple target learners to obtain respective first output characteristics of the multiple target learners;
determining the detection accuracy times of the target learners based on the first output characteristics of the target learners and the labels of the test sets; and
And determining the weight of each of the plurality of learners based on the accurate detection times of each of the plurality of target learners.
6. The method of claim 4, wherein the performing the iterative training on the plurality of learners with the plurality of training sets to adjust model parameters of each of the plurality of learners to obtain a plurality of target learners comprises:
in each iterative training process, for each learner, sequentially inputting the training sets into the learner to obtain a plurality of second output features;
determining a training loss based on the plurality of second output features and the labels of each of the plurality of training sets; and
the training loss is used to adjust model parameters of the learner.
7. The method of claim 1, wherein the deriving a plurality of customer behavior data samples based on customer history data recorded in a background database comprises:
obtaining a plurality of historical behavior data related to each of a plurality of clients based on the client historical data; and
and carrying out feature extraction on the historical behavior data for each historical behavior data to obtain the customer behavior data sample.
8. The method of claim 7, wherein the feature extracting the historical behavior data to obtain the customer behavior data sample comprises:
performing principal component analysis on the historical behavior data to obtain a plurality of principal component features and respective contribution rates of the plurality of principal component features;
determining a plurality of target principal component features from the plurality of principal component features based on a comparison result of the contribution rates of the plurality of principal component features and a preset threshold; and
and obtaining the customer behavior data sample based on the target principal component characteristics.
9. The method of claim 7, further comprising:
respectively carrying out data cleaning on the plurality of historical behavior data to obtain a plurality of first historical behavior data;
and extracting features of the historical behavior data for each historical behavior data to obtain the customer behavior data sample, wherein the steps comprise:
and carrying out feature extraction on the first historical behavior data for each piece of first historical behavior data to obtain the customer behavior data sample.
10. The method of claim 9, wherein the performing data cleansing on the plurality of historical behavior data to obtain a plurality of first historical behavior data includes:
For each historical behavior data, complementing missing values existing in the historical behavior data to obtain second historical behavior data; and
and detecting the abnormal value of the second historical behavior data to remove the abnormal value in the second historical behavior data, so as to obtain the first historical behavior data.
11. A customer churn detection method comprising:
obtaining client behavior data of a target client based on the client data recorded in the background database; and
inputting the client behavior data into a client loss detection model to obtain a detection result of the target client;
wherein the customer loss detection model comprises training using the customer loss detection model training method according to any one of claims 1 to 10.
12. The method of claim 11, further comprising:
receiving a client loss result of the target client;
writing the customer behavior data and the customer churn result into a database; and
and responding to the triggering timing task, taking the customer behavior data recorded in the database as a training sample, and retraining the customer loss detection model by taking the customer loss result as a label.
13. A customer churn test model training apparatus comprising:
the first processing module is used for obtaining a plurality of customer behavior data samples based on customer history data recorded in a background database, wherein the customer behavior data samples comprise a plurality of first samples and a plurality of second samples, the labels of the first samples represent that customers are not lost, and the labels of the second samples represent that customers are lost;
the sampling module is used for respectively sampling the plurality of first samples and the plurality of second samples for a plurality of times to obtain a plurality of training sets and a plurality of testing sets; and
and the training module is used for utilizing the training sets and the testing sets to perform integrated learning on the learners included in the initial model to obtain the customer loss detection model.
14. A customer churn detection apparatus comprising:
the second processing module is used for obtaining the client behavior data of the target client based on the client data recorded in the background database; and
the detection module is used for inputting the client behavior data into a client loss detection model to obtain a detection result of the target client;
wherein the customer loss detection model comprises training using the customer loss detection model training method according to any one of claims 1 to 10.
15. An electronic device, comprising:
one or more processors;
a memory for storing one or more instructions,
wherein the one or more instructions, when executed by the one or more processors, cause the one or more processors to implement the method of any of claims 1 to 12.
16. A computer readable storage medium having stored thereon executable instructions which when executed by a processor cause the processor to implement the method of any of claims 1 to 12.
17. A computer program product comprising computer executable instructions for implementing the method of any one of claims 1 to 12 when executed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310531694.0A CN116522146A (en) | 2023-05-11 | 2023-05-11 | Customer loss detection model training method, customer loss detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310531694.0A CN116522146A (en) | 2023-05-11 | 2023-05-11 | Customer loss detection model training method, customer loss detection method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116522146A true CN116522146A (en) | 2023-08-01 |
Family
ID=87404504
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310531694.0A Pending CN116522146A (en) | 2023-05-11 | 2023-05-11 | Customer loss detection model training method, customer loss detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116522146A (en) |
-
2023
- 2023-05-11 CN CN202310531694.0A patent/CN116522146A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20180253657A1 (en) | Real-time credit risk management system | |
WO2019196552A1 (en) | Data processing method, apparatus and device for insurance fraud identification, and server | |
US20170018030A1 (en) | System and Method for Determining Credit Worthiness of a User | |
CN110705719A (en) | Method and apparatus for performing automatic machine learning | |
CN111783039B (en) | Risk determination method, risk determination device, computer system and storage medium | |
CN113051911B (en) | Method, apparatus, device, medium and program product for extracting sensitive words | |
CN110717597B (en) | Method and device for acquiring time sequence characteristics by using machine learning model | |
CN111369258A (en) | Entity object type prediction method, device and equipment | |
CN112883990A (en) | Data classification method and device, computer storage medium and electronic equipment | |
CN113785314A (en) | Semi-supervised training of machine learning models using label guessing | |
US11100428B2 (en) | Distributable event prediction and machine learning recognition system | |
CN117234844A (en) | Cloud server abnormality management method and device, computer equipment and storage medium | |
CN117437019A (en) | Credit card overdue risk prediction method, apparatus, device, medium and program product | |
CN116578925A (en) | Behavior prediction method, device and storage medium based on feature images | |
US20190385079A1 (en) | Correcting bias in supervised machine learning data | |
CN116664306A (en) | Intelligent recommendation method and device for wind control rules, electronic equipment and medium | |
WO2023051085A1 (en) | Object recognition method and apparatus, device, storage medium and program product | |
CN115795345A (en) | Information processing method, device, equipment and storage medium | |
KR102284440B1 (en) | Method to broker deep learning model transactions perfomed by deep learning model transaction brokerage servers | |
CN116522146A (en) | Customer loss detection model training method, customer loss detection method and device | |
CN113901817A (en) | Document classification method and device, computer equipment and storage medium | |
CN114066513A (en) | User classification method and device | |
CN111861493A (en) | Information processing method, information processing device, electronic equipment and storage medium | |
US20240171400A1 (en) | Feedback mining with domain-specific modeling and token-based transactions | |
CN114742648A (en) | Product pushing method, device, equipment and medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |