Clustering methods, devices and electronic equipment for customer information

By calculating the density and cosine distance of customer data to determine the centroid, the inaccuracy of clustering caused by random selection of centroids in the traditional K-Means algorithm is solved, thus improving the clustering quality and speed of customer information.

CN116680591BActive Publication Date: 2026-03-13INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-01
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

The traditional K-Means clustering algorithm suffers from inaccurate clustering results for customer information due to its random selection of centroids.

Method used

By calculating the density of each customer data information in the customer data information set, the first centroid and the second centroid are obtained, and K centroids are determined according to the cosine distance to perform customer information clustering.

Benefits of technology

This improves the convergence speed and clustering quality of the K-Means algorithm, ensuring more accurate clustering results for customer information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116680591B_ABST
    Figure CN116680591B_ABST
Patent Text Reader

Abstract

This application discloses a clustering method, apparatus, and electronic device for customer information. The method, applied in the field of big data technology, includes: calculating the density of each customer data piece in a customer data information set; obtaining a first centroid and a second centroid in the customer data information set based on the density of each customer data piece; determining K centroids based on the cosine distances between the customer data pieces and the first centroid and the second centroid; and clustering the customer data pieces in the customer data information set based on the K centroids to obtain a clustering result. This application solves the problem in related technologies where, when using the traditional K-Means clustering algorithm to cluster customer information, the randomly selected centroids are too close together or too scattered, leading to inaccurate clustering results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of big data technology, and more specifically, to a method, apparatus, and electronic device for clustering customer information. Background Technology

[0002] Currently, when recommending financial products to clients, financial institution staff often rely on products that are currently popular or offer high returns. However, since different clients have different investment preferences, recommending the same popular or high-yield products to every client fails to consider their actual purchasing needs, resulting in unsuitable financial products and a poor customer experience. This hinders the establishment of a good and sustainable cooperative relationship between the financial institution and its clients. Existing technology can use the K-Means clustering algorithm to classify clients and provide customized financial products. However, the traditional K-Means clustering algorithm initializes the clustering algorithm by randomly selecting initial centroids. This random selection can result in initial centroids that are either too scattered or too concentrated, leading to uneven distribution, slow convergence, and poor clustering results, ultimately resulting in inaccurate client classification.

[0003] There is currently no effective solution to the problem that when using the traditional K-Means clustering algorithm to cluster customer information, the centroids obtained by random selection are too close or too far apart, resulting in inaccurate clustering results. Summary of the Invention

[0004] The main objective of this application is to provide a method, apparatus, and electronic device for clustering customer information, in order to solve the problem in the related art where the centroids obtained by random selection are too close or too far apart when using the traditional K-Means clustering algorithm to cluster customer information, resulting in inaccurate clustering results.

[0005] To achieve the above objectives, according to one aspect of this application, a clustering method for customer information is provided. The method includes: calculating the density of each customer data information in a customer data information set, wherein the customer data information set includes customer data information collected from financial institutions within a preset time period, and the density represents the density of other customer data information distributed around each customer data information; obtaining a first centroid and a second centroid in the customer data information set based on the density of each customer data information; determining K centroids based on the cosine distance between the customer data information in the customer data information set and the first centroid, and the cosine distance between the customer data information in the customer data information set and the second centroid; and clustering the customer data information in the customer data information set based on the K centroids to obtain a clustering result.

[0006] Further, calculating the density of each customer data information in the customer data information set includes: obtaining customer transaction information from a preset database to obtain a customer data information set, wherein the customer data information set includes N customer data information, where N is a positive integer; calculating the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods; and calculating the number of times each customer data information appears in the second-order neighborhoods of other customer data information in the N second-order neighborhoods to obtain the density of each customer data information.

[0007] Further, calculating the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods includes: Step S31, determining customer data information in the customer data information set whose cosine distance to the first customer data information is less than a first preset threshold, to obtain the first-order neighborhood of the first customer data information, wherein the first customer data information is any customer data information in the customer data information set, and the first-order neighborhood of the first customer data information contains L customer data information, where L is a positive integer; Step S32, in the first-order neighborhood of the first customer data information, determining customer data information whose cosine distance to each customer data information in the first-order neighborhood is less than the first preset threshold, to obtain L candidate second-order neighborhoods of the first customer data information; Step S33, determining the common intersection of the L candidate second-order neighborhoods of the first customer data information, to obtain the second-order neighborhood of the first customer data information; Repeating steps S31 to S33 to determine the second-order neighborhoods of customer data information other than the first customer data information in the customer data information set, to obtain N second-order neighborhoods.

[0008] Further, obtaining the first centroid and the second centroid in the customer data information set based on the density of each customer data information includes: obtaining the customer data information with the highest density based on the density of each customer data information in the customer data information set, thus obtaining the first centroid; obtaining the customer data information in the customer data information set with the largest cosine distance from the first centroid, thus obtaining the second customer data information; obtaining the customer data information in the customer data information set with a cosine distance from the second customer data information that is less than a second preset threshold, thus obtaining a second centroid candidate set; and determining the customer data information with the highest density in the second centroid candidate set, thus obtaining the second centroid.

[0009] Further, determining K centroids based on the cosine distance between the customer data information in the customer data information set and the first centroid, and the cosine distance between the customer data information in the customer data information set and the second centroid includes: adding the first centroid and the second centroid to a centroid set, wherein the centroid set includes M centroids, where M is a positive integer; step S51, obtaining M clusters based on the cosine distance between each customer data information in the customer data information set and the M centroids; step S52, determining the cluster with the largest amount of customer data information among the M clusters to obtain the target cluster; step S53, obtaining the (M+1)th centroid candidate set based on the distance product between each customer data information in the target cluster and the M centroids; step S54, determining the customer data information with the highest density in the (M+1)th centroid candidate set to obtain the (M+1)th centroid, and adding the (M+1)th centroid to the centroid set, and repeating steps S51 to S54 until the number of centroids in the centroid set is equal to K, thus obtaining the K centroids.

[0010] Further, obtaining M clusters based on the cosine distance between each customer data information in the customer data information set and the M centroids includes: calculating the cosine distance between each customer data information in the customer data information set and the M centroids to obtain a set of cosine distances corresponding to each customer data information; determining the centroid corresponding to the minimum cosine distance in the set of cosine distances corresponding to each customer data information to obtain the target centroid corresponding to each customer data information; and assigning each customer data information and its corresponding target centroid to the same cluster to obtain the M clusters.

[0011] Further, obtaining the (M+1)th centroid candidate set based on the distance product between each customer data information in the target cluster and the M centroids includes: calculating the cosine distance between each customer data information in the target cluster and the M centroids to obtain M distances corresponding to each customer data information, wherein the target cluster includes L customer data information; calculating the product of the M distances corresponding to each customer data information in the target cluster to obtain the distance product corresponding to the L customer data information; determining the customer data information with the largest distance product among the distance products corresponding to the L customer data information as the (M+1)th centroid neighbor; and forming the (M+1)th centroid candidate set by selecting customer data information in the target cluster whose cosine distance to the (M+1)th centroid neighbor is less than a third preset threshold.

