User clustering method and apparatus, computer device, and storage medium

By setting iteration termination conditions and adaptive scaling factors, and optimizing the initial cluster centers using genetic mutation processing, the inaccuracy problem caused by random selection of cluster centers in existing technologies is solved, and higher accuracy of clustering results is achieved.

CN116821720BActive Publication Date: 2025-12-16INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310709966.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-15
Publication Date
2025-12-16
Estimated Expiration
2043-06-15

AI Technical Summary

Technical Problem

Existing clustering algorithms randomly select initial cluster centers, leading to inaccurate clustering results.

Method used

By setting an iteration termination condition, iterative optimization is performed based on the fitness of the initial cluster centers. The optimal cluster centers are determined by using an adaptive scaling factor and genetic mutation processing.

Benefits of technology

The accuracy of clustering results has been improved by continuously iterating and optimizing the cluster centers to determine the optimal cluster centers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116821720B_ABST
    Figure CN116821720B_ABST
Patent Text Reader

Abstract

The application relates to a user clustering method and device, computer equipment and a storage medium, and relates to the technical field of big data. The method comprises the following steps: in the case that the fitness of each initial clustering center does not meet an iteration end condition, determining a target clustering center needing mutation and other clustering centers not needing mutation from each initial clustering center according to the fitness of each initial clustering center; performing genetic mutation processing on the target clustering center according to an adaptive scaling factor, the target clustering center and the other clustering centers, to obtain a next clustering center corresponding to the target clustering center; taking the next clustering center and the other clustering centers as new initial clustering centers, returning to perform the operation of clustering a user set to be clustered based on each initial clustering center until the iteration end condition is met, and outputting a clustering result of the user set. The application improves the stability of clustering and the accuracy of the clustering result.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of big data, in particular to a user clustering method and device, computer equipment and storage medium, which can be applied to the financial field or other technical fields. BACKGROUND

[0002] With the continuous improvement of people's living standards, people's demand for financial products, financial products, pension products and bond products is increasing. In the process of promoting these products to users, the users need to be clustered first, and the corresponding products are promoted to the users according to the categories of the user's customer groups. Among them, the clustering algorithm is usually used to cluster users to obtain the result of the user's customer group.

[0003] As an important branch of the technical field of big data, the clustering algorithm has been widely used in many fields. However, the existing clustering algorithm is randomly selected when selecting the initial clustering center, which is difficult to accurately obtain the clustering center, and thus will directly affect the accuracy of the final clustering result.

[0004] Therefore, how to improve the accuracy of the clustering result has become a technical problem to be solved. SUMMARY

[0005] Therefore, it is necessary to provide a user clustering method and device, computer equipment and storage medium capable of improving the accuracy of the clustering result in view of the above technical problems.

[0006] In a first aspect, the present application provides a user clustering method. The method comprises:

[0007] Based on at least two initial clustering centers, the user set is clustered according to the user characteristics of each user in the user set to be clustered, and the fitness of each initial clustering center is determined;

[0008] If the fitness of each initial clustering center does not meet the iteration end condition, the target clustering center that needs to be mutated and the other clustering centers that do not need to be mutated are determined from each initial clustering center according to the fitness of each initial clustering center;

[0009] According to the adaptive scaling factor, the target clustering center and the other clustering centers, the target clustering center is subjected to genetic mutation processing to obtain the next clustering center corresponding to the target clustering center; wherein the adaptive scaling factor is determined according to the basic scaling factor and the fitness of each initial clustering center;

[0010] The next clustering center and the other clustering centers are taken as new initial clustering centers, and the operation of clustering the user set according to the user features of each user in the user set to be clustered based on each initial clustering center is performed again until the fitness of each initial clustering center meets the iteration end condition, and a clustering result of the user set is output.

[0011] In one of the embodiments, the method further comprises:

[0012] A scaling factor coefficient is determined according to the fitness of each initial clustering center.

[0013] The product of the scaling factor coefficient and the base scaling factor is taken as the adaptive scaling factor.

[0014] In one of the embodiments, the determining of the scaling factor coefficient according to the fitness of each initial clustering center comprises:

[0015] The initial clustering center with the maximum fitness among the initial clustering centers is taken as a target individual.

[0016] The sum of the fitness of each initial clustering center is taken as a first numerical value.

[0017] The product of the number of initial clustering centers and the fitness of the target individual is taken as a second numerical value.

[0018] The ratio between the first numerical value and the second numerical value is taken as the scaling factor coefficient.

[0019] In one of the embodiments, the determining of the target clustering center that needs to be mutated and the other clustering centers that do not need to be mutated from the initial clustering centers according to the fitness of each initial clustering center comprises:

[0020] At least two standby clustering centers are selected from the initial clustering centers.

[0021] Each of the standby clustering centers is combined with another to obtain a clustering group.

[0022] The standby clustering center in the clustering group that needs to be mutated is determined according to the comparison result between the fitness of the two standby clustering centers in the clustering group.

[0023] The standby clustering center in the clustering group that needs to be mutated is taken as the target clustering center, and the clustering centers in the initial clustering centers other than the target clustering center are taken as the other clustering centers that do not need to be mutated.

[0024] In one of the embodiments, the genetic mutation processing of the target cluster center according to the adaptive scaling factor, the target cluster center and the other cluster centers to determine the next cluster center corresponding to the target cluster center comprises:

[0025] The genetic mutation processing of the target cluster center according to the adaptive scaling factor, the target cluster center and the associated cluster center to obtain the mutated cluster center of the target cluster center, wherein the associated cluster center is a cluster center belonging to the same cluster group as the target cluster center in the other cluster centers;

[0026] The next cluster center corresponding to the target cluster center is determined from the target cluster center and the mutated cluster center.

[0027] In one of the embodiments, the genetic mutation processing of the target cluster center according to the adaptive scaling factor, the target cluster center and the associated cluster center to obtain the mutated cluster center of the target cluster center comprises:

[0028] Based on the difference between the target cluster center and the associated cluster center, a random function is used to generate a random number;

[0029] The product of the adaptive scaling factor and the random number is taken as a third value;

[0030] The sum of the third value and the target cluster center is taken as the mutated cluster center of the target cluster center.

[0031] In one of the embodiments, the next cluster center corresponding to the target cluster center is determined from the target cluster center and the mutated cluster center, comprising:

[0032] The fitness of the target cluster center and the mutated cluster center is compared;

[0033] If the fitness of the target cluster center is greater than or equal to the fitness of the mutated cluster center, the target cluster center is taken as the next cluster center corresponding to the target cluster center;

[0034] If the fitness of the target cluster center is less than the fitness of the mutated cluster center, the mutated cluster center is taken as the next cluster center corresponding to the target cluster center.

[0035] In one of the embodiments, the clustering of the user set according to the user feature of each user in the user set to be clustered and the determination of the fitness of each initial cluster center based on at least two initial cluster centers comprises:

[0036] cluster the user set according to the user feature of each user in the user set to be clustered based on the at least two initial clustering centers, to obtain a clustering result corresponding to each initial clustering center;

[0037] determine the fitness of each initial clustering center according to the distance between each user in each clustering result and the corresponding initial clustering center.

[0038] In one embodiment, the clustering the user set according to the user feature of each user in the user set to be clustered based on the at least two initial clustering centers, to obtain a clustering result corresponding to each initial clustering center, comprises:

[0039] obtain a feature weight vector corresponding to the user feature of each user in the user set; wherein the user feature comprises an identity dimension feature and / or an asset dimension feature;

[0040] determine the distance between each initial clustering center and each user according to the feature weight vector, the user feature of each user in the user set, and each initial clustering center;

[0041] cluster the user set according to the distance between each initial clustering center and each user, to obtain a clustering result corresponding to each initial clustering center.

[0042] In a second aspect, the present application further provides a user clustering device. The device comprises:

[0043] a clustering module, configured to cluster the user set according to the user feature of each user in the user set to be clustered based on the at least two initial clustering centers, and determine the fitness of each initial clustering center;

