Method, device and storage medium for classifying user data
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WEBANK (CHINA)
- Filing Date
- 2021-12-30
- Publication Date
- 2026-05-22
AI Technical Summary
In existing technologies, the K-means algorithm model has an overly subjective setting of the k value in user data classification, which leads to model training failure, inability to automatically update user data types, and low classification efficiency.
By acquiring a sample dataset, dividing it into multiple target clusters, determining the target optimization parameters, removing invalid clusters and similar features, using the trained data classification model to determine the user data type, and automatically optimizing the number of user data types.
It improves the efficiency of user data classification and the speed of model training, adapts to the automatic updates of new user data from unknown sources, and enhances the adaptability and accuracy of the classification model.
Smart Images

Figure CN114298241B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of fintech, and in particular to a method, device, and storage medium for classifying user data. Background Technology
[0002] With the development of computer technology, more and more technologies are being applied in the financial field. The traditional financial industry is gradually transforming into financial technology, and user data classification technology is no exception. However, due to the security and real-time requirements of the financial industry, higher demands are being placed on the technology.
[0003] In related technologies, the K-means clustering algorithm can be used to perform value analysis on user data. The k-means algorithm divides user data into K clusters, with the centroid of each cluster calculated from the average value of the user data within that cluster. The choice of K is set by the user based on experience, ensuring that points with similar characteristics are clustered together during clustering.
[0004] However, because the setting of the k value in the K-means algorithm is too subjective, an improperly set k value can lead to training failure. When new user data from unknown sources is introduced, the k-means algorithm model cannot automatically update the number of user data types, requiring a model update and resetting of the k value, resulting in low classification efficiency for user data. Summary of the Invention
[0005] This disclosure provides a method, device, and storage medium for classifying user data to address the problem of low efficiency in user data classification in the prior art.
[0006] In a first aspect, embodiments of this disclosure provide a method for classifying user data, the method comprising:
[0007] Step 1: Obtain a sample dataset, which contains multidimensional vectors corresponding to the user's features in different dimensions;
[0008] Step 2: Divide the multidimensional vectors in the sample dataset into multiple target clusters for the data classification model, and the multiple target clusters correspond to different types of the user data respectively;
[0009] Step 3: Determine the target optimization parameters corresponding to the multiple target clusters;
[0010] Step 4: Based on the target optimization parameters, remove invalid clusters and similar features between the multiple target clusters;
[0011] Step 5: Repeat steps 3 and 4 to train the data classification model until the difference between the target optimization parameters determined in the current cycle and the target optimization parameters determined in the previous cycle is less than the change threshold.
[0012] Step 6: Use the trained data classification model to determine the type of user data to be queried.
[0013] In one optional implementation, determining the target optimization parameters corresponding to the plurality of target clusters includes:
[0014] The maximum likelihood function of the data classification model under the multiple target clusters is calculated using the expectation-maximization algorithm.
[0015] The parameters in the maximum likelihood function are obtained and used as the target optimization parameters corresponding to the multiple target clusters.
[0016] In one optional implementation, the target optimization parameters include a first parameter and a second parameter, wherein the first parameter is used to characterize the weight coefficient of the sample data belonging to the corresponding target cluster, and the second parameter is used to characterize the similarity between the features in the sample data.
[0017] In an optional implementation, before removing invalid clusters from the plurality of target clusters and similar features between the plurality of target clusters, the method further includes:
[0018] If the first parameter is less than the first threshold, then the target cluster corresponding to the first parameter is determined to be an invalid cluster;
[0019] If the second parameter is greater than the second threshold, then the feature corresponding to the second parameter is determined to be a similar feature among the multiple target clusters;
[0020] Wherein, the first threshold is less than the second threshold.
[0021] In an optional implementation, after dividing the multidimensional vectors in the sample dataset into multiple target clusters for a data classification model, the method further includes:
[0022] Randomly select the initial centroids of the plurality of target clusters;
[0023] When training the data classification model, the initial centroids of the multiple target clusters are used to accelerate the convergence of the data classification model.
[0024] In one optional implementation, after training the data classification model is completed, the method further includes:
[0025] Abnormal samples are identified based on the user's instructions, or sample data corresponding to sample points whose distance to the center of each cluster in the trained data classification model is less than a distance threshold are identified as abnormal samples.
[0026] The total number of the abnormal samples;
[0027] If the number of abnormal samples exceeds the threshold, the data classification model is retrained using the accumulated abnormal samples.
[0028] In one alternative implementation, before retraining the data classification model using accumulated outlier samples, the method further includes:
[0029] The target number of clusters in the data classification model is initialized, where the target number is the number of clusters contained in the trained data classification model.
[0030] Secondly, embodiments of this disclosure provide a user data classification apparatus, comprising:
[0031] The acquisition module is used to acquire a sample dataset, which contains multidimensional vectors corresponding to the user's features of different dimensions.
[0032] The partitioning module is used to divide the multidimensional vectors in the sample dataset into multiple target clusters of the data classification model, wherein the multiple target clusters correspond to different types of the user data.
[0033] The training module is used to iteratively determine the target optimization parameters corresponding to the multiple target clusters, and based on the target optimization parameters, remove invalid clusters and similar features between the multiple target clusters to train the data classification model until the difference between the target optimization parameters determined in the current iteration and the target optimization parameters determined in the previous iteration is less than the change threshold.
[0034] Use the module to determine the type of user data to be queried using the trained data classification model.
[0035] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory;
[0036] The memory stores a computer program adapted to be loaded by the processor and executed as a method for classifying user data, such as the first aspect and its alternatives.
[0037] Fourthly, embodiments of this disclosure provide a computer storage medium storing a plurality of instructions adapted for loading and execution by a processor of a user data classification method as described in any of the first aspects.
[0038] This disclosure provides a method, device, and storage medium for classifying user data. The steps are as follows: Step 1: Obtain a sample dataset; Step 2: Divide the multidimensional vectors in the sample dataset into multiple target clusters for a data classification model, with each target cluster corresponding to a different type of user data; Step 3: Determine the target optimization parameters corresponding to the multiple target clusters; Step 4: Based on the target optimization parameters, remove invalid clusters and similar features between the multiple target clusters; Step 5: Iteratively execute steps 3 and 4 to train the data classification model until the difference between the target optimization parameters determined in the current iteration and those determined in the previous iteration is less than a change threshold; Step 6: Use the trained data classification model to determine the type of user data to be queried. This method automatically optimizes the number of user data types, thereby improving the efficiency of user data classification. Attached Figure Description
[0039] To more clearly illustrate the technical solutions in this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0040] Figure 1 This is a schematic diagram illustrating an application scenario of a user data classification method provided in an embodiment of this application.
[0041] Figure 2 A flowchart illustrating a user data classification method provided in an embodiment of this application;
[0042] Figure 3 This is a schematic diagram of an iterative optimization of a target cluster disclosed in an embodiment of this disclosure;
[0043] Figure 4 A flowchart illustrating another user data classification method provided in an embodiment of this application;
[0044] Figure 5 A flowchart illustrating another user data classification method provided in this application embodiment;
[0045] Figure 6 This is a schematic diagram of the structure of a user data classification device provided in an embodiment of the present disclosure;
[0046] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0048] Clustering algorithms are an unsupervised learning method. Cluster analysis, implemented using clustering algorithms, is the process of grouping data together, aiming to group data that are similar in some sense. After cluster analysis, each group of data has similar selected features, but the features between groups differ significantly.
[0049] In related technologies, the K-means clustering algorithm can be used to perform value analysis on user data. The k-means algorithm divides user data into K clusters, with the centroid of each cluster calculated from the average value of the user data within that cluster. The choice of K is set by the user based on experience, ensuring that points with similar characteristics are clustered together during clustering.
[0050] However, because the setting of the k value in the K-means algorithm is too subjective, an improperly set k value can lead to training failure. Furthermore, when new user data from unknown sources is introduced, the k-means algorithm model cannot automatically update the number of user data types, requiring a model update and resetting of the k value, resulting in low classification efficiency for user data.
[0051] To address the aforementioned issues, this application provides a method for classifying user data. This method divides multidimensional vectors in a sample dataset into multiple target clusters for a data classification model. Based on the target optimization parameters corresponding to these clusters, the model is optimized and trained to generate a trained data classification model. This trained model is then used to determine the type of user data to be queried. This approach automatically optimizes the number of user data types, thereby improving the efficiency of user data classification.
[0052] The following section explains the application scenarios of the user data classification method involved in this application.
[0053] Figure 1 This is a schematic diagram illustrating an application scenario of a user data classification method provided in an embodiment of this application. For example... Figure 1As shown, server 102 can collect sample datasets and use them to train a data classification model, optimize multiple target clusters of the data classification model, and generate a trained data classification model. Subsequently, users can conduct business through methods such as mini-programs on terminal device 101 and send the user data generated from the business transaction to server 102. Server 102 then uses the trained data classification model to classify the user data sent by terminal device 101 and recommends suitable products to the user based on the type of user data.
[0054] The terminal device 101 can be a tablet computer, a computer with wireless transceiver capabilities, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal in industrial control, a wireless terminal in self-driving, a wireless terminal in remote medical surgery, a wireless terminal in a smart grid, a wireless terminal in a smart home, etc. In this embodiment, the device used to implement the terminal's functions can be the terminal itself, or a device capable of supporting the terminal in implementing those functions, such as a chip system, which can be installed in the terminal. In this embodiment, the chip system can consist of chips, or it can include chips and other discrete components.
[0055] Server 102 can be, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of computers or network servers. Among them, cloud computing is a type of distributed computing, which is a super virtual computer composed of a group of loosely coupled computers.
[0056] It should be understood that the application scenarios of the technical solution in this application can be... Figure 1 This can be applied to scenarios such as those described above, but not limited to them; it can also be applied to other scenarios that require the classification of user data.
[0057] It is understood that the above-mentioned user data classification method can be implemented by the user data classification device provided in the embodiments of this application. The user data classification device can be part or all of a device, such as a server or a server chip.
[0058] The following uses a server with integrated or installed relevant executable code as an example to provide a detailed description of the technical solutions of the embodiments of this application. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments.
[0059] Figure 2 This is a flowchart illustrating a user data classification method provided in an embodiment of this application. This embodiment relates to how a server performs user data classification. Figure 2 As shown, the method includes:
[0060] S201. Obtain the sample dataset, which contains multi-dimensional vectors corresponding to the user's features in different dimensions.
[0061] In this disclosure, when the server needs to train a data classification model, it can obtain a sample dataset containing multidimensional vectors corresponding to the user's features of different dimensions.
[0062] It should be understood that the embodiments of this application do not limit the different dimensions of user features included in the sample dataset. For example, taking the financial management business scenario of a WeChat mini-program as an example, the different dimensions of features can include three dimensions: basic user data, product data purchased by the user, and user purchase behavior data.
[0063] The user's basic data may include gender, age, occupation, annual income, education level, etc. The data on the products purchased by the user may include the type of financial products purchased, the rate of return, and the term. The user's purchase behavior data may include the purchase method, purchase amount, purchase frequency, purchase time (morning, noon, evening, weekdays, weekends), and purchase scenario (customer manager recommendation, lobby QR code scanning, friend recommendation, WeChat official account article, self-entry, etc.).
[0064] In some embodiments, after the server obtains the sample dataset, it can also clean the data in the sample dataset to avoid problems such as missing data or unreasonable data, thereby ensuring the classification effect of the data classification model.
[0065] It should be understood that the embodiments of this application do not limit the method of data cleaning. In some embodiments, data cleaning may include missing value processing, data deduplication, and outlier processing.
[0066] For example, Table 1 is the original data table in a sample dataset provided in this disclosure. As shown in Table 1, for user data number 1, since the purchase frequency is missing and purchase frequency is an important dimension of the data classification model, user data number 1 can be directly deleted, and other user data can be extracted from the total data to replace user data number 1. Alternatively, the missing purchase frequency can be replaced by the average value of the data in this dimension.
[0067] For example, as shown in Table 1, since user data numbered 3 and 4 correspond to the same user, and the user's data in user data numbered 3 and 4 are identical except for the amount purchased, the average purchase amount can be used to replace user data numbered 3 and 4.
[0068] For example, for certain data dimensions that may have large differences, such as purchase amount and annual income, the Raida (3σ) criterion can be used to remove outliers. Data that is not in the range of (μ-3σ, μ+3σ) can be filtered out, and the filtered data can be directly deleted or replaced with the average value.
[0069] Table 1
[0070]
[0071] In some embodiments, after data cleaning, the data in the dataset can be transformed into standard data.
[0072] For example, the sklearn library can be used to perform z-score standardization on user data. The user data after z-score standardization has a mean of 0 and a standard deviation of 1. The z-score standardization transformation formula (1) is shown below.
[0073]
[0074] in, Let σ be the mean of the original user data, and σ be the standard deviation of the original user data.
[0075] S202. Divide the multidimensional vectors in the sample dataset into multiple target clusters for the data classification model. Each target cluster corresponds to a different type of user data.
[0076] In this step, after the server obtains the sample dataset, it can divide the multidimensional vectors in the sample dataset into multiple target clusters for the data classification model.
[0077] It should be understood that the embodiments of this application do not limit the number of target clusters in the data classification model, and a larger value, such as 20, can be chosen according to the actual situation. Accordingly, the data classification model divides user data into 20 types before training.
[0078] In some embodiments, after dividing the multidimensional vectors in the sample dataset into multiple target clusters for the data classification model, the server may also randomly select initial centroids for multiple target clusters. These initial centroids can assist in the grouping of target clusters. Subsequently, when training the data classification model, the server can use the initial centroids of the multiple target clusters to accelerate the convergence of the data classification model.
[0079] For example, if the sample set M = {m(1), m(2), ..., m(n)}, each sample data m(i) contains n dimensions of features, such as the user's basic data, the product data purchased by the user, and the user's purchase behavior data. The server can divide the sample set M into 20 clusters and randomly select 20 points {μ1, μ2, ..., μ20} as the initial centroids.
[0080] S203. Determine the target optimization parameters corresponding to multiple target clusters.
[0081] It should be understood that the embodiments of this application do not limit how to optimize and train multiple target clusters based on the target optimization parameters corresponding to multiple target clusters. In some embodiments, the server can use the expectation-maximization algorithm to calculate the maximum likelihood function of the data classification model under multiple target clusters. Subsequently, the parameters in the maximum likelihood function are obtained as the target optimization parameters corresponding to the multiple target clusters.
[0082] It should be understood that the embodiments of this application do not limit the type of target parameters. For example, the target parameters may include a first parameter and a second parameter. The first parameter is used to characterize the weight coefficient of the sample data belonging to the corresponding target cluster, and the second parameter is used to characterize the similarity between features in the sample data.
[0083] For example, the data classification model can be an adaptive K-means clustering (k-means) algorithm model. The maximum likelihood function of the data classification model can be derived using Bayes' theorem, as shown in formula (2):
[0084]
[0085] The Expectation-Maximization (EM) algorithm can be used to determine the target parameter in the likelihood function that maximizes the likelihood.
[0086] Where, θ jl λ is the l-th element of the j-th class. l For the l-th feature, α j ρ is the weight coefficient for a sample belonging to the j-th cluster. l φ is the significance level of the l-th feature. l The l-th feature is meaningful when p(·|θ) is 1, otherwise it is meaningless when p(·|θ) is 0. jl ) is the PDF of the l-th feature in the j-th class, q(·|λ) l ) is the PDF of the distribution followed by the l-th feature.
[0087] S204. Based on the target optimization parameters, remove invalid clusters and similar features between multiple target clusters.
[0088] In the steps, after determining the target optimization parameters corresponding to multiple target clusters, invalid clusters and similar features between multiple target clusters can be removed based on the target optimization parameters.
[0089] This application does not limit how invalid clusters and similar features among multiple target clusters are determined. In some embodiments, before removing invalid clusters and similar features among multiple target clusters, if a first parameter is less than a first threshold, the target cluster corresponding to the first parameter is determined to be an invalid cluster. If a second parameter is close to 1 or close to a second threshold, the feature corresponding to the second parameter is determined to be a similar feature among multiple target clusters. The first threshold is less than the second threshold; the first threshold can be a value close to 0, and the second threshold can be a value close to 1.
[0090] S205. Determine whether the difference between the target optimization parameters determined in the current loop and the target optimization parameters determined in the previous loop is less than the change threshold.
[0091] If yes, proceed to step S206; otherwise, proceed to step S203.
[0092] It should be understood that in this disclosure, the S205 and S205 training data classification models can be executed cyclically until the difference between the target optimization parameters determined in the current cycle and the target optimization parameters determined in the previous cycle is less than the change threshold.
[0093] For example, the EM algorithm is used to infer the model and calculate the target parameter α of the data classification model. j ρ l and θ jl , λ l The mean and variance. When α j When ρ is close to 0, it indicates that the corresponding cluster is an invalid cluster and can be removed. l When the value is close to 1, it indicates that the corresponding feature is similar across clusters, and the l-th feature can be removed. Subsequently, the target parameters are recalculated using the optimized target cluster to maximize the likelihood function. The target cluster is then repeatedly optimized using the target parameters until the target parameter α is reached. j ρ l and θ jl , λ l The previous difference was less than the change threshold.
[0094] For example, Figure 3 This is a schematic diagram illustrating an iterative optimization of a target cluster as disclosed in an embodiment of this disclosure. Figure 3As shown, after one iteration, the original user data in the sample set is divided into 20 clusters in the data classification model; after 50 iterations, it is divided into 12 clusters in the data classification model; after 100 iterations, it is divided into 4 clusters in the data classification model, and the training of the data classification model is completed.
[0095] S206. Use the trained data classification model to determine the type of user data to be queried.
[0096] In this step, once the trained data classification model is generated, it can be used to determine the type of user data to be queried.
[0097] For example, a trained data classification model can be used to adaptively divide the user data of a bank's mini-program into multiple classes, with each class having similar features across three dimensions: basic user data, product data purchased by the user, and user purchase behavior data.
[0098] This disclosure allows users to be divided into different clusters. For example, users with high transaction frequency and large transaction amounts can be categorized as high-value users, while users with low transaction frequency but large transaction amounts can be categorized as potential users. For each cluster, the average value of product characteristics within the cluster is used to obtain the product preference for that user group. Recommending different products to different user groups, while simultaneously identifying potential customers, helps to convert users of the bank's mini-program into paying customers.
[0099] This disclosure provides a user data classification method. First, a sample dataset is obtained, containing multi-dimensional vectors corresponding to different dimensions of user features. Second, the multi-dimensional vectors in the sample dataset are divided into multiple target clusters for a data classification model. Third, based on the target optimization parameters corresponding to the multiple target clusters, the multiple target clusters are optimized and trained to generate a trained data classification model. Finally, the trained data classification model is used to determine the type of user data to be queried. This method automatically optimizes the number of user data types, thereby improving the efficiency of user data classification. It also accelerates the training speed of the data classification model.
[0100] Based on the above embodiments, the training process of the data classification model will be described in detail below. Figure 4 A flowchart illustrating another user data classification method provided in this application embodiment is shown below. Figure 4 As shown, the method includes:
[0101] S301. Obtain the sample dataset, which contains multi-dimensional vectors corresponding to the user's features in different dimensions.
[0102] S302. Divide the multidimensional vectors in the sample dataset into multiple target clusters for the data classification model. Each target cluster corresponds to a different type of user data.
[0103] S303. Randomly select the initial centroids of multiple target clusters.
[0104] S304. Use the expectation-maximization algorithm to calculate the maximum likelihood function of the data classification model under multiple target clusters.
[0105] S305. Obtain the parameters in the maximum likelihood function and use them as the target optimization parameters for multiple target clusters.
[0106] S306. Based on the target optimization parameters, remove invalid clusters from multiple target clusters and similar features between multiple target clusters.
[0107] S307. Determine whether the difference between the target optimization parameters determined this time and the target optimization parameters determined previously is less than the change threshold.
[0108] If yes, proceed to step S308; otherwise, proceed to step S304.
[0109] S308. Use the trained data classification model to determine the type of user data to be queried.
[0110] After a data classification model has been piloted in a production environment for a period of time, outliers that significantly deviate from the model's classification results and conversion rates can be extracted as anomalous samples to expand the sample set. These significantly different anomalous samples can then be used to deepen the learning of the data classification model, thereby improving its performance. Specifically, data where the actual data does not match the existing classification results—for example, a customer's n-dimensional feature vector where some features align with potential users and others with ordinary customers—is difficult to cover using the existing classification.
[0111] Figure 5 This is a flowchart illustrating another user data classification method provided in this application embodiment. This embodiment relates to the process of retraining a data classification model using outlier samples. Figure 5 As shown, the method includes:
[0112] S401, Abnormal samples in the cumulative data classification model.
[0113] Among them, abnormal samples are determined by user indication or by the distance between the sample points corresponding to user data and each cluster in the trained data classification model.
[0114] For example, after actual analysis, users can classify data that does not conform to actual experience into abnormal samples and send instruction information to the server.
[0115] For example, the distance from the sample point corresponding to the user data to each cluster center can be calculated. When the minimum distance exceeds the distance threshold, the sample point can be defined as an abnormal sample.
[0116] S402. If the number of abnormal samples exceeds the threshold, the target number of clusters in the data classification model will be initialized. The target number is the number of clusters contained in the trained data classification model.
[0117] S403. Retrain the data classification model using the accumulated outlier samples.
[0118] In this disclosure, after the server completes the training of the data classification model, it can continuously accumulate abnormal samples and set a threshold for the number of abnormal samples. When the accumulation of abnormal samples that are not covered by the existing classification or do not conform to the existing classification exceeds the threshold, the retraining of the data classification model is triggered.
[0119] In some embodiments, the server can initialize an equal number of clusters from the pre-trained clusters of the original model, while randomly initializing the remaining clusters. Then, training begins from k=20, and the target parameter α of the data classification model is calculated. j ρ l and θ jl , λ l The mean and variance of the target parameters are used for model iteration. The retraining process is complete when the change in the target parameter is less than a threshold value.
[0120] In this way, outlier samples with significant differences act like a "mistake notebook," correcting and optimizing the data classification model. The algorithm is trained using a sample set and adaptively selects the most appropriate K value. When new data is added, the data classification model is retrained; if new categories exist in the new dataset, the model will assign them to new clusters.
[0121] Furthermore, analyzing these discrepancies in the abnormal samples can help identify any previously unconsidered useful features, thereby enriching user characteristics and establishing a more comprehensive feature system.
[0122] The user data classification method provided in this application's embodiments initially used a trained adaptive K-means model with a small number of filtered missing values. This led to biases in the model's judgment of users from unknown sources, resulting in incorrect user classification. However, due to the high scalability of the adaptive K-means model, it can be adapted to new users from unknown sources and correctly classified simply by updating the dataset size and retraining.
[0123] Specifically, during the model deployment process, user information from unknown channels can be collected and accumulated, and the model can be iteratively updated within a set time interval. This time interval should not be too long or too short. A time interval that is too short will result in insufficient collection of new data, affecting the training effect; while a time interval that is too long will lead to too many users from unknown sources being misclassified, affecting the normal operation of the business and losing a large number of valuable users. In the later stages of data accumulation, the dataset used for model training is relatively complete, and the model can be finalized without further updates. If new user features can be obtained later, the model will inevitably need to be retrained. At this time, the trained adaptive K-means model can be used as the initialization model for the new model, accelerating the training speed and improving the accuracy, greatly reducing the cost of training the model. Because machine learning models have high scalability and algorithms have good usability, the solution can also be extended to business scenarios such as bank loans and bills, providing an effective reference for quickly developing solutions for these scenarios.
[0124] This invention applies adaptive K-means clustering analysis to the emerging sales scenario of bank mini-programs to achieve user segmentation and user value analysis. The adaptive K-means algorithm has low requirements for computer performance and is suitable for clustering large datasets. Furthermore, grouping bank mini-program customers helps banks understand user needs and conduct targeted marketing, thereby enhancing their competitiveness; on the other hand, users can quickly select suitable financial products based on recommendations, improving purchase convenience and efficiency. Grouping bank users through adaptive K-means clustering analysis also solves the problem of mini-programs having difficulty tracing the initial lead channels, filling in missing channel information for users with unknown sources, and facilitating data integration and analysis.
[0125] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media that can store program code, such as ROM, RAM, magnetic disk, or optical disk.
[0126] Figure 6 This is a schematic diagram of a user data classification device provided in an embodiment of this disclosure. This user data classification device can be implemented through software, hardware, or a combination of both to perform the methods described in the embodiments. Figure 6 As shown, the user data classification device 500 includes: an acquisition module 501, a division module 502, a training module 503, and a usage module 504.
[0127] The acquisition module 501 is used to acquire a sample dataset, which contains multi-dimensional vectors corresponding to the user's features of different dimensions.
[0128] The partitioning module 502 is used to partition the multidimensional vectors in the sample dataset into multiple target clusters of the data classification model, and the multiple target clusters correspond to different types of user data respectively;
[0129] Training module 503 is used to iteratively determine the target optimization parameters corresponding to multiple target clusters, and based on the target optimization parameters, remove invalid clusters and similar features between multiple target clusters to train the data classification model until the difference between the target optimization parameters determined in the current iteration and the target optimization parameters determined in the previous iteration is less than the change threshold.
[0130] Use module 504 to determine the type of user data to be queried using the trained data classification model.
[0131] The user data classification device provided in this embodiment can perform the user data classification method described above. Its implementation principle and technical effect are similar, and will not be repeated here.
[0132] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Figure 7 As shown, the electronic device may include at least one processor 601 and a memory 602. Figure 7 The example shown is an electronic device using a processor.
[0133] The memory 602 is used to store programs. Specifically, the program may include program code, which includes computer operation instructions.
[0134] The memory 602 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0135] The processor 601 is used to execute computer execution instructions stored in the memory 602 to implement the above-mentioned method for determining the user's type information;
[0136] The processor 601 may be a central processing unit (CPU), an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this disclosure.
[0137] Optionally, in specific implementations, if the communication interface, memory 602, and processor 601 are implemented independently, they can be interconnected via a bus to complete communication. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc., but this does not imply that there is only one bus or one type of bus.
[0138] Optionally, in a specific implementation, if the communication interface, memory 602, and processor 601 are integrated on a single chip, then the communication interface, memory 602, and processor 601 can communicate through an internal interface.
[0139] This disclosure also provides a chip, including a processor and an interface. The interface is used for inputting and outputting data or instructions processed by the processor. The processor is used to execute the methods provided in the above method embodiments.
[0140] This disclosure also provides a computer-readable storage medium, which may include various media capable of storing program code, such as a USB flash drive, a portable hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk. Specifically, the computer-readable storage medium stores program information, which is used in the aforementioned user data classification method.
[0141] This disclosure also provides a program that, when executed by a processor, performs the user data classification method provided in the above method embodiments.
[0142] This disclosure also provides a program product, such as a computer-readable storage medium, which stores instructions that, when run on a computer, cause the computer to execute the user data classification method provided in the above-described method embodiments.
[0143] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product. A computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the flow or function according to the embodiments of this disclosure is generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., a solid-state disk (SSD)).
[0144] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit them. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this disclosure.
Claims
1. A method for classifying user data, characterized in that, The method includes: Step 1: Obtain a sample dataset, which contains multidimensional vectors corresponding to the user's features in different dimensions; Step 2: Divide the multidimensional vectors in the sample dataset into multiple target clusters for the data classification model, and the multiple target clusters correspond to different types of the user data respectively; Step 3: Determine the target optimization parameters corresponding to the multiple target clusters; Step 4: Based on the target optimization parameters, remove invalid clusters and similar features between the multiple target clusters; Step 5: Repeat steps 3 and 4 to train the data classification model until the difference between the target optimization parameters determined in the current cycle and the target optimization parameters determined in the previous cycle is less than the change threshold. Step 6: Use the trained data classification model to determine the type of user data to be queried; determining the target optimization parameters corresponding to the multiple target clusters includes: The maximum likelihood function of the data classification model under the multiple target clusters is calculated using the expectation-maximization algorithm. Obtain the parameters in the maximized likelihood function as the target optimization parameters corresponding to the plurality of target clusters; the target optimization parameters include a first parameter and a second parameter, the first parameter being used to characterize the weight coefficient of the sample data belonging to the corresponding target cluster, and the second parameter being used to characterize the similarity between features in the sample data; before removing invalid clusters from the plurality of target clusters and similar features between the plurality of target clusters, the method further includes: If the first parameter is less than the first threshold, then the target cluster corresponding to the first parameter is determined to be an invalid cluster; If the second parameter is greater than the second threshold, then the feature corresponding to the second parameter is determined to be a similar feature among the multiple target clusters; Wherein, the first threshold is less than the second threshold.
2. The method according to claim 1, characterized in that, After determining the type of user data to be queried using the trained data classification model, the method further includes: Abnormal samples are determined based on the user's instructions, or the sample data corresponding to sample points whose distance from the center of each cluster in the trained data classification model is less than a distance threshold is determined as the abnormal samples. The total number of the abnormal samples; If the number of abnormal samples exceeds the threshold, the data classification model is retrained using the accumulated abnormal samples.
3. The method according to claim 2, characterized in that, Before retraining the data classification model using accumulated outlier samples, the method further includes: The target number of clusters in the data classification model is initialized, where the target number is the number of clusters contained in the trained data classification model.
4. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and executed as described in any one of claims 1-3.
5. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the steps of the method as described in any one of claims 1-3.