[0012] Furthermore, after clustering the customer data information in the customer data information set according to the K centroids to obtain the clustering results, the method further includes: determining the promotion strategy corresponding to each type of customer, wherein the promotion strategy is used to promote financial products to each type of customer; and promoting financial products to each type of customer according to the promotion strategy corresponding to each type of customer.

[0013] To achieve the above objectives, according to another aspect of this application, a clustering apparatus for customer information is provided. The apparatus includes: a calculation unit for calculating the density of each customer data information in a customer data information set, wherein the customer data information set includes customer data information collected from financial institutions within a preset time period, and the density represents the density of other customer data information distributed around each customer data information; an acquisition unit for acquiring a first centroid and a second centroid in the customer data information set based on the density of each customer data information; a first determination unit for determining K centroids based on the cosine distance between the customer data information in the customer data information set and the first centroid, and the cosine distance between the customer data information in the customer data information set and the second centroid; and a clustering unit for clustering the customer data information in the customer data information set based on the K centroids to obtain a clustering result.

[0014] Further, the calculation unit includes: a first acquisition subunit, used to acquire customer transaction information from a preset database to obtain a customer data information set, wherein the customer data information set includes N customer data information, where N is a positive integer; a first calculation subunit, used to calculate the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods; and a second calculation subunit, used to calculate the number of times each customer data information appears in the second-order neighborhoods of other customer data information in the N second-order neighborhoods to obtain the density of each customer data information.

[0015] Further, the first calculation subunit includes: a first determining module, configured to determine customer data information in the customer data information set whose cosine distance to the first customer data information is less than a first preset threshold, thereby obtaining a first-order neighborhood of the first customer data information, wherein the first customer data information is any customer data information in the customer data information set, and the first-order neighborhood of the first customer data information contains L customer data information, where L is a positive integer; a second determining module, configured to determine, in the first-order neighborhood of the first customer data information, customer data information whose cosine distance to each customer data information in the first-order neighborhood is less than the first preset threshold, thereby obtaining L candidate second-order neighborhoods of the first customer data information; a third determining module, configured to determine the common intersection of the L candidate second-order neighborhoods of the first customer data information, thereby obtaining a second-order neighborhood of the first customer data information; and a fourth determining module, configured to repeatedly execute the steps executed by the first determining module to the third determining module to determine the second-order neighborhoods of customer data information in the customer data information set other than the first customer data information, thereby obtaining N second-order neighborhoods.

[0016] Further, the acquisition unit includes: a second acquisition subunit, configured to acquire the customer data information with the highest density based on the density of each customer data information in the customer data information set, thereby obtaining the first centroid; a third acquisition subunit, configured to acquire the customer data information in the customer data information set with the largest cosine distance from the first centroid, thereby obtaining the second customer data information; a fourth acquisition subunit, configured to acquire the customer data information in the customer data information set with the cosine distance from the second customer data information less than a second preset threshold, thereby obtaining a second centroid candidate set; and a first determination subunit, configured to determine the customer data information with the highest density in the second centroid candidate set, thereby obtaining the second centroid.

[0017] Further, the first determining unit includes: an adding subunit, used to add the first centroid and the second centroid to a centroid set, wherein the centroid set includes M centroids, where M is a positive integer; a fifth obtaining subunit, used to obtain M clusters based on the cosine distance between each customer data information in the customer data information set and the M centroids; a second determining subunit, used to determine the cluster with the largest amount of customer data information among the M clusters, and obtain a target cluster; a sixth obtaining subunit, used to obtain a (M+1)th centroid candidate set based on the distance product between each customer data information in the target cluster and the M centroids; a third determining subunit, used to determine the customer data information with the highest density in the (M+1)th centroid candidate set, obtain the (M+1)th centroid, and add the (M+1)th centroid to the centroid set, and cyclically execute the steps executed by the fifth obtaining subunit to the third determining subunit until the number of centroids in the centroid set is equal to K, thereby obtaining the K centroids.

[0018] Further, the fifth acquisition subunit includes: a first calculation module, used to calculate the cosine distance between each customer data information in the customer data information set and the M centroids, to obtain a cosine distance set corresponding to each customer data information; a fifth determination module, used to determine the centroid corresponding to the minimum cosine distance in the cosine distance set corresponding to each customer data information, to obtain the target centroid corresponding to each customer data information; and a classification module, used to classify each customer data information and the target centroid corresponding to each customer data information into the same cluster, to obtain the M clusters.

[0019] Further, the sixth acquisition subunit includes: a second calculation module, used to calculate the cosine distance between each customer data information in the target cluster and the M centroids, to obtain M distances corresponding to each customer data information, wherein the target cluster includes L customer data information; a third calculation module, used to calculate the product of the M distances corresponding to each customer data information in the target cluster, to obtain the distance product corresponding to the L customer data information; a sixth determination module, used to determine the customer data information with the largest distance product among the distance products corresponding to the L customer data information as the (M+1)th centroid neighbor point; and a seventh determination module, used to form the (M+1)th centroid candidate set of customer data information in the target cluster whose cosine distance to the (M+1)th centroid neighbor point is less than a third preset threshold.

[0020] Furthermore, the apparatus further includes: a second determining unit, configured to determine a promotion strategy corresponding to each customer type after clustering the customer data information in the customer data information set according to the K centroids and obtaining the clustering results, wherein the promotion strategy is used to promote financial products to each customer type; and a processing unit, configured to promote financial products to each customer type according to the promotion strategy corresponding to each customer type.

[0021] To achieve the above objectives, according to one aspect of this application, an electronic device is provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the clustering method for customer information described in any of the above claims.

[0022] This application employs the following steps: calculating the density of each customer data information in a customer data information set, wherein the customer data information set includes customer data information collected from financial institutions within a preset time period, and the density represents the density of other customer data information distributed around each customer data information; obtaining a first centroid and a second centroid in the customer data information set based on the density of each customer data information; determining K centroids based on the cosine distance between the customer data information in the customer data information set and the first centroid and the cosine distance between the customer data information in the customer data information set and the second centroid; and clustering the customer data information in the customer data information set based on the K centroids to obtain clustering results. This solves the problem in related technologies where, when using the traditional K-Means clustering algorithm to cluster customer information, the centroids obtained by random selection are too close or scattered, leading to inaccurate clustering results for customer information. In this scheme, by calculating the density of each customer data information in the customer data information set, and determining K centroids that are relatively dispersed and have a high density based on the cosine distance between the first centroid, the second centroid and each customer data information in the customer data information set, this scheme avoids the problem of the traditional K-Means algorithm randomly selecting discrete noisy data as the K centroids for clustering, which leads to poor clustering results. This improves the convergence speed and clustering quality of the K-Means algorithm, and further improves the quality of the clustering results of customer information. Attached Figure Description

[0023] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:

[0024] Figure 1 This is a flowchart of a clustering method for customer information provided in Embodiment 1 of this application;

[0025] Figure 2 This is a schematic diagram of an optional customer information clustering method provided according to Embodiment 1 of this application;

[0026] Figure 3 This is a schematic diagram of a clustering device for customer information according to Embodiment 2 of this application;

[0027] Figure 4 This is a schematic diagram of an electronic device provided according to Embodiment 5 of this application. Detailed Implementation