[0044] a judging module, configured to judge whether the fitness of each initial clustering center meets an iteration end condition, and if yes, output the running result, and if not, run an iteration module;

[0045] the iteration module, configured to determine a target clustering center needing mutation and other clustering centers not needing mutation from the initial clustering centers according to the fitness of each initial clustering center;

[0046] the iteration module is further configured to perform genetic mutation processing on the target clustering center according to an adaptive scaling factor, the target clustering center and the other clustering centers, to obtain a next clustering center corresponding to the target clustering center; wherein the adaptive scaling factor is determined according to a basic scaling factor and the fitness of each initial clustering center;

[0047] the iteration module is further configured to take the next clustering center and the other clustering centers as new initial clustering centers, and return to run the clustering module.

[0048] an output module configured to output a clustering result of the user set if the fitness of each initial clustering center meets the iteration end condition.

[0049] In a third aspect, the present application provides a computer device. The computer device comprises a memory and a processor. The memory stores a computer program. The processor implements the following steps when executing the computer program:

[0050] clustering the user set based on the user features of each user in the user set to be clustered according to at least two initial clustering centers, and determining the fitness of each initial clustering center;

[0051] if the fitness of each initial clustering center does not meet the iteration end condition, determining a target clustering center that needs to be mutated and other clustering centers that do not need to be mutated from the initial clustering centers according to the fitness of each initial clustering center;

[0052] performing genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center and the other clustering centers, to obtain a next clustering center corresponding to the target clustering center; wherein the adaptive scaling factor is determined according to a basic scaling factor and the fitness of each initial clustering center;

[0053] taking the next clustering center and the other clustering centers as new initial clustering centers, and returning to perform the operation of clustering the user set based on the user features of each user in the user set to be clustered according to at least two initial clustering centers, until the fitness of each initial clustering center meets the iteration end condition, and outputting a clustering result of the user set.

[0054] In a fourth aspect, the present application provides a computer readable storage medium. The computer readable storage medium stores a computer program. The computer program is executed by a processor to implement the following steps:

[0055] clustering the user set based on the user features of each user in the user set to be clustered according to at least two initial clustering centers, and determining the fitness of each initial clustering center;

[0056] if the fitness of each initial clustering center does not meet the iteration end condition, determining a target clustering center that needs to be mutated and other clustering centers that do not need to be mutated from the initial clustering centers according to the fitness of each initial clustering center;

[0057] According to the adaptive scaling factor, the target clustering center and the other clustering centers, a genetic mutation process is performed on the target clustering center to obtain a next clustering center corresponding to the target clustering center; wherein the adaptive scaling factor is determined according to a basic scaling factor and the fitness of each initial clustering center;

[0058] The next clustering center and the other clustering centers are taken as new initial clustering centers, and the operation of clustering the user set according to the user feature of each user in the user set to be clustered based on each initial clustering center is performed again until the fitness of each initial clustering center meets the iteration end condition, and a clustering result of the user set is output.

[0059] In a fifth aspect, the present application further provides a computer program product. The computer program product comprises a computer program which, when executed by a processor, implements the following steps:

[0060] Based on at least two initial clustering centers, the user set is clustered according to the user feature of each user in the user set to be clustered, and the fitness of each initial clustering center is determined;

[0061] If the fitness of each initial clustering center does not meet the iteration end condition, a target clustering center needing mutation and other clustering centers not needing mutation are determined from each initial clustering center according to the fitness of each initial clustering center;

[0062] According to the adaptive scaling factor, the target clustering center and the other clustering centers, a genetic mutation process is performed on the target clustering center to obtain a next clustering center corresponding to the target clustering center; wherein the adaptive scaling factor is determined according to a basic scaling factor and the fitness of each initial clustering center;

[0063] The next clustering center and the other clustering centers are taken as new initial clustering centers, and the operation of clustering the user set according to the user feature of each user in the user set to be clustered based on each initial clustering center is performed again until the fitness of each initial clustering center meets the iteration end condition, and a clustering result of the user set is output.

[0064] The user clustering method, device, computer device and storage medium, by setting the iteration end condition, in the case that the fitness of each initial clustering center does not meet the iteration end condition, the position of the initial clustering center is iteratively optimized, that is, the initial clustering center that needs to be mutated is determined according to the relationship between the fitness of the initial clustering center, and then the target clustering center is subjected to genetic mutation processing according to the adaptive scaling factor, the target clustering center and the other clustering centers, the next clustering center corresponding to the target clustering center is determined, the next clustering center and the other clustering centers are taken as new initial clustering centers, the user set is continuously clustered, and then the best clustering result after the user set is clustered multiple times is obtained. Compared with the prior art which clusters users by using fixed and unchanged clustering centers selected randomly, the above scheme considers the influence of clustering center selection on the clustering result, iteratively optimizes the clustering center, determines the best clustering center, and then improves the accuracy of the clustering result. BRIEF DESCRIPTION OF DRAWINGS

[0065] Figure 1 An application environment diagram of a user clustering method in an embodiment;

[0066] Figure 2 A flowchart of a user clustering method in an embodiment;

[0067] Figure 3 A flowchart of determining an adaptive scaling factor in an embodiment;

[0068] Figure 4 A flowchart of determining a clustering center that needs to be mutated in an embodiment;

[0069] Figure 5 A flowchart of determining a next clustering center in an embodiment;

[0070] Figure 6 A flowchart of clustering a user set in an embodiment;

[0071] Figure 7 A flowchart of a user clustering method in another embodiment;

[0072] Figure 8 A structural block diagram of a user clustering device in an embodiment;

[0073] Figure 9 A structural block diagram of a user clustering device in another embodiment;

[0074] Figure 10 An internal structure diagram of a computer device in an embodiment. DETAILED DESCRIPTION

[0075] In order to make the purposes, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and not intended to limit the present application.

[0076] The user clustering method provided by the embodiments of the present application can be applied to a situation where users need to be clustered so as to push various products to the users according to the clustering results of the users, for example, a situation where a pension product is pushed to the users according to the clustering results of the users. The present application can be applied to an application environment as shown in Figure 1 . In the application environment, the terminal 102 communicates with the server 104 through a network. For example, the server 104 clusters a user set according to the user features of each user in the user set to be clustered based on at least two initial clustering centers, and determines the fitness of each initial clustering center; if the fitness of each initial clustering center does not satisfy an iteration end condition, the target clustering center that needs to be mutated and the other clustering centers that do not need to be mutated are determined from the initial clustering centers according to the fitness of each initial clustering center; the target clustering center is subjected to genetic mutation processing according to an adaptive scaling factor, the target clustering center and the other clustering centers, to obtain a next clustering center corresponding to the target clustering center; the adaptive scaling factor is determined according to a basic scaling factor and the fitness of each initial clustering center; the next clustering center and the other clustering centers are taken as new initial clustering centers, and the operation of clustering the user set according to the user features of each user in the user set to be clustered based on the initial clustering centers is performed again until the fitness of each initial clustering center satisfies the iteration end condition, and the clustering result of the user set is output to the terminal 102. A data storage system can store data required to be processed by the server 104, such as the user set to be clustered, the basic scaling factor and the adaptive scaling factor. The data storage system can be integrated on the server 104, or placed on a cloud or other network server. The terminal 102 can be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart televisions, smart air conditioners, smart vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.

[0077] In one embodiment, as shown in Figure 2 , a user clustering method is provided. The method is applied to a server in Figure 1 for example, and includes the following steps:

[0078] S202, clustering the user set according to the user feature of each user in the user set to be clustered based on the at least two initial clustering centers, and determining the fitness of each initial clustering center.

[0079] wherein the initial clustering center is a point used to represent a position center of a certain customer group, and the initial clustering center can be obtained by random selection. Optionally, each initial clustering center can be represented by a vector of a set dimension; further, the initial clustering center and the user feature of each user in the user set belong to the same dimension vector.

