A method and device for classifying customer groups
By conducting initial population division and multiple rounds of population merger of customer groups, dynamically adjusting the merger threshold, the problem of insufficient efficiency and accuracy of traditional customer classification methods is solved, and a more efficient and refined customer group classification is achieved.
Patent Information
- Application Number
- CN202411954480.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-04-01
AI Technical Summary
The traditional customer classification method has low classification efficiency and poor accuracy, making it difficult to effectively divide customer groups.
By initial population division of the attribute values of each customer in the customer group in multiple dimensions, and then multiple rounds of population merging are followed by dynamic adjustment of the merge threshold to improve classification accuracy.
It improves the accuracy and efficiency of customer group classification, can divide customer groups more refinedly, and is suitable for large data scenarios.
Smart Images

Figure CN119740081A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method and device for classifying customer groups. Background Art
[0002] With the development of computer technology, more and more technologies are applied in the financial field, and the traditional financial industry is gradually transforming to financial technology. In the operation of the supply chain, it is usually necessary to divide a large number of customers into segmented groups, so that refined operations and services can be adopted for the segmented groups. For example, in the financial field, banks have a large number of loan customers, and they divide the large number of loan customers into different levels of loan customers. The higher the level of the loan customer, the higher the risk. Different measures are taken for different levels of loan customers to ensure that the loan customers can repay on time.
[0003] Since traditional customer classification methods have low classification efficiency and poor accuracy, how to effectively classify customers requires further research. Summary of the invention
[0004] The present application provides a customer group classification method and device, which are used to improve the accuracy of customer group classification.
[0005] In a first aspect, an embodiment of the present application provides a customer group classification method, which can be executed by a customer group classification device, and the method includes: performing initial population division on the customer group according to the attribute values of each customer in the customer group in multiple dimensions to obtain N populations; based on the attribute values of each customer in each population in multiple dimensions, performing multiple rounds of population merging on the N populations until M populations that meet the group classification requirements are obtained; wherein any round of population merging is performed in the following manner: based on the attribute values of each first customer in the first population in multiple dimensions, and the attribute values of each second customer in the second population in multiple dimensions, the first customer in the second population is divided into multiple groups, and the first customer in the second population is divided into multiple groups. The attribute values of each second customer in the group in multiple dimensions are used to determine the population connectivity between the first population and the second population; if the population connectivity meets the merging threshold, the first population and the second population are merged; the population connectivity is determined based on the distance between the attribute values of any first customer and any second customer in the multiple dimensions; the merging threshold is determined based on the merging threshold of the previous round and the population merging rate of the previous round; the population merging rate of any round is determined based on the population size before the population merging in this round and the population size after the population merging in this round.
[0006] By adopting the above method, the merging threshold of this round is adjusted by the merging threshold of the previous round and the population merging rate of the previous round, so that the merging threshold of each round is dynamically adjusted. In this way, the merging threshold of each round can be determined more accurately and a more accurate population merging result can be obtained.
[0007] In a possible implementation, before performing multiple rounds of population merging on the N populations, it also includes: setting an initial merging threshold and a reference merging rate; the reference merging rate is determined based on the business classification attributes of the customer group; the merging threshold is determined based on the merging threshold of the previous round and the population merging rate of the previous round, including: the merging threshold of the first round of population merging is set to the initial merging threshold; the merging threshold of the i-th round of population merging is based on the population merging rate of the i-1th round and the reference merging rate, and the merging threshold of the i-1th round is adjusted; i is an integer greater than 1; wherein, if the population merging rate of the i-1th round is greater than the reference merging rate, the merging threshold of the i-1th round is increased as the merging threshold of the i-th round; if the population merging rate of the i-1th round is less than the reference merging rate, the merging threshold of the i-1th round is reduced as the merging threshold of the i-th round; if the population merging rate of the i-1th round is equal to the reference merging rate, the merging threshold of the i-1th round is used as the merging threshold of the i-th round.
[0008] The above method specifically defines the process of adjusting the merging threshold of the i-th round to obtain the merging threshold of the i+1th round according to the relationship between the population merging rate and the reference merging rate in the previous round. The reference merging rate is the proportion of the population that should be merged in each round of merging. Setting the reference merging rate is more intuitive and accurate, and the setting is convenient, so that more non-professional business personnel can complete the classification of the population by setting an intuitive reference merging rate, thereby lowering the threshold for classifying multiple populations.
[0009] In a possible implementation, before determining the population connectivity between the first population and the second population, the method further includes: setting the number of grid divisions in each dimension based on the classification width of the customer in each dimension; converting each customer into a spatial point within the grid according to the attribute values of each customer in multiple dimensions; and determining whether the first population and the second population are located in the same grid or adjacent grids.
[0010] By adopting the above method, by setting the number of grid divisions in each dimension, it is determined whether the first population and the second population are located in the same grid or adjacent grids. For populations that are not in the same grid or adjacent grids, it is not necessary to calculate whether the population connectivity meets the merging threshold. This reduces a lot of workload and improves the efficiency of population classification. For scenarios with large amounts of data, more efficient population classification can be obtained.
[0011] In a possible implementation, after determining that the first population and the second population are located in the same grid or adjacent grids and before determining the population connectivity between the first population and the second population, it also includes: determining the center of mass distance between the center of mass of the first population and the center of mass of the second population; determining the population distance between the first population and the second population based on the center of mass distance, the maximum width of the first population, and the maximum width of the second population; and determining that the population distance is less than a distance threshold.
[0012] Using the above method, before determining the population connectivity between the first population and the second population, the population distance between the first population and the second population can also be calculated. If the population distance between the two populations meets the distance threshold, the population connectivity between the first population and the second population can be calculated to see if it meets the merge threshold; if not, there is no need to calculate the population connectivity.
[0013] In a possible implementation, the group classification requirement includes that the number of merging rounds is greater than a preset number of stopping merging rounds, and the merging threshold is less than a preset minimum merging threshold.
[0014] Using the above method, if the number of merging rounds is greater than the preset number of merging rounds to stop, it means that the current round is no longer the first merging. At this time, the merging threshold has been adjusted many times, and the possibility of premature termination due to unreasonable initial merging threshold setting can be ruled out; if the merging threshold is less than the minimum merging threshold, it means that the current merging threshold is reduced to a lower level before the population can be merged. Therefore, the need for merging is lost at this time, so the merging can be terminated.
[0015] In a possible implementation, the preset minimum merging threshold is determined according to the merging threshold of the current merging round, the merging threshold of the previous merging round, and a multiple of the preset threshold.
[0016] In a possible implementation, the number of grid divisions in each dimension is set based on the classification width of the customer in each dimension, including: setting the number of grid divisions in each dimension under the first round of population merging based on the classification width of the customer in each dimension; updating the number of grid divisions in each dimension corresponding to the i+1th round of population merging according to the number of grid divisions in each dimension corresponding to the i-th round of population merging, the number of populations before the i-th round of population merging, and the number of populations after the i-th round of population merging, where i is an integer greater than 1.
[0017] In a possible implementation, the population connectivity between the first population and the second population is determined based on the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions, including: determining the similarity between the first population and the second population and the discreteness between the first population and the second population based on the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions; the similarity represents the degree of similarity between customers between populations, and the discreteness represents the degree of discreteness between customers between populations; and determining the population connectivity between the first population and the second population based on the similarity and the discreteness.
[0018] By adopting the above method, when considering the population connectivity of two populations, the discreteness of the two populations is considered, which improves the accuracy of population merging.
[0019] In a possible implementation, the similarity includes relative interconnectivity and relative proximity; the relative interconnectivity is determined based on the sum of the inter-population customer distances between any first customer and any second customer, the sum of the customer distances within the first group, and the sum of the customer distances within the second group; the relative proximity is determined based on the average of the sum of the inter-population customer distances between any first customer and any second customer, the average of the sum of the customer distances within the first group, and the average of the sum of the customer distances within the second group; the discreteness is determined based on the inter-population customer distance and the inter-population customer average distance between any first customer and any second customer.
[0020] In a second aspect, an embodiment of the present application provides a customer group classification device, the device comprising: a division module, for performing initial population division on the customer group according to the attribute values of each customer in the customer group in multiple dimensions, to obtain N populations; a merging module, for performing multiple rounds of population merging on the N populations based on the attribute values of each customer in each population in multiple dimensions, until M populations that meet the group classification requirements are obtained; wherein any round of population merging is performed in the following manner: a determination module, for performing multiple rounds of population merging on the N populations based on the attribute values of each first customer in the first population in multiple dimensions, and each first customer in the second population The attribute values of the first and second customers in multiple dimensions are used to determine the population connectivity between the first and second populations; the merging module is specifically used to merge the first and second populations if the population connectivity meets the merging threshold; the population connectivity is determined based on the distance between the attribute values of any first customer and any second customer in the multiple dimensions; the merging threshold is determined based on the merging threshold of the previous round and the population merging rate of the previous round; the population merging rate of any round is determined based on the population size before the population merging in that round and the population size after the population merging in that round.
[0021] In a possible implementation, the device also includes a setting module for setting an initial merging threshold and a reference merging rate; the reference merging rate is determined based on the business classification attributes of the customer group; the merging threshold for the first round of population merging is set to the initial merging threshold; the determination module is also used to adjust the merging threshold for the i-1th round of population merging based on the population merging rate of the i-1th round and the reference merging rate; i is an integer greater than 1; wherein, if the population merging rate of the i-1th round is greater than the reference merging rate, the merging threshold of the i-1th round is increased as the merging threshold of the i-1th round; if the population merging rate of the i-1th round is less than the reference merging rate, the merging threshold of the i-1th round is reduced as the merging threshold of the i-1th round; if the population merging rate of the i-1th round is equal to the reference merging rate, the merging threshold of the i-1th round is used as the merging threshold of the i-th round.
[0022] In a possible implementation, the setting module is further used to set the number of grid divisions in each dimension based on the classification width of the customer in each dimension; the determination module is further used to convert each customer into a spatial point within the grid according to the attribute values of each customer in multiple dimensions; and determine whether the first population and the second population are located in the same grid or adjacent grids.
[0023] In a possible implementation, the determination module is also used to determine the center of mass distance between the center of mass of the first population and the center of mass of the second population; determine the population distance between the first population and the second population based on the center of mass distance, the maximum width of the first population, and the maximum width of the second population; and determine that the population distance is less than a distance threshold.
[0024] In a possible implementation, the group classification requirement includes that the number of merging rounds is greater than a preset number of stopping merging rounds, and the merging threshold is less than a preset minimum merging threshold.
[0025] In a possible implementation, the preset minimum merging threshold is determined according to the merging threshold of the current merging round, the merging threshold of the previous merging round, and a multiple of the preset threshold.
[0026] In a possible implementation, the setting module is further used to set the number of grid divisions in each dimension under the first round of population merging based on the classification width of the customer in each dimension; the determination module is further used to update the number of grid divisions in each dimension corresponding to the i+1th round of population merging according to the number of grid divisions in each dimension corresponding to the i-th round of population merging, the number of populations before the i-th round of population merging, and the number of populations after the i-th round of population merging, where i is an integer greater than 1.
[0027] In a possible implementation, the determination module is also used to determine the similarity between the first population and the second population, and the discreteness between the first population and the second population based on the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions; the similarity represents the degree of similarity between customers between populations, and the discreteness represents the degree of discreteness between customers between populations; based on the similarity and the discreteness, determine the population connectivity between the first population and the second population.
[0028] In a possible implementation, the similarity includes relative interconnectivity and relative proximity; the relative interconnectivity is determined based on the sum of the inter-population customer distances between any first customer and any second customer, the sum of the customer distances within the first group, and the sum of the customer distances within the second group; the relative proximity is determined based on the average of the sum of the inter-population customer distances between any first customer and any second customer, the average of the sum of the customer distances within the first group, and the average of the sum of the customer distances within the second group; the discreteness is determined based on the inter-population customer distance and the inter-population customer average distance between any first customer and any second customer.
[0029] In a third aspect, an embodiment of the present application further provides a device for determining customer group classification, the device comprising a memory and a processor, the memory being used to store computer programs or instructions; the processor being used to call the computer programs or instructions stored in the memory to execute a method as in any possible implementation of the first aspect.
[0030] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which instructions are stored. When a computer reads and executes the instructions, the computer executes a method in any possible implementation of the first aspect.
[0031] In a fifth aspect, an embodiment of the present application provides a computer program product, wherein instructions are stored in the computer program product. When a computer reads and executes the instructions, the computer executes a method in any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0033] Figure 1 A schematic diagram of a process flow corresponding to a customer group classification method provided in an embodiment of the present application;
[0034] Figure 2 A schematic diagram of two pairs of populations with the same similarity but different discreteness provided in an embodiment of the present application;
[0035] Figure 3 A schematic diagram of the internal modules of a customer group classification device 3000 provided in an embodiment of the present application;
[0036] Figure 4 A structural schematic diagram of a customer group classification device 4000 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0037] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0038] In order to better classify customer groups based on historically accumulated customer information, an embodiment of the present application provides a customer group classification method for improving the accuracy of customer group classification. Figure 1 A schematic diagram of a process flow corresponding to a customer group classification method provided in an embodiment of the present application. The process flow can be executed by a customer group classification device, such as Figure 1 As shown, the process includes the following steps:
[0039] Step 101 : The customer group classification device performs initial population division on the customer group according to the attribute values of each customer in the customer group in multiple dimensions to obtain N populations.
[0040] Exemplarily, the customer group classification device can be a computer, server or other intelligent device, and the customer has multiple dimensions, such as age, annual income, monthly income, years of work, and loan amount. The customer group is initially divided into populations according to the attribute values of the selected dimensions, and unimportant dimensions or similar dimensions can be removed. For example, annual income and monthly income both represent the customer's economic income level to a certain extent, so one of the dimensions of annual income and monthly income can be selected. The embodiment of the present application does not specifically limit the types of customer attributes. Exemplarily, in the embodiment of the present application, the attribute values of the customer in the three dimensions of age, annual income and years of work are selected, such as a customer who is 28 years old, has an annual income of 10w, and has 2 years of work experience.
[0041] The customer group is initially divided into populations according to the attribute values of each customer in the customer group in multiple dimensions to obtain N populations. Specifically, the attribute values of the customer in multiple dimensions are mapped in spatial coordinates, that is, in the data point (x, y, z), x represents age, y represents annual income, and z represents years of work. The above customer is 28 years old, with an annual income of 10w and a working experience of 2 years, and the corresponding data point is (28, 10, 2). According to the same mapping rule, each customer in the customer group is represented as a data point in space to obtain the initial distribution map corresponding to the customer group. Calculate the distance between all data points in the initial distribution map. Optionally, the distance between two data points can be represented by Euclidean distance to obtain the k nearest data points of each data point, and connect each data point with the k nearest data points to obtain a k-nearest neighbor graph. Take data point D as an example, take data point D as the starting point, draw k directed edges, and the k directed edges point to the k nearest data points of the data point. Furthermore, the k-nearest neighbor graph is divided into N different clusters using a graph partitioning method, thereby obtaining an initial population graph, in which each cluster represents a population, and each data point in a cluster represents a customer in a population.
[0042] The customer group classification device performs multiple rounds of population merging on N populations based on the attribute values of each customer in each population in multiple dimensions until M populations that meet the group classification requirements are obtained; wherein any round of population merging is performed in the following manner.
[0043] Step 102, the customer group classification device determines the population connectivity between the first population and the second population based on the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions; if the population connectivity meets the merging threshold, the first population and the second population are merged.
[0044] Specifically, for the first population and the second population, the population connectivity between the first population and the second population is calculated, and the population connectivity is calculated based on the distance between the data points corresponding to the multiple customers included in the first population and the data points corresponding to the multiple customers included in the second population. There are many calculation methods. The population connectivity is calculated according to the preset calculation method. If the population connectivity between the first population and the second population meets the merging threshold, the first population and the second population are merged. If the population connectivity between the first population and the second population does not meet the merging threshold, the first population and the second population are not merged, and the population connectivity between the first population and other populations is calculated. Assuming that the population connectivity between the first population and the second population meets the merging threshold, the first population and the second population are merged, and the population connectivity other than the first population and the second population is continued to be calculated. For the population after the first population and the second population are merged, it can be ignored in this round of population merging.
[0045] Among them, the merging threshold is determined according to the merging threshold of the previous round and the population merging rate of the previous round, and the population merging rate of any round is determined based on the population size before the merging of the round population and the population size after the merging of the round population. That is to say, the merging threshold of each round in the embodiment of the present application is not fixed, but is related to the merging threshold of the previous round and the population merging rate of the previous round, and the population merging rate of any round can be determined based on the population size before the merging of the round population and the population size after the merging of the round population. For example, the population size before the merging of the round population is N, and the population size after the merging of the round population is M, then the population merging rate of the round is (NM) / N; or the population merging rate is M / N; or in the process of calculating the merging of the round population, the number of successful merging is P times, and the number of failed merging is Q times, then the population merging rate of the round is P / (P+Q). The present application does not limit the specific calculation method of the population merging rate. In this way, the merging threshold can be dynamically adjusted at different merging rounds, and a more accurate merging result can be obtained.
[0046] Optionally, before multiple rounds of population merging of N populations, the process further includes: setting an initial merging threshold and a reference merging rate, wherein the reference merging rate is determined based on the business classification attributes of the customer group. Since the merging threshold of each round except the first round is dynamically adjusted according to the previous round, the setting of the initial merging threshold does not need to be precise, thereby reducing the difficulty of setting the initial merging threshold for the business user.
[0047] The merging threshold is determined based on the merging threshold of the previous round and the population merging rate of the previous round, including: the merging threshold of the first round of population merging is set as the initial merging threshold; the merging threshold of the i-th round of population merging is based on the population merging rate of the i-1th round and the reference merging rate, and the merging threshold of the i-1th round is adjusted; i is an integer greater than 1; if the population merging rate of the i-1th round is greater than the reference merging rate, the merging threshold of the i-1th round is increased as the merging threshold of the i-th round; if the population merging rate of the i-1th round is less than the reference merging rate, the merging threshold of the i-1th round is reduced as the merging threshold of the i-th round; if the population merging rate of the i-1th round is equal to the reference merging rate, the merging threshold of the i-1th round is used as the merging threshold of the i-th round.
[0048] Specifically, the reference merging rate is the ratio that should be merged in each round of population merging. Using the reference merging rate as a parameter to control the merging threshold can convert existing business experience into intuitive parameters, allowing more non-professional business personnel to set the reference merging rate to complete the classification of customer groups and lower the threshold for classifying customer data. If the population merging rate of the i-1th round is greater than the reference merging rate, it means that the number of successfully merged populations in the i-1th round is large, the population connectivity of the i-1th round more easily meets the merging threshold, and the merging threshold of the i-1th round is low, so it is necessary to increase the merging threshold of the i-1th round; similarly, if the population merging rate of the i-1th round is less than the reference merging rate, it means that the number of successfully merged populations in the i-1th round is small, the population connectivity of the i-1th round is more difficult to meet the merging threshold, and the merging threshold of the i-1th round is high, so it is necessary to reduce the merging threshold of the i-1th round; if the population merging rate of the i-1th round is equal to the reference merging rate, it means that the number of successfully merged populations in the i-1th round is moderate, which meets the merging rate expected by the staff, so there is no need to adjust the merging threshold of the i-1th round. The embodiment of the present application proposes a formula for calculating the merging threshold of the i-1th round based on the merging threshold of the i-1th round, the population merging rate of the i-1th round and the reference merging rate, as shown in the following formula:
[0049]
[0050] Wherein, Ti represents the merging threshold of the i-th round, Ti-1 represents the merging threshold of the i-1th round, S represents the reference merging rate, and Si-1 represents the population merging rate of the i-1th round. The embodiment of the present application does not limit the specific calculation method of the merging threshold of each round, as long as the above rules are met.
[0051] Optionally, based on the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions, determining the population connectivity between the first population and the second population includes: based on the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions, determining the similarity between the first population and the second population, and the discreteness between the first population and the second population. Wherein, similarity represents the degree of similarity between customers between populations, and discreteness represents the degree of discreteness between customers between populations, and the population connectivity between the first population and the second population is determined based on the similarity and discreteness.
[0052] Specifically, based on the data points corresponding to the multiple customers included in each of the first and second populations, the similarity and discreteness between the first and second populations are calculated according to the distance relationship between the data points. Discreteness characterizes the degree of discreteness of the distance between each pair of data points between the two populations. The population connectivity between the first and second populations is determined based on the similarity and discreteness. In this way, on the basis of the same similarity between the two populations, combined with the judgment of discreteness, the population that should be merged can be determined, so that the determined population connectivity is more accurate. Figure 2 A schematic diagram of two pairs of populations with the same similarity but different discreteness provided in the embodiment of the present application. Each pair of populations includes two populations, from Figure 2 From the schematic diagram of the two pairs of populations, it can be seen that except for the positions of the four data points of the connecting line, the positions of the other data points of the first pair of populations and the second pair of populations are the same, and the similarity calculation of the two pairs of populations is the same, but the discreteness of the second pair of populations is lower. Therefore, the second pair of populations is more suitable for merging than the first pair of populations.
[0053] Optionally, the similarity includes relative interconnectivity and relative proximity, the relative interconnectivity is determined based on the sum of the inter-population customer distances between any first customer and any second customer, the sum of the customer distances within the first group, and the sum of the customer distances within the second group; the relative proximity is determined based on the average of the sum of the inter-population customer distances between any first customer and any second customer, the average of the sum of the customer distances within the first group, and the average of the sum of the customer distances within the second group; the discreteness is determined based on the inter-population customer distance between any first customer and any second customer and the inter-population customer average distance.
[0054] Specifically, for any first customer in the first population and any second customer in the second population, the inter-population customer distance between the first customer and the second customer is determined based on the attribute values of the first customer in multiple dimensions and the attribute values of the second customer in multiple dimensions; for any two first customers in the first population, the customer distance within the first population is determined based on the attribute values of any two first customers in multiple dimensions; for any two second customers in the second population, the customer distance within the second population is determined based on the attribute values of any two second customers in multiple dimensions. Exemplarily, the calculation formula for calculating the relative interconnectivity between the kth population and the jth population is as follows:
[0055]
[0056] Among them, RI(C k ,C j ) represents the relative interconnection between the kth and jth populations, EC(C k ,C j) represents the sum of the inter-population customer distances between any first customer and any second customer in the kth and jth populations; EC(C k ) represents the sum of the distances between customers in the kth group; EC(C j ) represents the sum of the distances of customers within the jth group. For example, if the customers included in the kth group correspond to three data points, and the customers included in the jth group correspond to four data points, then the sum of the distances between the customers of the kth group and the jth group is the sum of the distances between three data points and four data points, that is, the sum of the distances of 12 edges; the sum of the distances of customers within the kth group is the sum of the distances between the three data points, that is, the sum of the lengths of the three edges; the sum of the distances of customers within the jth group is the sum of the distances between the four data points, that is, the sum of the lengths of the six edges.
[0057] Exemplarily, the calculation formula for calculating the relative proximity between the kth population and the jth population is as follows:
[0058]
[0059] Among them, RC(C k ,C j ) represents the relative closeness between the kth and jth populations, m k represents the number of data points included in the kth population, m j Represents the number of data points included in the jth population; represents the average of the sum of the inter-population customer distances between any first customer and any second customer in the kth and jth populations; represents the average value of the sum of customer distances within the kth population; represents the average value of the sum of distances of customers in the jth group. Using the above example, the customers in the kth group correspond to three data points, and the customers in the jth group correspond to four data points, then is the average value of the 12 edges; is the average value of the three edges; is the average value of the six edges.
[0060] Exemplarily, the calculation formula for calculating the discrete type of the kth population and the jth population is as follows:
[0061]
[0062] Among them, RD(C k ,C j ) represents the discreteness of the kth population and the jth population, N represents the total number of connections between the data points corresponding to any first customer in the kth population and any second customer in the jth population, and L mIndicates the value of the mth line. Using the above example, the customers included in the kth group correspond to three data points, and the customers included in the jth group correspond to four data points, then N is 12, and L m is the value of each edge. By calculating the discreteness, the distribution of two different customer groups can be compared more accurately.
[0063] Optionally, the relative interconnectivity, relative proximity and discreteness may also be represented by the square of the distance between any customer in the kth group and any customer in the jth group or other numerical values related to the distance, which is not specifically limited in the present application.
[0064] The population connectivity between populations is calculated based on the relative interconnectivity, relative proximity and discreteness of the populations. If the population connectivity meets the merging threshold, the two populations are merged. The formula is as follows:
[0065] α
[0066] RI·(RC / RD)>T i
[0067] Among them, α is the population merging adjustment parameter, and Ti represents the merging threshold of the i-th round. Because RD reflects the degree of dispersion of the distance between each pair of data points between two customer groups, when the degree of dispersion is high, it is less expected to merge, and when the degree of dispersion is low, it is more expected to merge, so RD is placed in the denominator; and because RD reflects the degree of dispersion of the distance between data points, it is calculated based on the mean and is more related to RC, a factor that uses the mean, so RC is placed in the numerator and shares the α parameter.
[0068] Optionally, before determining the population connectivity between the first population and the second population, the method further includes: setting the number of grid divisions in each dimension based on the classification width of the customer in each dimension, converting each customer into a spatial point in the grid according to the attribute values of each customer in multiple dimensions, and determining whether the first population and the second population are located in the same grid or adjacent grids.
[0069] Specifically, for all customers included in the N populations, corresponding to the data points in the spatial coordinates, the number of grid divisions in each dimension is set according to the classification width of the data points in each dimension. For example, the width of the age dimension of all customers includes ages 18 to 68, and the age dimension corresponds to the x-coordinate. The x-coordinate can be divided into 4 division numbers, namely 28, 38, 48 and 58, so the age dimension is classified into 18-28, 28-38, 38-48, 48-58, and 58-68. It can be understood that the method for determining the number of grid divisions in other dimensions is the same as that of the age dimension. The number of grid divisions determined in different dimensions can be the same or different, and this application does not make specific limitations on this.
[0070] After determining the number of grid divisions in each dimension, the N populations are divided into the same or different grids. If the first population and the second population are in the same or adjacent grids, then continue to determine whether the first population and the second population can be merged; if the first population and the second population are not in the same or adjacent grids, then the two populations can be discontinued from calculating whether to merge.
[0071] Optionally, in an embodiment of the present application, the staff determines the number of grid divisions in each dimension under the first round of population merging based on the attribute values of all customers in multiple dimensions, and updates the number of grid divisions in each dimension corresponding to the i+1th round of population merging based on the number of grid divisions in each dimension corresponding to the i-th round of population merging, the number of populations before the i-th round of population merging, and the number of populations after the i-th round of population merging, where i is an integer greater than 1.
[0072] Specifically, since the i-th round of population merging has completed one round of population merging, the number of populations has decreased. Therefore, when the i+1-th round of population merging is performed, the number of grid divisions can be appropriately reduced so that more populations can be divided into the same or adjacent grids. The calculation formula for the i+1-th round of grid divisions is as follows:
[0073]
[0074] Among them, NC is the number of grid divisions in the i-th round, p is the number of dimensions, C last Indicates the number of populations before the last round of population merging, C now Indicates the number of populations after the last round of population merging.
[0075] Furthermore, after determining that the first population and the second population are located in the same grid or adjacent grids, and before determining the population connectivity between the first population and the second population, it also includes: determining the center of mass distance between the center of mass of the first population and the center of mass of the second population; determining the population distance between the first population and the second population based on the center of mass distance, the maximum width of the first population, and the maximum width of the second population; and determining that the population distance is less than a distance threshold.
[0076] Specifically, calculate the average coordinates of the data points corresponding to all customers in the first population to obtain the centroid of the first population. That is, if the first population includes three data points (x1, y1, z1), (x2, y2, z2), and (x3, y3, z3), then the centroid of the first population is x = (x1 + x2 + x3) / 3, y = (y1 + y2 + y3) / 3, z = (z1 + z2 + z3) / 3. Similarly, calculate the centroid of the second population. The maximum width of the first population is twice the distance between the data point farthest from the centroid in the first population and the centroid of the first population; the maximum width of the second population is twice the distance between the data point farthest from the centroid in the second population and the centroid of the second population. According to the distance between the centroid of the first population and the centroid of the second population, the maximum width of the first population, and the maximum width of the second population, determine the population distance between the first population and the second population. If dist(C k ,C j ) represents the distance between the centroid of the k-th population and the centroid of the j-th population, D(C k ) represents the maximum width of the k-th population, D(C j ) represents the maximum width of the j-th population, when dist(C k ,C j ) / (D(C k ) + D(C j )) < B, then the population distance is less than the distance threshold, and B is the set distance threshold parameter.
[0077] That is to say, in the case where the first population and the second population are located in the same or adjacent grids, calculate that the population distance between the first population and the second population is less than the distance threshold. If it is determined that the population distance between the first population and the second population is less than the distance threshold, then calculate whether the population connectivity between the first population and the second population meets the merging threshold. If it meets, merge the first population and the second population. After the first population and the second population are merged, then attempt to merge the populations other than the first population and the second population. For example, for the third population, if there is no population located in the same or adjacent grid as the third population, then the third population is not merged; for the fourth population, if there are populations located in the same or adjacent grid as the fourth population, including the fifth population and the sixth population, then randomly select the fifth population first, and calculate whether the fourth population and the fifth population can be merged. If they can be merged, then merge the fourth population and the fifth population. If they cannot be merged, then calculate whether the fourth population and the sixth population can be merged. The merging process is the same as the merging process of the first population and the second population, and will not be elaborated here. After completing the i-th round of merging, the merged populations and the populations that were not merged in this round form the populations of the i + 1-th round. Continue to merge the populations of the i + 1-th round until the merging stop condition is reached.
[0078] The merging stop condition in the embodiment of the present application is that the current merging round number of the population is greater than the number of merging rounds that can be stopped, and the current merging threshold of the population is less than the minimum merging threshold. Specifically, the current merging round number of the population is greater than the number of merging rounds that can be stopped, indicating that the current round number is no longer the first merging, and the merging threshold at this time has been adjusted many times, which can eliminate the possibility of premature termination due to unreasonable initial merging threshold settings. Minimum merging threshold in is the average of the merging threshold of the current merging round and the merging threshold of the previous round. Since the merging threshold of the previous merging round is quite different from the merging threshold of the current merging round, it is not a reference. Therefore, the minimum merging threshold can be better determined based on the current merging round and its merging threshold in the previous round. T p To set a threshold multiple parameter, directly set T limit It is difficult to set up and understand. p Can make T limit It is easier to understand that the minimum merge threshold is a multiple of the merge threshold of the current merge round and the average of the merge threshold of the previous round. If the current merge threshold of the population is less than the minimum merge threshold, it means that the current merge judgment needs to reduce the merge threshold to a lower level before the population can be merged. Therefore, the need for merging has been lost, so the merge can be terminated.
[0079] When the merging stop condition is reached after multiple rounds of merging of N populations, the merging is stopped. If M populations are obtained after stopping the merging, it means that the customer group is finally classified into M populations, and the customers included in each of the M populations are the same type of customers.
[0080] Figure 3 A schematic diagram of the internal modules of a customer group classification device 3000 provided in an embodiment of the present application is shown as follows: Figure 3 As shown, the device may include a division module 301 , a merging module 302 , a determination module 303 , and a setting module 304 .
[0081] The division module 301 is used to perform initial population division on the customer group according to the attribute values of each customer in the customer group in multiple dimensions to obtain N populations; the merging module 302 performs multiple rounds of population merging on the N populations based on the attribute values of each customer in each population in multiple dimensions until M populations that meet the group classification requirements are obtained; wherein any round of population merging is performed in the following manner: the determination module 303 is used to determine the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions. value, determine the population connectivity between the first population and the second population; the merging module 302 is specifically used to merge the first population and the second population if the population connectivity meets the merging threshold; the population connectivity is determined based on the distance between the attribute values of any first customer and any second customer in the multiple dimensions; the merging threshold is determined based on the merging threshold of the previous round and the population merging rate of the previous round; the population merging rate of any round is determined based on the population size before the population merging in that round and the population size after the population merging in that round.
[0082] In a possible implementation, the device also includes a setting module 304, which is used to set an initial merging threshold and a reference merging rate; the reference merging rate is determined based on the business classification attributes of the customer group; the merging threshold of the first round of population merging is set to the initial merging threshold; the determination module 303 is also used to adjust the merging threshold of the i-1th round of population merging based on the population merging rate of the i-1th round and the reference merging rate; i is an integer greater than 1; wherein, if the population merging rate of the i-1th round is greater than the reference merging rate, the merging threshold of the i-1th round is increased as the merging threshold of the i-1th round; if the population merging rate of the i-1th round is less than the reference merging rate, the merging threshold of the i-1th round is reduced as the merging threshold of the i-1th round; if the population merging rate of the i-1th round is equal to the reference merging rate, the merging threshold of the i-1th round is used as the merging threshold of the i-1th round.
[0083] In a possible implementation, the setting module 304 is further used to set the number of grid divisions in each dimension based on the classification width of the customer in each dimension; the determination module 303 is further used to convert each customer into a spatial point within the grid according to the attribute values of each customer in multiple dimensions; and determine whether the first population and the second population are located in the same grid or adjacent grids.
[0084] In a possible implementation, the determination module 303 is also used to determine the center of mass distance between the center of mass of the first population and the center of mass of the second population; determine the population distance between the first population and the second population based on the center of mass distance, the maximum width of the first population, and the maximum width of the second population; and determine that the population distance is less than a distance threshold.
[0085] In a possible implementation, the group classification requirement includes that the number of merging rounds is greater than a preset number of stopping merging rounds, and the merging threshold is less than a preset minimum merging threshold.
[0086] In a possible implementation, the preset minimum merging threshold is determined according to the merging threshold of the current merging round, the merging threshold of the previous merging round, and a multiple of the preset threshold.
[0087] The setting module 304 is also used to set the number of grid divisions in each dimension under the first round of population merging based on the classification width of the customer in each dimension; the determination module 303 is also used to update the number of grid divisions in each dimension corresponding to the i+1th round of population merging according to the number of grid divisions in each dimension corresponding to the i-th round of population merging, the number of populations before the i-th round of population merging, and the number of populations after the i-th round of population merging, where i is an integer greater than 1.
[0088] In a possible implementation, the determination module 303 is also used to determine the similarity between the first population and the second population, and the discreteness between the first population and the second population based on the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions; the similarity represents the degree of similarity between customers between populations, and the discreteness represents the degree of discreteness between customers between populations; and the population connectivity between the first population and the second population is determined based on the similarity and the discreteness.
[0089] In a possible implementation, the similarity includes relative interconnectivity and relative proximity; the relative interconnectivity is determined based on the sum of the inter-population customer distances between any first customer and any second customer, the sum of the customer distances within the first group, and the sum of the customer distances within the second group; the relative proximity is determined based on the average of the sum of the inter-population customer distances between any first customer and any second customer, the average of the sum of the customer distances within the first group, and the average of the sum of the customer distances within the second group; the discreteness is determined based on the inter-population customer distance and the inter-population customer average distance between any first customer and any second customer.
[0090] Figure 4 A schematic diagram of a structure of a customer group classification device 4000 provided in an embodiment of the present application. Figure 4As shown, it includes at least one processor 401 and a memory 402 connected to the at least one processor 401. The specific connection medium between the processor 401 and the memory 402 is not limited in the embodiment of the present application. Figure 4 For example, the processor 401 and the memory 402 are connected via a bus. The bus can be divided into an address bus, a data bus, a control bus, etc.
[0091] In the embodiment of the present application, the memory 402 stores instructions that can be executed by at least one processor 401 , and the at least one processor 401 can implement the steps of the above-mentioned customer group classification method by executing the instructions stored in the memory 402 .
[0092] The processor 401 is the control center of the computer device, and can use various interfaces and lines to connect various parts of the computer device, and perform resource settings by running or executing instructions stored in the memory 402 and calling data stored in the memory 402. Optionally, the processor 401 may include one or more processing units, and the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401. In some embodiments, the processor 401 and the memory 402 may be implemented on the same chip, and in some embodiments, they may also be implemented separately on independent chips.
[0093] Processor 401 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit (ASIC), a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, and can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. A general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware processor for execution, or can be executed by a combination of hardware and software modules in the processor.
[0094] The memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules. The memory 402 may include at least one type of storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (Random Access Memory, RAM), a static random access memory (Static Random Access Memory, SRAM), a programmable read-only memory (Programmable Read Only Memory, PROM), a read-only memory (Read Only Memory, ROM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, EEPROM), a magnetic memory, a disk, an optical disk, etc. The memory 402 is any other medium that can be used to carry or store a desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 402 in the embodiment of the present application can also be a circuit or any other device that can realize a storage function, for storing program instructions and / or data.
[0095] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.
[0096] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0097] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0099] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A customer group classification method, characterized in that: The method comprises: According to the attribute values of each customer in the customer group in multiple dimensions, the customer group is initially divided into populations to obtain N populations; Based on the attribute values of each customer in each population in multiple dimensions, multiple rounds of population merging are performed on the N populations until M populations that meet the group classification requirements are obtained; wherein any round of population merging is performed in the following manner: Based on the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions, the population connectivity between the first population and the second population is determined; if the population connectivity meets the merging threshold, the first population and the second population are merged; the population connectivity is determined based on the distance between the attribute values of any first customer and any second customer in the multiple dimensions; the merging threshold is determined based on the merging threshold of the previous round and the population merging rate of the previous round; the population merging rate of any round is determined based on the population size before the population merging in that round and the population size after the population merging in that round.
2. The method according to claim 1, characterized in that Before performing multiple rounds of population merging on the N populations, the method further includes: Setting an initial merging threshold and a reference merging rate; the reference merging rate is determined based on the business classification attributes of the customer group; The merging threshold is determined based on the merging threshold of the previous round and the population merging rate of the previous round, including: The merging threshold for the first round of population merging is set to the initial merging threshold; The merging threshold of the population merging in the i-th round is adjusted based on the population merging rate in the i-1th round and the reference merging rate; i is an integer greater than 1; If the population merging rate in the i-1th round is greater than the reference merging rate, the merging threshold in the i-1th round is increased as the merging threshold in the i-th round; If the population merging rate in the i-1th round is less than the reference merging rate, the merging threshold in the i-1th round is reduced as the merging threshold in the i-th round; If the population merging rate in the i-1th round is equal to the reference merging rate, the merging threshold in the i-1th round is used as the merging threshold in the i-th round.
3. The method according to claim 1, characterized in that Before determining the population connectivity between the first population and the second population, the method further includes: Set the number of grid divisions for each dimension based on the customer's classification width in each dimension; According to the attribute values of each customer in multiple dimensions, each customer is converted into a spatial point in the grid; It is determined that the first population and the second population are located in the same grid or adjacent grids.
4. The method according to claim 3, characterized in that: After determining that the first population and the second population are located in the same grid or adjacent grids, and before determining the population connectivity between the first population and the second population, the method further includes: determining a centroid distance between a centroid of the first population and a centroid of the second population; Determine a population distance between the first population and the second population based on the centroid distance, the maximum width of the first population, and the maximum width of the second population; It is determined that the population distance is less than a distance threshold.
5. The method according to claim 1, characterized in that The group classification requirements include that the number of merging rounds is greater than a preset stop merging round number, and the merging threshold is less than a preset minimum merging threshold.
6. The method according to claim 5, characterized in that The preset minimum merging threshold is determined according to the merging threshold of the current merging round, the merging threshold of the previous merging round and a preset threshold multiple.
7. The method according to any one of claims 1 to 6, characterized in that Determining the population connectivity between the first population and the second population based on the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions includes: Based on the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions, determine the similarity between the first population and the second population, and the discreteness between the first population and the second population; the similarity represents the degree of similarity between customers between the populations, and the discreteness represents the degree of discreteness between customers between the populations; The population connectivity between the first population and the second population is determined according to the similarity and the discreteness.
8. The method according to claim 7, characterized in that The similarity includes relative interconnectivity and relative proximity; The relative interconnectedness is determined based on the sum of the inter-population customer distances between any first customer and any second customer, the sum of the intra-population customer distances of the first customer, and the sum of the intra-population customer distances of the second customer; The relative proximity is determined based on the average of the sum of the inter-population customer distances between any first customer and any second customer, the average of the sum of the customer distances within the first population, and the average of the sum of the customer distances within the second population; The discreteness is determined based on the inter-population customer distance and the inter-population customer average distance between any first customer and any second customer.
9. A customer group classification device, characterized in that: The device comprises: A partitioning module, used to perform initial population partitioning on the customer group according to the attribute values of each customer in the customer group in multiple dimensions, to obtain N populations; The merging module performs multiple rounds of population merging on the N populations based on the attribute values of each customer in each population in multiple dimensions until M populations that meet the group classification requirements are obtained; wherein any round of population merging is performed in the following manner: A determination module is used to determine the population connectivity between the first population and the second population based on the attribute values of each first customer in the first population in multiple dimensions and the attribute values of each second customer in the second population in multiple dimensions; the merging module is specifically used to merge the first population and the second population if the population connectivity meets the merging threshold; the population connectivity is determined based on the distance between the attribute values of any first customer and any second customer in the multiple dimensions; the merging threshold is determined based on the merging threshold of the previous round and the population merging rate of the previous round; the population merging rate of any round is determined based on the population size before the population merging in that round and the population size after the population merging in that round.
10. A customer group classification device, characterized in that: include: Memory, used to store computer programs or instructions; A processor, configured to call a computer program or instruction stored in the memory to execute the method according to any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and when a computer reads and executes the instructions, the computer executes the method according to any one of claims 1 to 8.
12. A computer program product, characterized in that include: The computer program product stores instructions, and when a computer reads and executes the instructions, the computer executes the method according to any one of claims 1 to 8.