[0028] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.

[0029] It should be noted that the user information (including but not limited to user device information, user personal information, user data information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, calculated data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.

[0030] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0032] Example 1

[0033] The present invention will now be described in conjunction with preferred implementation steps. Figure 1 This is a flowchart of a clustering method for customer information based on Embodiment 1 of this application, as shown below. Figure 1 As shown, the method includes the following steps:

[0034] Step S101: Calculate the density of each customer data information in the customer data information set. The customer data information set includes customer data information collected from financial institutions within a preset time period. Density represents the density of other customer data information distributed around each customer data information.

[0035] In this first embodiment, the customer data information set represents the collection of transaction data information of different customers at financial institutions, such as the quantity, amount, and purchase time of financial products purchased by customers at financial institutions. The preset time period can be 6 months, 3 years, 5 years, etc.

[0036] Density represents the degree to which other customer data is distributed around each customer data entry. Customer data being distributed around another customer data entry indicates a small cosine distance between the two entries. If the cosine distance between a customer data entry and another customer data entry is less than a distance threshold (e.g., 0.5), then it can be determined that the customer data entry is distributed around the other customer data entry. For example, if the distance between customer data entry x and customer data entry y is 0.2, the distance between customer data entry x and customer data entry z is 0.8, and the distance between customer data entry A and customer data entry w is 0.1, then it can be determined that customer data entry x is surrounded by customer data entry y and customer data entry w. It should be noted that the more customer data entries are distributed around a given customer data entry, the higher the density of that customer data entry.

[0037] Step S102: Obtain the first centroid and the second centroid in the customer data information set based on the density of each customer data information.

[0038] In this first embodiment, to obtain K centroids with better clustering quality, a first centroid and a second centroid with higher density can be obtained from the customer data information set, and then K centroids can be obtained based on the first centroid and the second centroid. In an optional embodiment, the customer data information with the highest density is used as the first centroid and the second centroid.

[0039] Step S103: Determine K centroids based on the cosine distance between the customer data information in the customer data information set and the first centroid, and the cosine distance between the customer data information in the customer data information set and the second centroid.

[0040] In this first embodiment, in order to obtain K centroids with better clustering quality, a third centroid is determined based on the cosine distance between the first centroid and other customer data information in the customer data information set, and the cosine distance between the second centroid and other customer data information in the customer data information set. Then, the subsequent K centroids are determined based on the first centroid, the second centroid, and the third centroid.

[0041] Step S104: Cluster the customer data information in the customer data information set according to K centroids to obtain the clustering results.

[0042] In this first embodiment, in order to obtain the clustering results of customer data information, the customer data information is clustered according to the K centroids obtained in step S103, so as to divide the multiple customers corresponding to the customer data information set into K types of customers.

[0043] In summary, the customer information clustering method provided in Embodiment 1 of this application calculates the density of each customer data information in a customer data information set, wherein the customer data information set includes customer data information collected from financial institutions within a preset time period, and density represents the density of other customer data information distributed around each customer data information; based on the density of each customer data information, a first centroid and a second centroid are obtained in the customer data information set; based on the cosine distance between the customer data information in the customer data information set and the first centroid and the cosine distance between the customer data information in the customer data information set and the second centroid, K centroids are determined; based on the K centroids, the customer data information in the customer data information set is clustered to obtain the clustering result. This solves the problem in related technologies where, when using the traditional K-Means clustering algorithm to cluster customer information, the centroids obtained by random selection are too close or scattered, leading to inaccurate clustering results for customer information. In this scheme, by calculating the density of each customer data point in the customer data set, and determining K relatively dispersed and dense centroids based on the cosine distances between the first and second centroids and each customer data point in the customer data set, this scheme avoids the problem of the traditional K-Means algorithm randomly selecting discrete noisy data as the K centroids for clustering, which leads to poor clustering results. This improves the convergence speed and clustering quality of the K-Means algorithm, further enhancing the quality of customer data clustering results.

[0044] Optionally, in the customer information clustering method provided in Embodiment 1 of this application, calculating the density of each customer data information in the customer data information set includes: obtaining customer transaction information from a preset database to obtain a customer data information set, wherein the customer data information set includes N customer data information, where N is a positive integer; calculating the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods; and calculating the number of times each customer data information appears in the second-order neighborhoods of other customer data information in the N second-order neighborhoods to obtain the density of each customer data information.

[0045] In this first embodiment, to obtain the first and second centroids with higher density, it is first necessary to retrieve customer transaction information from the database (i.e., the preset database) where the financial institution stores customer transaction data, resulting in a customer data set containing N customer data entries. Then, the second-order neighborhood of each customer data entry in the customer data set is calculated, resulting in N second-order neighborhoods. It should be noted that a second-order neighborhood represents the customer data entries distributed around a given customer data entry, i.e., customer data entries that are relatively close to that customer data entry. Finally, the number of times a given customer data entry appears in the second-order neighborhoods of other customer data entries within the N second-order neighborhoods is calculated.

[0046] In an optional embodiment, let Dataset (i.e., the customer data information set mentioned above) = {customer data information x, customer data information y, customer data information z}, the second-order neighborhood of customer data information y is {customer data information x, customer data information z}, and the second-order neighborhood of customer data information z is {customer data information x}. Then the density corresponding to customer data information x is 2 (i.e., customer data information x is referenced by the second-order neighborhood of customer data information y and the second-order neighborhood of customer data information z).

[0047] Before calculating the density of each customer's data in the customer data set, it is necessary to preprocess the transaction data of each customer, transforming it into word vectors. Specifically, the transaction data of customers within the past 6 months is segmented and stop word removed. The preprocessed transaction data is then input into a word2vec model for further processing to obtain the corresponding word vectors. The customer data set is composed of the word vectors corresponding to the customer's transaction data.

[0048] By calculating the number of times each customer data point in the customer data set is referenced by the second-order neighborhood of other customer data points, the density of that customer data point is obtained. This is beneficial for obtaining the first and second centroids for clustering based on the density of the customer data points, thus achieving the effect of screening out high-quality initial centroids and improving the quality of the clustering results of the K-Means algorithm.

[0049] Optionally, in the customer information clustering method provided in Embodiment 1 of this application, calculating the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods includes: Step S31, determining customer data information in the customer data information set whose cosine distance to the first customer data information is less than a first preset threshold, and obtaining the first-order neighborhood of the first customer data information, wherein the first customer data information is any customer data information in the customer data information set, and the first-order neighborhood of the first customer data information contains L customer data information, where L is a positive integer; Step S32, determining customer data information in the first-order neighborhood of the first customer data information whose cosine distance to each customer data information in the first-order neighborhood is less than the first preset threshold, and obtaining L candidate second-order neighborhoods of the first customer data information; Step S33, determining the common intersection of the L candidate second-order neighborhoods of the first customer data information, and obtaining the second-order neighborhood of the first customer data information; Repeating steps S31 to S33 to determine the second-order neighborhoods of customer data information other than the first customer data information in the customer data information set, and obtaining N second-order neighborhoods.