[0080] The user feature can include multiple dimension features of the user, and the dimension feature can be an identity dimension feature and / or an asset dimension feature. The identity dimension feature is used to describe the identity information of the user, and the asset dimension feature is used to describe the holding or transaction information of the asset of the user.

[0081] Optionally, the identity dimension feature can be a gender code, an age segment, an education level code, a tenure, a marital status code, a profession code, a unit type code, a home region, and a unit name, etc. The asset dimension feature can be a point-in-time asset, a fund holding flag, a bond holding flag, a deposit balance, an insurance balance, a fixed deposit balance, a current deposit balance, a cross-bank transfer inflow amount, an intra-bank financing inflow amount, a third-party payment inflow amount, other inflow amount, a silver certificate silver period silver business outflow amount, a cash deposit and withdrawal outflow amount, a total transaction number, and a total transaction amount, etc.

[0082] For example, in the embodiment, for each user, the identity information or the asset information of the user is encoded according to a preset encoding manner to obtain the multi-dimension feature of the user; further, the multi-dimension feature of the user can be spliced according to a set order to construct a feature vector; that is, the user feature of each user can be represented by a feature vector.

[0083] Specifically, clustering the user set according to the user feature of each user in the user set to be clustered based on the at least two initial clustering centers, and determining the fitness of each initial clustering center, includes: clustering the user set according to the user feature of each user in the user set to be clustered based on the at least two initial clustering centers to obtain the clustering result corresponding to each initial clustering center; and determining the fitness of each initial clustering center according to the distance between each user in each clustering result and the corresponding initial clustering center. For example, at least two initial clustering centers can be randomly selected, and each user in the user set can be divided into the customer group corresponding to the associated initial clustering center based on the distance between the user feature of each user in the user set to be clustered and each initial clustering center, that is, the clustering result corresponding to each initial clustering center is obtained. Further, the fitness of each initial clustering center is determined according to the distance between each user in each clustering result and the corresponding initial clustering center.

[0084] wherein the initial clustering center corresponding to the user is the initial clustering center corresponding to the clustering result to which the user belongs.

[0085] Specifically, the fitness of each initial clustering center can be determined according to the distance between each user in the clustering result corresponding to the initial clustering center and the initial clustering center. For each initial clustering center, the distance between each user in the clustering result corresponding to the initial clustering center and the initial clustering center can be calculated. Further, the reciprocal of the sum of the distances between each user in the clustering result corresponding to the initial clustering center and the initial clustering center is taken as the fitness of the initial clustering center. That is, the fitness of the initial clustering center can be determined by the following formula (1):

[0086]

[0087] wherein OF(Y j ) is the fitness of the initial clustering center Y j , C j is the clustering result of the jth initial clustering center Y j , X i is the user feature of the user in the clustering result C i , w m is the mth feature of the feature weight vector w, d is the total number of features in the user feature, X im is the mth feature of the user feature X i , and Y jm is the mth feature of the initial clustering center Y j .

[0088] Optionally, since there is a certain degree of correlation between each feature in the user feature, the Mahalanobis distance can consider the correlation of the data by converting the original data vector into a new linear combination. In order to more accurately calculate the distance between the user feature and the clustering center, the Mahalanobis distance can also be used to calculate the distance between the initial clustering center and the user feature, as shown in the following formula (2):

[0089]

[0090] wherein D M (X i ,Y j ) is the distance between the initial clustering center Y j and the user feature X i , and S -1 is the inverse of the covariance matrix.

[0091] It should be noted that, when the Mahalanobis distance is used to calculate the distance between the initial clustering center and the user feature, the user feature contains at least two features, and the covariance matrix of the user feature is not a singular matrix.

[0092] In S204, it is judged whether the fitness of each initial clustering center meets the iteration end condition. If yes, S212 is executed; if not, S206 is executed.

[0093] The iteration end condition includes that the fitness of each initial clustering center is greater than or equal to a preset threshold. That is, if the fitness of a certain initial clustering center is less than the preset threshold, the iteration step is executed, which is S206 to S210. Optionally, the value of the preset threshold in the embodiment can be set arbitrarily, and the present application does not make a specific limitation thereto.

[0094] In S206, according to the fitness of each initial clustering center, a target clustering center that needs to be mutated and other clustering centers that do not need to be mutated are determined from the initial clustering centers.

[0095] Optionally, the target clustering center that needs to be mutated and the other clustering centers can be determined from the initial clustering centers by comparing the numerical values of the fitness of each initial clustering center.

[0096] In S208, according to the adaptive scaling factor, the target clustering center and the other clustering centers, the genetic mutation processing is performed on the target clustering center to obtain the next clustering center corresponding to the target clustering center.

[0097] The adaptive scaling factor is determined according to the base scaling factor and the fitness of each initial clustering center. The base scaling factor can be a constant value set freely, or the base scaling factor is a random number between 0 and 1. The adaptive scaling factor of the present application is affected by the fitness of each initial clustering center, which can ensure that the genetic mutation processing obtains a mutated clustering center with higher fitness with a higher probability.

[0098] Optionally, the next clustering center corresponding to the target clustering center can be determined by determining the mutation probability of the target clustering center according to the adaptive scaling factor, the target clustering center and the other clustering centers, and then determining the next clustering center corresponding to the target clustering center according to the target clustering center and the mutation probability.

[0099] Optionally, in the case that the target clustering center is at least two, a multi-threaded manner can be used to allocate a thread to each target clustering center. Each thread performs the operation of performing the genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center and the other clustering centers, and obtains the next clustering center corresponding to each target clustering center by executing the result of each thread, so as to improve the efficiency of the genetic mutation processing on the at least two target clustering centers.

[0100] S210, taking the next clustering center and the other clustering centers as new initial clustering centers, and returning to perform S202.

[0101] Specifically, the next clustering center and the other clustering centers are taken as new initial clustering centers, and based on the new initial clustering centers, the operation of clustering the user set according to the user features of each user in the user set to be clustered is continued to be performed.

[0102] S212, outputting the clustering result of the user set.

[0103] The clustering result of the user set is outputted, which is the final clustering result of the user set to be clustered.

[0104] In the above user clustering method, by setting the iteration end condition, in the case that the fitness of each initial clustering center does not meet the iteration end condition, the position of the initial clustering center is iteratively optimized, that is, the target clustering center is subjected to genetic mutation processing according to the adaptive scaling factor, the target clustering center and the other clustering centers, to obtain the next clustering center corresponding to the target clustering center, the next clustering center and the other clustering centers are taken as new initial clustering centers, and the user set is continued to be clustered, and then the best clustering result after multiple clustering of the user set is obtained. Considering the influence of clustering center selection on the clustering result, the genetic algorithm is used to iteratively optimize the clustering center to determine the best clustering center, thereby improving the accuracy of the clustering result.

[0105] It should be noted that, in order to obtain a mutation clustering center with high fitness in the genetic mutation processing process, the fitness of each initial clustering center is referred to for genetic mutation processing of the target initial clustering center. Specifically, the present embodiment provides an optional way of determining an adaptive scaling factor, which can determine an adaptive scaling factor affecting genetic mutation processing according to a basic scaling factor and the fitness of each initial clustering center. See the specific description of the following S302. Figure 3

[0106] As shown in Figure 3 , the above method can further include the following steps:

[0107] S302, determining a scaling factor coefficient according to the fitness of each initial clustering center.

[0108] Optionally, the scaling factor coefficient is determined according to the fitness of each initial clustering center, including: taking the initial clustering center with the highest fitness in each initial clustering center as a target individual; taking the sum of the fitness of each initial clustering center as a first value; taking the product of the number of each initial clustering center and the fitness of the target individual as a second value; and taking the ratio between the first value and the second value as the scaling factor coefficient. ​

[0109] Optionally, the scaling factor coefficient is determined by the following formula (3):

[0110]

[0111] wherein, a is the scaling factor coefficient; OF(Y i ) is the fitness of the i th initial clustering center Y i ; OF(Y best ) is the fitness of the target individual; c is a constant, and the time and speed of the genetic mutation process can be controlled by controlling the size of c; k is the number of initial clustering centers.

[0112] S304, multiplying the scaling factor coefficient and the base scaling factor to obtain an adaptive scaling factor.

[0113] Optionally, the adaptive scaling factor is determined by the following formula (4):

[0114] F adapt = aF base (4)

[0115] wherein, F adapt is the adaptive scaling factor; F base is the base scaling factor.

[0116] It should be noted that in the process of updating the clustering center, determining the clustering center that needs to be mutated is a necessary means, and there are many ways to determine the clustering center that needs to be mutated. The embodiment provides an optional way of determining the clustering center that needs to be mutated. The target clustering center that needs to be mutated and the other clustering centers that do not need to be mutated can be determined from each initial clustering center according to the fitness of each initial clustering center. As shown in Figure 4 the implementation process includes the following steps:

[0117] S402, selecting at least two standby clustering centers from each initial clustering center.

[0118] Specifically, at least two standby clustering centers can be randomly selected from all initial clustering centers. For example, there are a total of 5 initial clustering centers, which are a first initial clustering center, a second initial clustering center, a third initial clustering center, a fourth initial clustering center and a fifth initial clustering center. Three initial clustering centers are randomly selected from all initial clustering centers, which are the first initial clustering center, the third initial clustering center and the fifth initial clustering center. The first initial clustering center, the third initial clustering center and the fifth initial clustering center are used as standby clustering centers.

[0119] S404, combining each standby clustering center in pairs to obtain a clustering group.

[0120] Specifically, taking the first initial clustering center, the third initial clustering center and the fifth initial clustering center as the backup clustering centers as an example, the two-by-two combination of the backup clustering centers can include the combination of the first initial clustering center and the fifth initial clustering center, the combination of the first initial clustering center and the third initial clustering center, and the combination of the third initial clustering center and the fifth initial clustering center, and then three clustering groups are obtained.

[0121] S406, determining the backup clustering center in the clustering group that needs to be mutated according to the comparison result between the fitness of the two backup clustering centers in the clustering group.

[0122] Specifically, taking the clustering group composed of the first initial clustering center and the fifth initial clustering center as an example, the fitness between the first initial clustering center and the fifth initial clustering center is compared, and the rule of genetic mutation can be that the one with smaller fitness needs to be mutated. In the case that the fitness of the first initial clustering center is smaller than the fitness of the fifth initial clustering center, the first initial clustering center is determined as the backup clustering center that needs to be mutated, and the fifth initial clustering center is determined as the backup clustering center that does not need to be mutated.

[0123] S408, taking the backup clustering center in the clustering group that needs to be mutated as the target clustering center, and taking the clustering center in each initial clustering center except the target clustering center as the other clustering center that does not need to be mutated.

[0124] Specifically, taking the first initial clustering center as the backup clustering center that needs to be mutated and the fifth initial clustering center as the backup clustering center that does not need to be mutated as an example, the first initial clustering center is taken as the target clustering center and the fifth initial clustering center is taken as the other clustering center.

[0125] It should be noted that the embodiment determines the initial clustering center that needs to be mutated by comparing the relationship between the fitness of the initial clustering center, which facilitates subsequent updating of the clustering center and improves the iteration efficiency of the clustering center.

[0126] It should be noted that the selection of the clustering center directly affects the accuracy of the clustering result, and in order to obtain a clustering result with higher accuracy, the best clustering center needs to be accurately determined. Alternatively, there are various ways to update the clustering center, and the embodiment provides one of the ways to update the clustering center. The specific description can be referred to the following embodiments.

[0127] On the basis of the above-mentioned embodiments, the embodiment provides an optional way to determine the next clustering center, that is, to further explain S208 in detail. As shown in FIG. 5, the implementation process includes the following steps:

[0128] S502, performing genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center and the associated clustering center, to obtain a mutated clustering center of the target clustering center.

[0129] The associated clustering center is a clustering center in other clustering centers that belongs to the same clustering group as the target clustering center.

[0130] Optionally, the genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center and the associated clustering center, to obtain a mutated clustering center of the target clustering center, comprises: generating a random number based on a difference between the target clustering center and the associated clustering center by using a random function; taking a product of the adaptive scaling factor and the random number as a third value; and taking a sum of the third value and the target clustering center as the mutated clustering center of the target clustering center.

[0131] Optionally, the mutated clustering center of the target clustering center is determined by the following formula (5):

[0132] Y i+1 = Y i +F adapt ×rand(Y i -Y j ) 2 (5)

[0133] Y i+1 is the mutated clustering center of the target clustering center; Y i is the target clustering center; rand(Y i -Y j ) 2 is a random number generated based on a difference between the target clustering center and the associated clustering center by using a random function; and Y j is the associated clustering center.

[0134] S504, determining a next clustering center corresponding to the target clustering center from the target clustering center and the mutated clustering center.

[0135] Optionally, the next clustering center corresponding to the target clustering center can be determined from the target clustering center and the mutated clustering center according to the fitness values. For example, the next clustering center corresponding to the target clustering center is determined from the target clustering center and the mutated clustering center, including: comparing the fitness values of the target clustering center and the mutated clustering center; if the fitness value of the target clustering center is greater than or equal to the fitness value of the mutated clustering center, the target clustering center is taken as the next clustering center corresponding to the target clustering center; and if the fitness value of the target clustering center is less than the fitness value of the mutated clustering center, the mutated clustering center is taken as the next clustering center corresponding to the target clustering center. In this embodiment, the mutated clustering center is not directly taken as the next clustering center, but the clustering center with a higher fitness value is taken as the next clustering center by comparing the fitness values, so that the clustering center with a higher fitness value is allowed to enter the next iteration clustering process, the number of genetic mutation operations is reduced, and thus the efficiency and accuracy of clustering are improved.

[0136] In this embodiment, the target clustering center is subjected to genetic mutation processing to obtain a mutated clustering center of the target clustering center, and the next clustering center corresponding to the target clustering center is determined from the target clustering center and the mutated clustering center. The mutation and selection of the genetic algorithm are used to obtain a clustering center with a higher fitness value, and thus the accuracy of the clustering result is improved.

[0137] For example, based on the above disclosed embodiments, this embodiment provides an optional way of clustering a user set, which can cluster the user set according to the user features of each user in the user set to be clustered based on at least two initial clustering centers to obtain a clustering result corresponding to each initial clustering center. As shown in Figure 6 The specific implementation process includes the following steps:

[0138] In one embodiment, the user set is clustered according to the user features of each user in the user set to be clustered based on at least two initial clustering centers to obtain a clustering result corresponding to each initial clustering center, including:

[0139] S602, obtaining a feature weight vector corresponding to the user features of each user in the user set.

[0140] The user features each include an identity dimension feature and / or an asset dimension feature.

[0141] The user features of each user in the user set each include an identity dimension feature and / or an asset dimension feature, and the feature weight vector includes a weight corresponding to each feature in the user features. The feature weight vector, the initial clustering center, and the user features all belong to the same dimension vector.

[0142] S604, according to the feature weight vector, the user feature of each user in the user set, and each initial clustering center, determine the distance between each initial clustering center and each user.

[0143] Specifically, the distance between the initial clustering center and the user can be calculated by the following formula (6):

[0144]

[0145] wherein W im is the mth element value of the ith weight vector W i , D(X i ,Y j ) is the distance between the ith user X i and the jth initial clustering center Y j , X im is the mth feature of the user X i , and Y jm is the mth feature of the initial clustering center Y j .

[0146] S606, according to the distance between each initial clustering center and each user, clustering the user set to obtain the clustering result corresponding to each initial clustering center.

[0147] Specifically, each user can be divided into the customer group corresponding to the initial clustering center closest to the user to obtain the clustering result corresponding to each initial clustering center.