[0050] Specifically, the first step is to calculate the customer data information set whose cosine distance to a certain customer data information (i.e., the first customer data information) is less than a first preset threshold (e.g., 0.9), thus obtaining the first-order neighborhood of the first customer data information. The first-order neighborhood of the first customer data information includes L customer data information pieces. For example, customer data information y and customer data information z whose cosine distance to customer data information x is less than 0.9 are both customer data information x. Therefore, the first-order neighborhood of customer data information x is {customer data information y, customer data information z}.

[0051] Next, the first-order neighborhood of each customer data information in the first-order neighborhood of the first customer data information is calculated to obtain L candidate second-order neighborhoods of the first customer data information. For example, if the first-order neighborhood of customer data information x is {customer data information y, customer data information z}, then the customer data information with a cosine distance less than 0.9 from customer data information y includes customer data information w and customer data information z, and the customer data information with a cosine distance less than 0.9 from customer data information z includes customer data information w. The two candidate second-order neighborhoods of the corresponding customer data information x are {customer data information w, customer data information z} and {customer data information w}, respectively.

[0052] Then, the intersection of the L candidate second-order neighborhoods of the first customer data information is determined to obtain the second-order neighborhood of the first customer data information. For example, if the two candidate second-order neighborhoods of customer data information x are {customer data information w, customer data information z} and {customer data information w}, then the second-order neighborhood of customer data information x is {customer data information w}.

[0053] Finally, based on the calculation process of the second-order neighborhood of the first customer data information, the second-order neighborhood of each customer data information in the customer data information set is determined, resulting in N second-order neighborhoods.

[0054] By calculating the first-order neighborhood of a customer data point in the customer data set, and calculating the first-order neighborhood of each customer data point within the first-order neighborhood, the second-order neighborhood of that customer data point can be obtained. This allows us to determine the density of customer data points distributed around each customer data point, which is beneficial for obtaining a higher-quality initial centroid.

[0055] Optionally, in the customer information clustering method provided in Embodiment 1 of this application, obtaining the first centroid and the second centroid in the customer data information set based on the density of each customer data information includes: obtaining the customer data information with the highest density based on the density of each customer data information in the customer data information set, and obtaining the first centroid; obtaining the customer data information in the customer data information set with the largest cosine distance from the first centroid, and obtaining the second customer data information; obtaining the customer data information in the customer data information set with the cosine distance from the second customer data information less than a second preset threshold, and obtaining the second centroid candidate set; determining the customer data information with the highest density in the second centroid candidate set, and obtaining the second centroid.

[0056] Specifically, the customer data information x with the highest density in the customer data information set is obtained, and customer data information x is taken as the first centroid. Next, customer data information y with the largest cosine distance from customer data information x is obtained, and customer data information y is taken as the second customer data information. Then, customer data information with a cosine distance less than a second preset threshold from the customer data information set is obtained, resulting in a second centroid candidate set. Finally, customer data information z with the highest density in the second centroid candidate set is determined, and customer data information z is taken as the second centroid. The first preset threshold can be equal to, greater than, or less than the second preset threshold.

[0057] By selecting customer data with higher density from the customer data set, we obtained a first centroid and a second centroid that are far apart and have higher density. This avoids the situation where customer data that is scattered and noisy (i.e., customer data that is far away from other customer data) is randomly selected as the centroid. This is beneficial for using the first centroid and the second centroid to perform clustering and obtain higher quality clustering results.

[0058] Optionally, in the customer information clustering method provided in Embodiment 1 of this application, determining K centroids based on the cosine distance between customer data information in the customer data information set and the first centroid and the cosine distance between customer data information in the customer data information set and the second centroid includes: adding the first centroid and the second centroid to the centroid set, wherein the centroid set includes M centroids, where M is a positive integer; step S51, obtaining M clusters based on the cosine distance between each customer data information in the customer data information set and the M centroids; step S52, determining the cluster with the largest amount of customer data information among the M clusters to obtain the target cluster; step S53, obtaining the (M+1)th centroid candidate set based on the distance product between each customer data information in the target cluster and the M centroids; step S54, determining the customer data information with the highest density in the (M+1)th centroid candidate set to obtain the (M+1)th centroid, and adding the (M+1)th centroid to the centroid set, and repeating steps S51 to S54 until the number of centroids in the centroid set is equal to K, thus obtaining K centroids.

[0059] Specifically, the first and second centroids are added to the centroid set, at which point the number of centroids M in the centroid set equals 2. Next, based on the proximity principle, the customer data in the customer data set is divided into M clusters: customer data closer to the first centroid C1 is assigned to cluster C1_set, and customer data closer to the second centroid C2 is assigned to cluster C2_set. Then, among the M clusters C1_set and C2_set, the cluster C2_set containing the second centroid contains the most customer data and is selected as the target cluster. Next, the distance product between each customer data item in cluster C2_set and the current centroid in the centroid set is calculated, resulting in a distance product set. The next centroid candidate set, list_Cn3, is determined based on this distance product set. Finally, the customer data item with the highest density is found from the centroid candidate set list_Cn3, resulting in the third centroid C3, which is added to the centroid set, meaning the number of centroids M in the current centroid set equals 3. The loop executes the steps from dividing the customer data information set into M clusters to obtaining the M+1th centroid from the centroid candidate set list_CnM+1, until K centroids are obtained, and then the loop ends.

[0060] By calculating the distance product between customer data and the current centroid, the next centroid that is far away from all current centroids can be obtained, thus obtaining more dispersed centroids. Furthermore, the next centroid is obtained based on the density of each customer data in the centroid candidate set, so that the obtained centroids are customer data with relatively dense surrounding customer data, thereby improving the quality of the obtained centroids and further improving the quality of customer clustering results.

[0061] Optionally, in the customer information clustering method provided in Embodiment 1 of this application, obtaining M clusters based on the cosine distance between each customer data information in the customer data information set and M centroids includes: calculating the cosine distance between each customer data information in the customer data information set and the M centroids to obtain a set of cosine distances corresponding to each customer data information; determining the centroid corresponding to the minimum cosine distance in the set of cosine distances corresponding to each customer data information to obtain the target centroid corresponding to each customer data information; and assigning each customer data information and its corresponding target centroid to the same cluster to obtain M clusters.

[0062] In this first embodiment, in order to divide the customer data information in the customer data information set into M clusters according to the principle of proximity, it is necessary to calculate the cosine distance between the current M centroids and each customer data information in the customer data information set.

[0063] Specifically, assume the customer data set is {customer data x, customer data y}, and the current centroids are the first centroid C1 and the second centroid C2. First, calculate the cosine distance between the first centroid C1 and customer data x: 0.8; the cosine distance between the second centroid C2 and customer data x: 0.2; the cosine distance between the first centroid C1 and customer data y: 0.1; and the cosine distance between the second centroid C2 and customer data y: 1.2. The set of cosine distances corresponding to customer data x is {0.8, 0.2}, and the set of cosine distances corresponding to customer data y is {0.1, 1.2}. Next, based on the set of cosine distances {0.8, 0.2} corresponding to customer data x, determine the target centroid of customer data x as the second centroid C2; and based on the set of cosine distances {0.1, 1.2} corresponding to customer data y, determine the target centroid of customer data y as the first centroid C1. Finally, customer data information x is assigned to cluster C2_set, and customer data information y is assigned to cluster C1_set.

[0064] Dividing the customer data information into M clusters by the principle of proximity takes into account the local distribution of the customer data information in the customer data information cluster, which is beneficial for generating the M+1th centroid based on the local distribution.

[0065] Optionally, in the customer information clustering method provided in Embodiment 1 of this application, obtaining the M+1th centroid candidate set based on the distance product between each customer data information in the target cluster and the M centroids includes: calculating the cosine distance between each customer data information in the target cluster and the M centroids to obtain the M distances corresponding to each customer data information, wherein the target cluster includes L customer data information; calculating the product of the M distances corresponding to each customer data information in the target cluster to obtain the distance product corresponding to the L customer data information; determining the customer data information with the largest distance product among the distance products corresponding to the L customer data information as the neighboring point of the M+1th centroid; and forming the M+1th centroid candidate set by selecting customer data information in the target cluster whose cosine distance to the neighboring point of the M+1th centroid is less than a third preset threshold.

[0066] Specifically, assuming the target cluster is {customer data information x, customer data information y}, and the current centroids are the first centroid C1 and the second centroid C2. To obtain the (M+1)th centroid candidate set, firstly, the cosine distance between customer data information x and the first centroid C1 is calculated to be 0.2, the cosine distance between customer data information x and the second centroid C2 is calculated to be 0.8, the cosine distance between customer data information y and the first centroid C1 is calculated to be 0.1, and the cosine distance between customer data information y and the second centroid C2 is calculated to be 1.2. Next, the distance product corresponding to customer data information x is calculated to be 0.8 * 0.2 = 0.16, and the distance product corresponding to customer data information y is calculated to be 0.1 * 1.2 = 0.12. Then, the customer data information x with the largest distance product in the target cluster is determined as the third centroid neighbor. Finally, customer data information in the target cluster whose cosine distance to customer data information x is less than a third preset threshold is formed into the third centroid candidate set.

[0067] By calculating the distance product between each customer data information in the target cluster and the current M centroids, the next obtained centroid neighboring point is a customer data information that is far away from the current M centroids, which is beneficial to select centroids that are more dispersed in the customer data information.

[0068] Optionally, in the customer information clustering method provided in Embodiment 1 of this application, after clustering the customer data information in the customer data information set according to K centroids to obtain the clustering results, the above method further includes: determining the promotion strategy corresponding to each type of customer, wherein the promotion strategy is used to promote financial products to each type of customer; and promoting financial products to each type of customer according to the promotion strategy corresponding to each type of customer.

[0069] In this first embodiment, to maintain a good cooperative relationship between customers and financial institutions, after clustering customers and obtaining classification results, a promotional strategy can be determined for each customer category, recommending more suitable financial products to them. By determining the promotional strategy for each customer category, more suitable financial products can be recommended to customers based on their investment preferences, improving the service quality of financial institutions, enhancing customer experience, and achieving the effect of maintaining a good cooperative relationship between financial institutions and customers.

[0070] Optionally, in this first embodiment, the process for obtaining the K centroids can be as follows: Figure 2 As shown. Step 201: Determine the customer data information set Dataset. Step 202: Calculate the density of each customer data information in Dataset, and take the customer data information with the highest density as the first centroid C1. Step 203: Take the customer data information in Dataset that has the farthest cosine distance from the first centroid C1 as the second centroid neighbor Cn2 (i.e., the second customer data information), and form a cluster list_Cn2 with customer data information in Dataset whose cosine distance from the second centroid neighbor Cn2 is less than a first preset threshold. Take the customer data information with the highest density in cluster list_Cn2 as the second centroid C2. Step 204: Divide the customer data information in Dataset and the current M centroids into M clusters according to the proximity principle. Step 205: Take the cluster with the most customer data information among the M clusters as the target cluster, calculate the distance product between each customer data information in the target cluster and the current M centroids, and take the customer data information corresponding to the maximum distance product as the (M+1)th centroid neighbor. Step 206: Select customer data information in the target cluster whose cosine distance to the neighboring points of the (M+1)th centroid is less than a third preset threshold as the (M+1)th centroid candidate set. Step 207: Select the customer data information with the highest density in the (M+1)th centroid candidate set as the (M+1)th centroid. Repeat steps 204 to 207 until the number of centroids reaches K, then stop the loop and obtain K centroids.

[0071] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.

[0072] Example 2

[0073] This application also provides a customer information clustering device in Embodiment 2. It should be noted that the customer information clustering device in Embodiment 2 can be used to execute the customer information clustering method provided in Embodiment 1. The customer information clustering device provided in Embodiment 2 is described below.

[0074] Figure 3 This is a schematic diagram of a clustering device for customer information according to Embodiment 2 of this application. Figure 3 As shown, the device includes: a calculation unit 301, an acquisition unit 302, a first determination unit 303, and a clustering unit 304.

[0075] Specifically, the calculation unit 301 is used to calculate the density of each customer data information in the customer data information set, wherein the customer data information set includes customer data information collected from financial institutions within a preset time period, and the density represents the density of other customer data information distributed around each customer data information.

[0076] The acquisition unit 302 is used to acquire the first centroid and the second centroid in the customer data information set based on the density of each customer data information.

[0077] The first determining unit 303 is used to determine K centroids based on the cosine distance between the customer data information in the customer data information set and the first centroid, and the cosine distance between the customer data information in the customer data information set and the second centroid.

[0078] Clustering unit 304 is used to cluster customer data information in the customer data information set based on K centroids to obtain clustering results.

[0079] The customer information clustering device provided in Embodiment 2 of this application calculates the density of each customer data information in the customer data information set through a calculation unit 301. The customer data information set includes customer data information collected from financial institutions within a preset time period, and the density represents the density of other customer data information distributed around each customer data information. The acquisition unit 302 acquires a first centroid and a second centroid in the customer data information set based on the density of each customer data information. The first determination unit 303 determines K centroids based on the cosine distance between the customer data information in the customer data information set and the first centroid and the cosine distance between the customer data information in the customer data information set and the second centroid. The clustering unit 304 clusters the customer data information in the customer data information set based on the K centroids to obtain the clustering result. This solves the problem in related technologies where the centroids obtained by randomly selecting are too close or scattered when using the traditional K-Means clustering algorithm to cluster customer information, resulting in inaccurate clustering results for customer information. In this scheme, by calculating the density of each customer data information in the customer data information set, and determining K centroids that are relatively dispersed and have a high density based on the cosine distance between the first centroid, the second centroid and each customer data information in the customer data information set, this scheme avoids the problem of the traditional K-Means algorithm randomly selecting discrete noisy data as the K centroids for clustering, which leads to poor clustering results. This improves the convergence speed and clustering quality of the K-Means algorithm, and further improves the quality of the clustering results of customer information.

[0080] Optionally, in the customer information clustering apparatus provided in Embodiment 2 of this application, the above-mentioned calculation unit 301 includes: a first acquisition subunit, used to acquire customer transaction information from a preset database to obtain a customer data information set, wherein the customer data information set includes N customer data information, where N is a positive integer; a first calculation subunit, used to calculate the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods; and a second calculation subunit, used to calculate the number of times each customer data information appears in the second-order neighborhoods of other customer data information in the N second-order neighborhoods to obtain the density of each customer data information.