[0148] It should be noted that, considering the influence of different features on the clustering result, the embodiment introduces the feature weight vector to strengthen the discrimination between data attributes and reduce the influence of abnormal points, thereby improving the effect of subsequent clustering.

[0149] Based on the above disclosed embodiments, the embodiment provides an optional way of data cleaning, which can be performed before clustering the user set to be clustered based on at least two initial clustering centers according to the user feature of each user in the user set to be clustered to obtain the clustering result corresponding to each initial clustering center. The specific implementation process includes the following steps: detecting the user feature of each user in the user set to be clustered to determine the user feature with special values. Data cleaning is performed on the user feature with special values. The special values include at least one of missing values, abnormal values and repeated values.

[0150] Specifically, for each user feature of each user, it can be detected in turn whether the value of a feature in the user feature is a special value, and the feature in the user feature that is the special value is marked to determine the user feature that has the special value. The missing values in the user feature can be filled, and different filling processing can be performed on different types of features, for example, filling "-1" for a flag type feature to mark a missing category, filling "0" for a transaction type feature to represent no transaction, and filling "0" for an asset type or contribution type feature to represent no asset record or no asset. The outliers in the user feature are replaced or deleted, and the repeated values of the same feature in the user feature are deleted.

[0151] It can be understood that, by performing the data cleaning processing on the missing values in the user feature, the embodiment ensures the authenticity of the user feature, and further ensures the smooth progress of the clustering process.

[0152] For example, the embodiment provides an optional implementation process based on the above embodiment, which refers to another flowchart of a user clustering method as shown in Figure 7 The process specifically includes the following steps.

[0153] S702, based on at least two initial clustering centers, clustering the user set to be clustered according to the user feature of each user in the user set to be clustered, to obtain a clustering result corresponding to each initial clustering center.

[0154] S704, determining the fitness of each initial clustering center according to the distance between each user in the clustering result and the corresponding initial clustering center.

[0155] S706, determining whether the fitness of each initial clustering center meets an iteration end condition; if yes, performing S718; if no, performing S708.

[0156] S708, selecting at least two standby clustering centers from the initial clustering centers, combining the standby clustering centers two by two to obtain a clustering group, and determining the standby clustering center that needs to be mutated in the clustering group according to the comparison result between the fitness of the two standby clustering centers in the clustering group.

[0157] S710, taking the standby clustering center that needs to be mutated in the clustering group as a target clustering center, and taking the clustering centers other than the target clustering center in the initial clustering centers as other clustering centers that do not need to be mutated.

[0158] S712, performing genetic mutation processing on the target clustering center according to the self-adaptive scaling factor, the target clustering center and the associated clustering center, to obtain a mutated clustering center of the target clustering center.

[0159] S714, determining the next cluster center corresponding to the target cluster center from the target cluster center and the variant cluster center.

[0160] S716, taking the next cluster center, the associated cluster center and the other cluster centers as new initial cluster centers.

[0161] S718, outputting the clustering result of the user set.

[0162] The specific process of S702-S718 can refer to the description of the method embodiments, and the implementation principle and technical effects are similar, which will not be repeated here.

[0163] It should be understood that, although each step in the flowchart involved in the above embodiments is displayed in sequence according to the arrow, these steps are not necessarily executed in the order indicated by the arrow. Unless otherwise stated herein, the execution of these steps has no strict order limitation, and these steps can be executed in other orders. Moreover, at least part of the steps in the flowchart involved in the above embodiments can include multiple steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be alternately executed with other steps or steps or stages in other steps.

[0164] Based on the same inventive concept, the embodiments of the present application also provide a user clustering device for implementing the above-mentioned user clustering method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more user clustering device embodiments provided below can refer to the limitations of the user clustering method described above, which will not be repeated here.

[0165] In one embodiment, as shown in Figure 8 a user clustering device is provided, comprising

[0166] The clustering module 810 is configured to cluster the user set based on at least two initial cluster centers according to the user features of each user in the user set to be clustered, and determine the fitness of each initial cluster center.

[0167] The judgment module 820 is configured to judge whether the fitness of each initial cluster center meets the iteration end condition, and if so, run the iteration module 830, and if not, run the result output module 840.

[0168] The iteration module 830 is configured to, if the fitness of each initial clustering center does not satisfy the iteration end condition, determine, according to the fitness of each initial clustering center, a target clustering center that needs to be mutated and other clustering centers that do not need to be mutated from the initial clustering centers;

[0169] The iteration module 830 is further configured to perform genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center and the other clustering centers, to obtain a next clustering center corresponding to the target clustering center; wherein the adaptive scaling factor is determined according to the base scaling factor and the fitness of each initial clustering center.

[0170] The iteration module 830 is further configured to take the next clustering center and the other clustering centers as new initial clustering centers, and return to the clustering module.

[0171] The result output module 840 is configured to, if the fitness of each initial clustering center satisfies the iteration end condition, output a clustering result of the user set.

[0172] The above device sets an iteration end condition, and in the case that the fitness of each initial clustering center does not satisfy the iteration end condition, iteratively optimizes the positions of the initial clustering centers, that is, determines the initial clustering center that needs to be mutated according to the relationship between the fitness of the initial clustering centers, performs genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center and the other clustering centers, determines the next clustering center corresponding to the target clustering center, takes the next clustering center and the other clustering centers as new initial clustering centers, continues to cluster the user set, and further obtains the best clustering result after clustering the user set multiple times. Compared with the prior art that clusters users by using fixed and unchanged clustering centers selected randomly, the above scheme considers the influence of the selection of the clustering center on the clustering result, continuously iteratively optimizes the clustering center, determines the best clustering center, and further improves the accuracy of the clustering result.

[0173] In one of the embodiments, the above device further includes a factor determination module, which includes a coefficient determination unit and a factor determination unit;

[0174] The coefficient determination unit is configured to determine a scaling factor coefficient according to the fitness of each initial clustering center.

[0175] The factor determination unit is configured to take the product of the scaling factor coefficient and a base scaling factor as an adaptive scaling factor.

[0176] In one of the embodiments, the above coefficient determination unit includes an individual determination subunit, a first value determination subunit, a second value determination subunit and a coefficient determination subunit.

[0177] The individual determining sub-unit is configured to select an initial clustering center with the maximum fitness as a target individual from the initial clustering centers.

[0178] The first value determining sub-unit is configured to determine a sum of the fitness of each initial clustering center as a first value.

[0179] The second value determining sub-unit is configured to determine a product of the number of each initial clustering center and the fitness of the target individual as a second value.

[0180] The coefficient determining sub-unit is configured to determine a ratio between the first value and the second value as a scaling factor coefficient.

[0181] In one embodiment, the iteration module 830 includes a first determining unit 831, a second determining unit 832, and a third determining unit 833.

[0182] The first determining unit 831 is configured to select at least two standby clustering centers from the initial clustering centers, combine each two standby clustering centers to obtain a clustering group, determine a standby clustering center that needs to be mutated in the clustering group according to a comparison result between the fitness of the two standby clustering centers in the clustering group, and determine a target clustering center from the standby clustering center that needs to be mutated in the clustering group and other clustering centers that do not need to be mutated from the initial clustering centers except the target clustering center.

[0183] The second determining unit 832 is configured to perform genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center, and an associated clustering center to obtain a mutated clustering center of the target clustering center, wherein the associated clustering center is a clustering center in the other clustering centers that belongs to the same clustering group as the target clustering center, and determine a next clustering center corresponding to the target clustering center from the target clustering center and the mutated clustering center.

[0184] The third determining unit 833 is configured to determine the next clustering center and the other clustering centers as new initial clustering centers, and return the clustering module 810.

[0185] In one embodiment, the second determining unit 832 includes a mutation processing sub-unit and a center determining sub-unit.

[0186] The mutation processing sub-unit is configured to generate a random number by using a random function based on a difference between the target clustering center and the associated clustering center, determine a product of the adaptive scaling factor and the random number as a third value, and determine a sum of the third value and the target clustering center as the mutated clustering center of the target clustering center.

[0187] The center determining subunit is configured to compare the fitness of the target cluster center and the mutated cluster center; if the fitness of the target cluster center is greater than or equal to the fitness of the mutated cluster center, the target cluster center is taken as the next cluster center corresponding to the target cluster center; if the fitness of the target cluster center is less than the fitness of the mutated cluster center, the mutated cluster center is taken as the next cluster center corresponding to the target cluster center.

[0188] In one of the embodiments, the clustering module 810 includes a clustering result determining unit and a fitness determining unit.

[0189] The clustering result determining unit is configured to cluster the user set according to the user feature of each user in the user set based on the at least two initial cluster centers, to obtain the clustering result corresponding to each initial cluster center.

[0190] The fitness determining unit is configured to determine the fitness of each initial cluster center according to the distance between each user in the clustering result and the corresponding initial cluster center.

[0191] In one of the embodiments, the clustering result determining unit includes a weight obtaining subunit, a distance determining subunit and a result determining subunit.

[0192] The weight obtaining subunit is configured to obtain a feature weight vector corresponding to the user feature of each user in the user set; wherein, the user feature includes an identity dimension feature and / or an asset dimension feature.

[0193] The distance determining subunit is configured to determine the distance between each initial cluster center and each user in the user set according to the feature weight vector, the user feature of each user in the user set and each initial cluster center.

[0194] The result determining subunit is configured to cluster the user set according to the distance between each initial cluster center and each user, to obtain the clustering result corresponding to each initial cluster center.

[0195] Each module in the user clustering apparatus can be realized by software, hardware and combination thereof in whole or in part. Each module can be embedded in or independent of the processor in the computer device in hardware form, or can be stored in the memory in the computer device in software form, so as to be called and executed by the processor to perform the operation corresponding to each module.

[0196] In one of the embodiments, a computer device is provided, which can be a server, and the internal structure diagram of the computer device can be as shown in Figure 10As shown in the figure. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data such as user set to be clustered, iteration end condition, adaptive scaling factor and basic scaling factor. The network interface of the computer device is used to communicate with the external terminal through the network connection. The computer program is executed by the processor to implement a user clustering method.

[0197] Those skilled in the art can understand that, Figure 10 The structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different component arrangement.

[0198] In one embodiment, a computer device is provided, including a memory and a processor, the memory storing a computer program, and the processor executing the processing logic in the computer program to implement the following steps:

[0199] Based on at least two initial clustering centers, clustering the user set according to the user features of each user in the user set to be clustered, and determining the fitness of each initial clustering center;

[0200] If the fitness of each initial clustering center does not satisfy the iteration end condition, determining the target clustering center that needs to be mutated and the other clustering centers that do not need to be mutated from each initial clustering center according to the fitness of each initial clustering center;

[0201] According to the adaptive scaling factor, the target clustering center and the other clustering centers, performing genetic mutation processing on the target clustering center to obtain the next clustering center corresponding to the target clustering center; wherein the adaptive scaling factor is determined according to the basic scaling factor and the fitness of each initial clustering center;

[0202] Taking the next clustering center and the other clustering centers as new initial clustering centers, and returning to execute the operation of clustering the user set according to the user features of each user in the user set to be clustered based on each initial clustering center until the fitness of each initial clustering center satisfies the iteration end condition, and outputting the clustering result of the user set.

[0203] In one embodiment, the processor further implements the following steps when executing the processing logic in the computer program for determining the scaling factor coefficient according to the fitness of each initial clustering center: determining a target individual as the initial clustering center with the largest fitness among the initial clustering centers; determining a first value as the sum of the fitness of each initial clustering center; determining a second value as the product of the number of initial clustering centers and the fitness of the target individual; and determining the scaling factor coefficient as the ratio between the first value and the second value.

[0204] In one embodiment, the processor further implements the following steps when executing the processing logic in the computer program for determining the scaling factor coefficient according to the fitness of each initial clustering center: determining a target individual as the initial clustering center with the largest fitness among the initial clustering centers; determining a first value as the sum of the fitness of each initial clustering center; determining a second value as the product of the number of initial clustering centers and the fitness of the target individual; and determining the scaling factor coefficient as the ratio between the first value and the second value.

[0205] In one embodiment, the processor further implements the following steps when executing the processing logic in the computer program for determining the target clustering center and the other clustering centers from the initial clustering centers according to the fitness of each initial clustering center: selecting at least two backup clustering centers from the initial clustering centers; combining each two of the backup clustering centers to obtain a clustering group; determining a backup clustering center in the clustering group that needs to be mutated according to a comparison result between the fitness of the two backup clustering centers in the clustering group; and determining the target clustering center as the backup clustering center in the clustering group that needs to be mutated, and determining the other clustering centers as the initial clustering centers excluding the target clustering center.

[0206] In one embodiment, the processor further implements the following steps when executing the processing logic in the computer program for determining the next clustering center corresponding to the target clustering center by performing genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center and the associated clustering center: performing genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center and the associated clustering center to obtain a mutated clustering center of the target clustering center; wherein the associated clustering center is a clustering center in the other clustering centers that belongs to the same clustering group as the target clustering center; and determining the next clustering center corresponding to the target clustering center from the target clustering center and the mutated clustering center.

[0207] In one embodiment, the processor further implements the following steps when executing the processing logic in the computer program for obtaining the mutated clustering center of the target clustering center by performing genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center and the associated clustering center: generating a random number based on a difference between the target clustering center and the associated clustering center using a random function; determining a third value as the product of the adaptive scaling factor and the random number; and determining the mutated clustering center of the target clustering center as the sum of the third value and the target clustering center.

[0208] In one embodiment, when the processor executes the processing logic in the computer program for determining the next cluster center corresponding to the target cluster center from the target cluster center and the mutated cluster center, the processor further implements the following steps: comparing the fitness of the target cluster center and the fitness of the mutated cluster center; if the fitness of the target cluster center is greater than or equal to the fitness of the mutated cluster center, taking the target cluster center as the next cluster center corresponding to the target cluster center; if the fitness of the target cluster center is less than the fitness of the mutated cluster center, taking the mutated cluster center as the next cluster center corresponding to the target cluster center.

[0209] In one embodiment, when the processor executes the processing logic in the computer program for clustering the user set based on the at least two initial cluster centers according to the user features of each user in the user set to be clustered and determining the fitness of each initial cluster center, the processor further implements the following steps: clustering the user set based on the at least two initial cluster centers according to the user features of each user in the user set to be clustered to obtain a clustering result corresponding to each initial cluster center; and determining the fitness of each initial cluster center according to the distance between each user in each clustering result and the corresponding initial cluster center.

[0210] In one embodiment, when the processor executes the processing logic in the computer program for clustering the user set based on the at least two initial cluster centers according to the user features of each user in the user set to be clustered to obtain a clustering result corresponding to each initial cluster center, the processor further implements the following steps: obtaining a feature weight vector corresponding to the user features of each user in the user set; wherein the user features each include an identity dimension feature and / or an asset dimension feature; determining the distance between each initial cluster center and each user according to the feature weight vector, the user features of each user in the user set, and each initial cluster center; and clustering the user set according to the distance between each initial cluster center and each user to obtain a clustering result corresponding to each initial cluster center.

[0211] In one embodiment, a computer readable storage medium is provided, and the computer readable storage medium stores a computer program. When the processing logic in the computer program is executed by a processor, the following steps are implemented:

[0212] clustering the user set based on the at least two initial cluster centers according to the user features of each user in the user set to be clustered and determining the fitness of each initial cluster center;

[0213] if the fitness of each initial cluster center does not satisfy the iteration end condition, determining a target cluster center that needs to be mutated and other cluster centers that do not need to be mutated from the initial cluster centers according to the fitness of each initial cluster center;