[0081] Optionally, in the customer information clustering device provided in Embodiment 2 of this application, the first calculation subunit includes: a first determining module, used to determine customer data information whose cosine distance to the first customer data information is less than a first preset threshold in the customer data information set, to obtain a first-order neighborhood of the first customer data information, wherein the first customer data information is any customer data information in the customer data information set, and the first-order neighborhood of the first customer data information contains L customer data information, where L is a positive integer; a second determining module, used to determine customer data information whose cosine distance to each customer data information in the first-order neighborhood is less than the first preset threshold in the first-order neighborhood of the first customer data information, to obtain L candidate second-order neighborhoods of the first customer data information; a third determining module, used to determine the common intersection of the L candidate second-order neighborhoods of the first customer data information, to obtain a second-order neighborhood of the first customer data information; and a fourth determining module, used to repeatedly execute the steps executed by the first determining module to the third determining module to determine the second-order neighborhoods of customer data information other than the first customer data information in the customer data information set, to obtain N second-order neighborhoods.

[0082] Optionally, in the customer information clustering apparatus provided in Embodiment 2 of this application, the aforementioned acquisition unit 302 includes: a second acquisition subunit, used to acquire the customer data information with the highest density based on the density of each customer data information in the customer data information set, to obtain a first centroid; a third acquisition subunit, used to acquire the customer data information in the customer data information set with the largest cosine distance from the first centroid, to obtain second customer data information; a fourth acquisition subunit, used to acquire customer data information in the customer data information set with a cosine distance from the second customer data information that is less than a second preset threshold, to obtain a second centroid candidate set; and a first determination subunit, used to determine the customer data information with the highest density in the second centroid candidate set, to obtain a second centroid.

[0083] Optionally, in the customer information clustering device provided in Embodiment 2 of this application, the first determining unit 303 includes: an adding subunit for adding the first centroid and the second centroid to the centroid set, wherein the centroid set includes M centroids, where M is a positive integer; a fifth obtaining subunit for obtaining M clusters based on the cosine distance between each customer data information in the customer data information set and the M centroids; a second determining subunit for determining the cluster with the largest amount of customer data information among the M clusters to obtain the target cluster; a sixth obtaining subunit for obtaining the (M+1)th centroid candidate set based on the distance product between each customer data information in the target cluster and the M centroids; a third determining subunit for determining the customer data information with the highest density in the (M+1)th centroid candidate set to obtain the (M+1)th centroid, and adding the (M+1)th centroid to the centroid set, and cyclically executing the steps executed by the fifth obtaining subunit to the third determining subunit until the number of centroids in the centroid set is equal to K, thus obtaining K centroids.

[0084] Optionally, in the customer information clustering device provided in Embodiment 2 of this application, the fifth acquisition subunit includes: a first calculation module, used to calculate the cosine distance between each customer data information and M centroids in the customer data information set, to obtain a cosine distance set corresponding to each customer data information; a fifth determination module, used to determine the centroid corresponding to the minimum cosine distance in the cosine distance set corresponding to each customer data information, to obtain the target centroid corresponding to each customer data information; and a classification module, used to divide each customer data information and the target centroid corresponding to each customer data information into the same cluster, to obtain M clusters.

[0085] Optionally, in the customer information clustering device provided in Embodiment 2 of this application, the sixth acquisition subunit includes: a second calculation module, used to calculate the cosine distance between each customer data information in the target cluster and M centroids, to obtain M distances corresponding to each customer data information, wherein the target cluster includes L customer data information; a third calculation module, used to calculate the product of the M distances corresponding to each customer data information in the target cluster, to obtain the distance product corresponding to L customer data information; a sixth determination module, used to determine the customer data information with the largest distance product among the distance products corresponding to L customer data information as the (M+1)th centroid neighbor; and a seventh determination module, used to form the (M+1)th centroid candidate set of customer data information in the target cluster whose cosine distance to the (M+1)th centroid neighbor is less than a third preset threshold.

[0086] Optionally, in the customer information clustering device provided in Embodiment 2 of this application, the device further includes: a second determining unit, used to determine a promotion strategy corresponding to each type of customer after clustering the customer data information in the customer data information set according to K centroids and obtaining the clustering result, wherein the promotion strategy is used to promote financial products to each type of customer; and a processing unit, used to promote financial products to each type of customer according to the promotion strategy corresponding to each type of customer.

[0087] The customer information clustering device includes a processor and a memory. The aforementioned calculation unit 301, acquisition unit 302, first determination unit 303, and clustering unit 304 are all stored in the memory as program units. The processor executes the aforementioned program units stored in the memory to achieve the corresponding functions.

[0088] The processor contains a kernel, which retrieves the corresponding program units from memory. One or more kernels can be configured, and adjusting kernel parameters can improve the clustering quality of customer data clustering results.

[0089] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0090] Embodiment 3 of the present invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements a clustering method for customer information.

[0091] Embodiment 4 of the present invention provides a processor for running a program, wherein the program executes a clustering method for customer information during runtime.

[0092] like Figure 4 As shown, Embodiment 5 of the present invention provides an electronic device. The device includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: calculating the density of each customer data information in a customer data information set, wherein the customer data information set includes customer data information collected from financial institutions within a preset time period, and the density represents the density of other customer data information distributed around each customer data information; obtaining a first centroid and a second centroid in the customer data information set based on the density of each customer data information; determining K centroids based on the cosine distance between the customer data information in the customer data information set and the first centroid and the cosine distance between the customer data information in the customer data information set and the second centroid; and clustering the customer data information in the customer data information set based on the K centroids to obtain a clustering result.

[0093] When the processor executes the program, it also performs the following steps: calculating the density of each customer data information in the customer data information set includes: obtaining customer transaction information from a preset database to obtain a customer data information set, wherein the customer data information set includes N customer data information, where N is a positive integer; calculating the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods; and calculating the number of times each customer data information appears in the second-order neighborhoods of other customer data information in the N second-order neighborhoods to obtain the density of each customer data information.

[0094] When the processor executes the program, it also performs the following steps: calculating the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods, including: step S31, determining customer data information in the customer data information set whose cosine distance to the first customer data information is less than a first preset threshold, to obtain the first-order neighborhood of the first customer data information, wherein the first customer data information is any customer data information in the customer data information set, and the first-order neighborhood of the first customer data information contains L customer data information, where L is a positive integer; step S32, determining customer data information in the first-order neighborhood of the first customer data information whose cosine distance to each customer data information in the first-order neighborhood is less than the first preset threshold, to obtain L candidate second-order neighborhoods of the first customer data information; step S33, determining the common intersection of the L candidate second-order neighborhoods of the first customer data information, to obtain the second-order neighborhood of the first customer data information; repeating steps S31 to S33 to determine the second-order neighborhoods of customer data information other than the first customer data information in the customer data information set, to obtain N second-order neighborhoods.

[0095] When the processor executes the program, it also performs the following steps: obtaining the first centroid and the second centroid in the customer data information set based on the density of each customer data information includes: obtaining the customer data information with the highest density based on the density of each customer data information in the customer data information set, and obtaining the first centroid; obtaining the customer data information with the largest cosine distance from the first centroid in the customer data information set, and obtaining the second customer data information; obtaining the customer data information in the customer data information set whose cosine distance from the second customer data information is less than a second preset threshold, and obtaining the second centroid candidate set; determining the customer data information with the highest density in the second centroid candidate set, and obtaining the second centroid.

[0096] When the processor executes the program, it also performs the following steps: Determining K centroids based on the cosine distances between customer data information in the customer data information set and the first centroid, and the cosine distances between customer data information in the customer data information set and the second centroid, includes: adding the first and second centroids to the centroid set, where the centroid set includes M centroids, where M is a positive integer; Step S51: obtaining M clusters based on the cosine distances between each customer data information in the customer data information set and the M centroids; Step S52: determining the cluster with the largest amount of customer data information among the M clusters to obtain the target cluster; Step S53: obtaining the (M+1)th centroid candidate set based on the distance product between each customer data information in the target cluster and the M centroids; Step S54: determining the customer data information with the highest density in the (M+1)th centroid candidate set to obtain the (M+1)th centroid, and adding the (M+1)th centroid to the centroid set; repeating steps S51 to S54 until the number of centroids in the centroid set equals K, thus obtaining K centroids.

[0097] When the processor executes the program, it also performs the following steps: Based on the cosine distance between each customer data information in the customer data information set and the M centroids, M clusters are obtained, including: calculating the cosine distance between each customer data information in the customer data information set and the M centroids to obtain the cosine distance set corresponding to each customer data information; determining the centroid corresponding to the minimum cosine distance in the cosine distance set corresponding to each customer data information to obtain the target centroid corresponding to each customer data information; and assigning each customer data information and its corresponding target centroid to the same cluster to obtain M clusters.

[0098] When the processor executes the program, it also performs the following steps: to obtain the M+1th centroid candidate set based on the distance product between each customer data information in the target cluster and the M centroids, including: calculating the cosine distance between each customer data information in the target cluster and the M centroids to obtain the M distances corresponding to each customer data information, wherein the target cluster includes L customer data information; calculating the product of the M distances corresponding to each customer data information in the target cluster to obtain the distance product corresponding to the L customer data information; determining the customer data information with the largest distance product among the distance products corresponding to the L customer data information as the neighboring point of the M+1th centroid; and forming the M+1th centroid candidate set by customer data information in the target cluster whose cosine distance to the neighboring point of the M+1th centroid is less than a third preset threshold.

[0099] When the processor executes the program, it also performs the following steps: After clustering the customer data information in the customer data information set according to K centroids and obtaining the clustering results, the above method further includes: determining the promotion strategy corresponding to each type of customer, wherein the promotion strategy is used to promote financial products to each type of customer; and promoting financial products to each type of customer according to the promotion strategy corresponding to each type of customer.

[0100] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.

[0101] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program comprising the following steps: calculating the density of each customer data information in a customer data information set, wherein the customer data information set includes customer data information collected from financial institutions within a preset time period, and the density represents the density of other customer data information distributed around each customer data information; obtaining a first centroid and a second centroid in the customer data information set based on the density of each customer data information; determining K centroids based on the cosine distance between the customer data information in the customer data information set and the first centroid and the cosine distance between the customer data information in the customer data information set and the second centroid; and clustering the customer data information in the customer data information set based on the K centroids to obtain a clustering result.

[0102] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: calculating the density of each customer data information in the customer data information set includes: obtaining customer transaction information from a preset database to obtain a customer data information set, wherein the customer data information set includes N customer data information, where N is a positive integer; calculating the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods; and calculating the number of times each customer data information appears in the second-order neighborhoods of other customer data information in the N second-order neighborhoods to obtain the density of each customer data information.

[0103] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: calculating the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods, including: step S31, determining customer data information in the customer data information set whose cosine distance to the first customer data information is less than a first preset threshold, to obtain the first-order neighborhood of the first customer data information, wherein the first customer data information is any customer data information in the customer data information set, and the first-order neighborhood of the first customer data information contains L customer data information, where L is a positive integer; step S32, determining customer data information in the first-order neighborhood of the first customer data information whose cosine distance to each customer data information in the first-order neighborhood is less than the first preset threshold, to obtain L candidate second-order neighborhoods of the first customer data information; step S33, determining the common intersection of the L candidate second-order neighborhoods of the first customer data information, to obtain the second-order neighborhood of the first customer data information; repeating steps S31 to S33 to determine the second-order neighborhoods of customer data information other than the first customer data information in the customer data information set, to obtain N second-order neighborhoods.

[0104] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: obtaining a first centroid and a second centroid in a customer data information set based on the density of each customer data information, including: obtaining the customer data information with the highest density based on the density of each customer data information in the customer data information set, to obtain the first centroid; obtaining the customer data information in the customer data information set with the largest cosine distance from the first centroid, to obtain the second customer data information; obtaining the customer data information in the customer data information set with a cosine distance less than a second preset threshold from the second customer data information information, to obtain a second centroid candidate set; and determining the customer data information with the highest density in the second centroid candidate set, to obtain the second centroid.

[0105] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: Determining K centroids based on the cosine distances between customer data information in the customer data information set and the first centroid, and the cosine distances between customer data information in the customer data information set and the second centroid, includes: adding the first and second centroids to a centroid set, where the centroid set includes M centroids, M being a positive integer; Step S51: obtaining M clusters based on the cosine distances between each customer data information in the customer data information set and the M centroids; Step S52: determining the cluster with the largest amount of customer data information among the M clusters, obtaining the target cluster; Step S53: obtaining the (M+1)th centroid candidate set based on the distance product between each customer data information in the target cluster and the M centroids; Step S54: determining the customer data information with the highest density in the (M+1)th centroid candidate set, obtaining the (M+1)th centroid, and adding the (M+1)th centroid to the centroid set, and repeating steps S51 to S54 until the number of centroids in the centroid set equals K, thus obtaining K centroids.

[0106] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: obtaining M clusters based on the cosine distances between each customer data information in the customer data information set and M centroids, including: calculating the cosine distances between each customer data information in the customer data information set and the M centroids to obtain a set of cosine distances corresponding to each customer data information; determining the centroid corresponding to the minimum cosine distance in the set of cosine distances corresponding to each customer data information to obtain the target centroid corresponding to each customer data information; and assigning each customer data information and its corresponding target centroid to the same cluster to obtain M clusters.

[0107] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: obtaining the (M+1)th centroid candidate set based on the distance product between each customer data information in the target cluster and the M centroids, including: calculating the cosine distance between each customer data information in the target cluster and the M centroids to obtain the M distances corresponding to each customer data information, wherein the target cluster includes L customer data information; calculating the product of the M distances corresponding to each customer data information in the target cluster to obtain the distance product corresponding to the L customer data information; determining the customer data information with the largest distance product among the distance products corresponding to the L customer data information as the neighboring point of the (M+1)th centroid; and forming the (M+1)th centroid candidate set by customer data information in the target cluster whose cosine distance to the neighboring point of the (M+1)th centroid is less than a third preset threshold.