[0214] The target clustering center is subjected to genetic mutation processing according to an adaptive scaling factor, the target clustering center and other clustering centers, to obtain a next clustering center corresponding to the target clustering center; wherein the adaptive scaling factor is determined according to a basic scaling factor and the fitness of each initial clustering center;

[0215] The next clustering center and the other clustering centers are taken as new initial clustering centers, and the operation of clustering the user set according to the user feature of each user in the user set to be clustered based on each initial clustering center is performed again until the fitness of each initial clustering center meets the iteration end condition, and a clustering result of the user set is output.

[0216] In one embodiment, the processing logic in the computer program, when executed by the processor, further implements the following steps: determining a scaling factor coefficient according to the fitness of each initial clustering center; and taking the product of the scaling factor coefficient and the basic scaling factor as the adaptive scaling factor.

[0217] In one embodiment, the processing logic in the computer program, when executed by the processor, further implements the following steps: determining a scaling factor coefficient according to the fitness of each initial clustering center; and taking the product of the scaling factor coefficient and the basic scaling factor as the adaptive scaling factor.

[0218] In one embodiment, the processing logic in the computer program, when executed by the processor, further implements the following steps: selecting at least two standby clustering centers from each initial clustering center; combining each standby clustering center in pairs to obtain a clustering group; determining a standby clustering center in the clustering group that needs to be mutated according to the comparison result between the fitness of the two standby clustering centers in the clustering group; taking the standby clustering center in the clustering group that needs to be mutated as the target clustering center, and taking the clustering centers in each initial clustering center except the target clustering center as the other clustering centers that do not need to be mutated.

[0219] In one embodiment, the processing logic of the computer program for performing the genetic mutation processing on the target cluster center according to the adaptive scaling factor, the target cluster center and the other cluster centers to obtain the mutated cluster center of the target cluster center is further implemented by the processor to perform the following steps: generating a random number by using a random function based on the difference between the target cluster center and the associated cluster center; multiplying the adaptive scaling factor and the random number to obtain a third value; and adding the third value and the target cluster center to obtain the mutated cluster center of the target cluster center.

[0220] In one embodiment, the processing logic of the computer program for performing the genetic mutation processing on the target cluster center according to the adaptive scaling factor, the target cluster center and the other cluster centers to obtain the mutated cluster center of the target cluster center is further implemented by the processor to perform the following steps: generating a random number by using a random function based on the difference between the target cluster center and the associated cluster center; multiplying the adaptive scaling factor and the random number to obtain a third value; and adding the third value and the target cluster center to obtain the mutated cluster center of the target cluster center.

[0221] In one embodiment, the processing logic of the computer program for determining the next cluster center corresponding to the target cluster center from the target cluster center and the mutated cluster center is further implemented by the processor to perform the following steps: comparing the fitness of the target cluster center and the fitness of the mutated cluster center; if the fitness of the target cluster center is greater than or equal to the fitness of the mutated cluster center, taking the target cluster center as the next cluster center corresponding to the target cluster center; and if the fitness of the target cluster center is less than the fitness of the mutated cluster center, taking the mutated cluster center as the next cluster center corresponding to the target cluster center.

[0222] In one embodiment, the processing logic of the computer program for clustering the user set according to the user features of each user in the user set to be clustered based on the at least two initial cluster centers and determining the fitness of each initial cluster center is further implemented by the processor to perform the following steps: clustering the user set according to the user features of each user in the user set to be clustered based on the at least two initial cluster centers to obtain the clustering result corresponding to each initial cluster center; and determining the fitness of each initial cluster center according to the distance between each user in the clustering result and the corresponding initial cluster center.

[0223] In one embodiment, the processing logic in the computer program, when executed by the processor, further implements the following steps: obtaining a feature weight vector corresponding to the user feature of each user in the user set; wherein the user features each include an identity dimension feature and / or an asset dimension feature; determining a distance between each initial clustering center and each user in the user set according to the feature weight vector, the user feature of each user in the user set, and each initial clustering center; and clustering the user set according to the distance between each initial clustering center and each user in the user set to obtain a clustering result corresponding to each initial clustering center.

[0224] In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the following steps:

[0225] clustering the user set according to the user feature of each user in the user set to be clustered based on at least two initial clustering centers, and determining the fitness of each initial clustering center;

[0226] if the fitness of each initial clustering center does not satisfy the iteration end condition, determining a target clustering center that needs to be mutated and other clustering centers that do not need to be mutated from the initial clustering centers according to the fitness of each initial clustering center;

[0227] performing genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center, and the other clustering centers to obtain a next clustering center corresponding to the target clustering center; wherein the adaptive scaling factor is determined according to a basic scaling factor and the fitness of each initial clustering center;

[0228] taking the next clustering center and the other clustering centers as new initial clustering centers, and returning to perform the operation of clustering the user set according to the user feature of each user in the user set to be clustered based on the initial clustering centers until the fitness of each initial clustering center satisfies the iteration end condition, and outputting a clustering result of the user set.

[0229] In one embodiment, the processing logic in the computer program, when executed by the processor, further implements the following steps: determining a scaling factor coefficient according to the fitness of each initial clustering center; and taking the product of the scaling factor coefficient and a basic scaling factor as an adaptive scaling factor.

[0230] In one embodiment, the processing logic in the computer program for determining the scaling factor coefficient according to the fitness of each initial cluster center, when executed by the processor, further implements the steps of: selecting an initial cluster center with the maximum fitness as a target individual from the initial cluster centers; summing the fitness of each initial cluster center as a first value; multiplying the number of initial cluster centers and the fitness of the target individual as a second value; and taking the ratio between the first value and the second value as the scaling factor coefficient.

[0231] In one embodiment, the processing logic in the computer program for determining the target cluster center to be mutated and the other cluster centers not to be mutated from the initial cluster centers according to the fitness of each initial cluster center, when executed by the processor, further implements the steps of: selecting at least two standby cluster centers from the initial cluster centers; combining each two standby cluster centers to obtain a cluster group; determining the standby cluster center to be mutated in the cluster group according to the comparison result between the fitness of the two standby cluster centers in the cluster group; taking the standby cluster center to be mutated in the cluster group as the target cluster center, and taking the cluster centers in the initial cluster centers except the target cluster center as the other cluster centers not to be mutated.

[0232] In one embodiment, the processing logic in the computer program for determining the next cluster center corresponding to the target cluster center by performing genetic mutation on the target cluster center according to the adaptive scaling factor, the target cluster center and the associated cluster center, when executed by the processor, further implements the steps of: performing genetic mutation on the target cluster center according to the adaptive scaling factor, the target cluster center and the associated cluster center to obtain a mutated cluster center of the target cluster center; wherein the associated cluster center is the cluster center in the other cluster centers belonging to the same cluster group as the target cluster center; and determining the next cluster center corresponding to the target cluster center from the target cluster center and the mutated cluster center.

[0233] In one embodiment, the processing logic in the computer program for obtaining the mutated cluster center of the target cluster center by performing genetic mutation on the target cluster center according to the adaptive scaling factor, the target cluster center and the associated cluster center, when executed by the processor, further implements the steps of: generating a random number based on the difference between the target cluster center and the associated cluster center by using a random function; taking the product of the adaptive scaling factor and the random number as a third value; and summing the third value and the target cluster center as the mutated cluster center of the target cluster center.

[0234] In one embodiment, the processor, when executing the processing logic in the computer program for determining the next cluster center corresponding to the target cluster center from the target cluster center and the mutated cluster center, further implements the following steps: comparing the fitness of the target cluster center and the mutated cluster center; if the fitness of the target cluster center is greater than or equal to the fitness of the mutated cluster center, taking the target cluster center as the next cluster center corresponding to the target cluster center; if the fitness of the target cluster center is less than the fitness of the mutated cluster center, taking the mutated cluster center as the next cluster center corresponding to the target cluster center.

[0235] In one embodiment, the processor, when executing the processing logic in the computer program for clustering the user set based on the at least two initial cluster centers according to the user features of each user in the user set to be clustered, and determining the fitness of each initial cluster center, further implements the following steps: clustering the user set based on the at least two initial cluster centers according to the user features of each user in the user set to be clustered, to obtain the clustering result corresponding to each initial cluster center; and determining the fitness of each initial cluster center according to the distance between each user in each clustering result and the corresponding initial cluster center.

[0236] In one embodiment, the processor, when executing the processing logic in the computer program for clustering the user set based on the at least two initial cluster centers according to the user features of each user in the user set to be clustered, to obtain the clustering result corresponding to each initial cluster center, further implements the following steps: obtaining the feature weight vector corresponding to the user features of each user in the user set; wherein the user features include identity dimension features and / or asset dimension features; determining the distance between each initial cluster center and each user according to the feature weight vector, the user features of each user in the user set, and each initial cluster center; and clustering the user set according to the distance between each initial cluster center and each user, to obtain the clustering result corresponding to each initial cluster center.

[0237] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties.

[0238] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer readable storage medium, and when the computer program is executed, the processes of the above-mentioned embodiments of the methods can be included. Any reference to memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. The non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical storage, high-density embedded non-volatile memory, resistive memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric memory (FRAM), phase change memory (PCM), graphene memory, etc. The volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration but not limitation, the RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The database involved in the embodiments provided in the present application can include at least one of a relational database and a non-relational database. The non-relational database can include a distributed database based on a block chain, etc., without being limited thereto. The processor involved in the embodiments provided in the present application can be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., without being limited thereto.

[0239] Any combination of the technical features of the above embodiments can be made. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described, however, as long as the combination of the technical features does not exist, it should be considered as the scope of the present application.

[0240] The above embodiments only express several implementation manners of the present application, and the description is more specific and detailed, but it should not be understood as a limitation on the scope of the patent of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, a number of modifications and improvements can be made, which are within the scope of protection of the present application. Therefore, the protection scope of the present application should be subject to the appended claims.

Claims

1. A user clustering method, characterized by, The method comprises: clustering the user set according to the user features of each user in the user set to be clustered based on at least two initial clustering centers, and determining the fitness of each initial clustering center; if the fitness of each initial clustering center does not satisfy an iteration end condition, determining a target clustering center that needs to be mutated and other clustering centers that do not need to be mutated from each initial clustering center according to the fitness of each initial clustering center; performing genetic mutation processing on the target clustering center according to an adaptive scaling factor, the target clustering center and the other clustering centers to obtain a next clustering center corresponding to the target clustering center; wherein the adaptive scaling factor is determined according to a basic scaling factor and the fitness of each initial clustering center, and the determination of the adaptive scaling factor comprises: determining a scaling factor coefficient according to the fitness of each initial clustering center; and taking the product of the scaling factor coefficient and the basic scaling factor as the adaptive scaling factor; taking the next clustering center and the other clustering centers as new initial clustering centers, and returning to perform the operation of clustering the user set according to the user features of each user in the user set to be clustered based on each initial clustering center until the fitness of each initial clustering center satisfies the iteration end condition, and outputting the clustering result of the user set.

2. The method of claim 1, wherein, The determination of the scaling factor coefficient according to the fitness of each initial clustering center comprises: taking the initial clustering center with the maximum fitness among the initial clustering centers as a target individual; taking the sum of the fitness of each initial clustering center as a first value; taking the product of the number of initial clustering centers and the fitness of the target individual as a second value; taking the ratio between the first value and the second value as the scaling factor coefficient.

3. The method of claim 1, wherein, The determination of the target clustering center that needs to be mutated and the other clustering centers that do not need to be mutated from each initial clustering center according to the fitness of each initial clustering center comprises: selecting at least two backup clustering centers from each initial clustering center; combining each backup clustering center in pairs to obtain a clustering group; determining the backup clustering center in the clustering group that needs to be mutated according to the comparison result between the fitness of the two backup clustering centers in the clustering group; taking the backup clustering center in the clustering group that needs to be mutated as the target clustering center, and taking the clustering centers in each initial clustering center except the target clustering center as the other clustering centers that do not need to be mutated.

4. The method of claim 3, wherein, The determination of the next clustering center corresponding to the target clustering center by performing genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center and the other clustering centers comprises: performing genetic mutation processing on the target clustering center according to the adaptive scaling factor, the target clustering center and an associated clustering center to obtain the mutated clustering center of the target clustering center; wherein the associated clustering center is the clustering center in the other clustering centers that belongs to the same clustering group as the target clustering center. determining the next clustering center corresponding to the target clustering center from the target clustering center and the mutated clustering center.

5. The method of claim 4, wherein, The adaptive scaling factor, the target clustering center and the associated clustering center are used to perform genetic mutation on the target clustering center to obtain the mutated clustering center of the target clustering center, including: a random number is generated by using a random function based on the difference between the target clustering center and the associated clustering center; the product of the adaptive scaling factor and the random number is taken as a third value; the sum of the third value and the target clustering center is taken as the mutated clustering center of the target clustering center.

6. The method of claim 4, wherein, The next clustering center corresponding to the target clustering center is determined from the target clustering center and the mutated clustering center, including: the fitness of the target clustering center and the mutated clustering center is compared; if the fitness of the target clustering center is greater than or equal to the fitness of the mutated clustering center, the target clustering center is taken as the next clustering center corresponding to the target clustering center; if the fitness of the target clustering center is less than the fitness of the mutated clustering center, the mutated clustering center is taken as the next clustering center corresponding to the target clustering center.

7. The method of claim 1, wherein, The user set is clustered based on at least two initial clustering centers according to the user features of each user in the user set to be clustered, and the fitness of each initial clustering center is determined, including: The user set is clustered based on at least two initial clustering centers according to the user features of each user in the user set to be clustered to obtain the clustering result corresponding to each initial clustering center; the fitness of each initial clustering center is determined according to the distance between each user in each clustering result and the corresponding initial clustering center.

8. The method of claim 7, wherein, The user set is clustered based on at least two initial clustering centers according to the user features of each user in the user set to be clustered to obtain the clustering result corresponding to each initial clustering center, including: a feature weight vector corresponding to the user features of each user in the user set is obtained; wherein the user features include identity dimension features and / or asset dimension features; the distance between each initial clustering center and each user is determined according to the feature weight vector, the user features of each user in the user set, and each initial clustering center; the user set is clustered according to the distance between each initial clustering center and each user to obtain the clustering result corresponding to each initial clustering center.

9. A user clustering apparatus, characterized by comprising: The device includes: a clustering module configured to cluster the user set based on at least two initial clustering centers according to the user features of each user in the user set to be clustered, and determine the fitness of each initial clustering center; a judgment module configured to determine whether the fitness of each initial clustering center meets an iteration end condition, and if so, output the running result, and if not, run an iteration module; an iteration module configured to determine a target clustering center that needs to be mutated and other clustering centers that do not need to be mutated from the initial clustering centers according to the fitness of each initial clustering center. The iteration module is further configured to perform genetic mutation processing on the target clustering center according to an adaptive scaling factor, the target clustering center and the other clustering centers, to obtain a next clustering center corresponding to the target clustering center; wherein the adaptive scaling factor is determined according to a basic scaling factor and the fitness of each initial clustering center; The factor determination module comprises a coefficient determination unit and a factor determination unit; wherein the coefficient determination unit is configured to determine a scaling factor coefficient according to the fitness of each initial clustering center; and the factor determination unit is configured to take the product of the scaling factor coefficient and the basic scaling factor as the adaptive scaling factor; The iteration module is further configured to take the next clustering center and the other clustering centers as new initial clustering centers, and return to run the clustering module; The result output module is configured to output a clustering result of the user set in a case where the fitness of each initial clustering center meets the iteration end condition. 10.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-9. The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 8.

11. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Firework algorithm-based clustering method and device

    CN112149703A