[0108] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: after clustering customer data information in the customer data information set according to K centroids and obtaining the clustering results, the above method further includes: determining the promotion strategy corresponding to each type of customer, wherein the promotion strategy is used to promote financial products to each type of customer; and promoting financial products to each type of customer according to the promotion strategy corresponding to each type of customer.

[0109] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0110] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0111] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0112] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0113] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0114] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0115] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0116] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0117] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0118] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A method of clustering customer information, characterized by, The method comprises the following steps: calculating the density of each customer data information in a customer data information set, wherein the customer data information set comprises customer data information collected from a financial institution within a preset time period, and the density represents the density of other customer data information distributed around each customer data information; obtaining a first centroid and a second centroid in the customer data information set according to the density of each customer data information; determining K centroids according to the cosine distance between the customer data information in the customer data information set and the first centroid and the cosine distance between the customer data information in the customer data information set and the second centroid; performing clustering on the customer data information in the customer data information set according to the K centroids to obtain a clustering result; wherein determining the K centroids according to the cosine distance between the customer data information in the customer data information set and the first centroid and the cosine distance between the customer data information in the customer data information set and the second centroid comprises: adding the first centroid and the second centroid to a centroid set, wherein the centroid set comprises M centroids, and M is a positive integer; step S51, obtaining M clusters according to the cosine distance between each customer data information in the customer data information set and the M centroids; step S52, determining a cluster with the largest amount of customer data information in the M clusters to obtain a target cluster; step S53, obtaining a (M+1)th centroid candidate set according to the distance product of each customer data information in the target cluster and the M centroids; step S54, determining a customer data information with the largest density in the (M+1)th centroid candidate set to obtain a (M+1)th centroid, and adding the (M+1)th centroid to the centroid set, and performing steps S51 to S54 cyclically until the number of centroids in the centroid set is equal to K, to obtain the K centroids.

2. The method of claim 1, wherein, calculating the density of each customer data information in a customer data information set comprises: obtaining transaction information of a customer from a preset database to obtain a customer data information set, wherein the customer data information set comprises N customer data information, and N is a positive integer; calculating the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods; in the N second-order neighborhoods, calculating the number of times each customer data information appears in the second-order neighborhood of other customer data information to obtain the density of each customer data information.

3. The method of claim 2, wherein, calculating the second-order neighborhood of each customer data information in the customer data information set to obtain N second-order neighborhoods comprises: step S31, determining customer data information with a cosine distance less than a first preset threshold from a first customer data information in the customer data information set to obtain a first-order neighborhood of the first customer data information, wherein the first customer data information is any customer data information in the customer data information set, and the first-order neighborhood of the first customer data information comprises L customer data information, and L is a positive integer; ​ Step S32, in the first-order neighborhood of the first customer data information, determine customer data information with cosine distance less than the first preset threshold to each customer data information in the first-order neighborhood, obtain L second-order neighborhood candidates of the first customer data information; Step S33, determine the common intersection of the L second-order neighborhood candidates of the first customer data information, obtain the second-order neighborhood of the first customer data information; Repeat steps S31 to S33 to determine the second-order neighborhood of customer data information in the customer data information set except the first customer data information, obtain N second-order neighborhoods.

4. The method of claim 1, wherein, According to the density of each customer data information, obtain the first and second centroids in the customer data information set, including: According to the density of each customer data information in the customer data information set, obtain the customer data information with the maximum density, obtain the first centroid; Obtain the customer data information in the customer data information set with the maximum cosine distance to the first centroid, obtain the second customer data information; Obtain the customer data information in the customer data information set with cosine distance less than the second preset threshold to the second customer data information, obtain the second centroid candidate set; Determine the customer data information with the maximum density in the second centroid candidate set, obtain the second centroid.

5. The method of claim 1, wherein, According to the cosine distance of each customer data information in the customer data information set to the M centroids, obtain M clusters, including: Calculate the cosine distance of each customer data information in the customer data information set to the M centroids, obtain the cosine distance set corresponding to each customer data information; Determine the centroid corresponding to the minimum cosine distance in the cosine distance set corresponding to each customer data information, obtain the target centroid corresponding to each customer data information; Divide each customer data information and the target centroid corresponding to each customer data information into the same cluster, obtain the M clusters.

6. The method of claim 4, wherein, According to the distance product of each customer data information in the target cluster to the M centroids, obtain the M+1 centroid candidate set, including: Calculate the cosine distance of each customer data information in the target cluster to the M centroids, obtain the M distances corresponding to each customer data information, wherein the target cluster includes L customer data information; Calculate the product of the M distances corresponding to each customer data information in the target cluster respectively, obtain the distance product corresponding to the L customer data information; Determine the customer data information with the maximum distance product in the distance product corresponding to the L customer data information as the M+1 centroid neighbor point; Group the customer data information in the target cluster with cosine distance less than the third preset threshold to the M+1 centroid neighbor point into the M+1 centroid candidate set.

7. The method of claim 1, wherein, After clustering the customer data information in the customer data information set according to the K centroids, obtain the clustering result, the method further includes: Determine the promotion strategy corresponding to each type of customer, wherein the promotion strategy is used to promote financial products to each type of customer; promote financial products to each type of customer according to the promotion strategy corresponding to each type of customer.

8. A client information clustering apparatus characterized by comprising: Including: The computing unit is configured to calculate the density of each customer data information in the customer data information set, wherein the customer data information set comprises customer data information collected from the financial institution in a preset time period, and the density represents the density of other customer data information distributed around each customer data information. The obtaining unit is configured to obtain a first centroid and a second centroid in the customer data information set according to the density of each customer data information. The first determining unit is configured to determine K centroids according to the cosine distance between the customer data information in the customer data information set and the first centroid and the cosine distance between the customer data information in the customer data information set and the second centroid. The clustering unit is configured to cluster the customer data information in the customer data information set according to the K centroids to obtain a clustering result. The first determining unit comprises an adding subunit configured to add the first centroid and the second centroid to a centroid set, wherein the centroid set comprises M centroids, and M is a positive integer; a fifth obtaining subunit configured to obtain M clusters according to the cosine distance between each customer data information in the customer data information set and the M centroids; a second determining subunit configured to determine a cluster with the largest amount of customer data information in the M clusters to obtain a target cluster; a sixth obtaining subunit configured to obtain an M+1 centroid candidate set according to the distance product between each customer data information in the target cluster and the M centroids; and a third determining subunit configured to determine a customer data information with the largest density in the M+1 centroid candidate set to obtain an M+1 centroid, and add the M+1 centroid to the centroid set; and the fifth obtaining subunit to the third determining subunit are repeatedly executed until the number of centroids in the centroid set is equal to K, and the K centroids are obtained.

9. An electronic device, comprising: The one or more processors and the memory are configured to implement the customer information clustering method in any one of claims 1 to 7. The one or more processors and the memory are configured to implement the customer information clustering method in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Financial product recommendation method and device , computer device and storage medium

    CN109447728A

  • A transformer area user identification method based on principal component analysis and k-means clustering

    CN109740641A