Data clustering method, device, equipment and storage medium

By receiving and processing the distance values ​​of encrypted user feature data of multiple data platforms, combined with density clustering algorithm, the problem of low clustering accuracy in the existing technology is solved, and high accuracy clustering for users of multiple data platforms is achieved class, improving overall performance and privacy protection.

CN112949764BActive Publication Date: 2024-10-29WEBANK (CHINA)
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110361982.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-02
Publication Date
2024-10-29
Estimated Expiration
2041-04-02

Smart Images

  • Figure CN112949764B_ABST
    Figure CN112949764B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data clustering method, apparatus, device and storage medium. The method receives a distance value set from an initiator and a distance value set from a participant, wherein the distance value set of the initiator includes the distance values ​​of the first feature data of two users in the user set of the initiator, and the distance value set of the participant includes the distance values ​​of the second feature data of two users in the user set of the participant, the user sets of the initiator and the participant are the same, and the first feature data is different from the second feature data. Based on the received distance value set of the initiator and the distance value set of the participant, the clustering result of each user in the user set is determined, and the clustering result of each user is returned to the initiator and the participant. The above scheme coordinates the data features of the overlapping users of the initiator and the participant, comprehensively considers the feature data of the users of all parties, and the obtained user clustering result is more accurate, thereby improving the overall performance of all parties.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a data clustering method, device, equipment and storage medium. Background Art

[0002] At present, machine learning clustering algorithms have been widely used in fields including user portrait generation, image grouping, and outlier detection. Taking user portrait generation as an example, by performing cluster analysis on a large amount of user data, users can be divided into different categories, thereby providing personalized recommendation services based on user categories.

[0003] With the rapid development of Internet technology, the amount of user data in data platforms in various fields has increased significantly, and there are a large number of overlapping users in various fields. For example, social platforms have browsing data of a certain user, and e-commerce platforms have shopping data of the user. Data platforms in different fields usually cluster users based on the user data of their own platforms.

[0004] In the above clustering scheme, the data platform clusters users based on their characteristics in certain dimensions, and the clustering accuracy is not high. Summary of the invention

[0005] The present invention provides a data clustering method, device, equipment and storage medium to improve user clustering effect.

[0006] In a first aspect, the present disclosure provides a data clustering method, the method comprising:

[0007] Receiving a distance value set from an initiator and a distance value set from a participant, wherein the distance value set of the initiator includes distance values ​​of first feature data of two users in a user set of the initiator, and the distance value set of the participant includes distance values ​​of second feature data of two users in a user set of the participant, the user sets of the initiator and the participant are the same, and the first feature data is different from the second feature data;

[0008] Determine a clustering result for each user in the user set according to the distance value set of the initiator and the distance value set of the participant, wherein the clustering result is used to indicate the class to which each user belongs;

[0009] The clustering result is returned to the initiator and the participants.

[0010] In one embodiment of the present disclosure, the first feature data or the second feature data is used to indicate at least one feature of the user.

[0011] In one embodiment of the present disclosure, the receiving of the distance value set from the initiator and the distance value set of the participant includes:

[0012] Receive the distance values ​​of the first feature data of each pair of users in the encrypted user set of the initiator and the distance values ​​of the second feature data of each pair of users in the encrypted user set of the participant.

[0013] In one embodiment of the present disclosure, before receiving the distance value set from the initiator and the distance value set of the participant, the method includes:

[0014] Sending a first random number to the initiator, and sending a second random number to the participant, wherein the first random number and the second random number are opposite numbers of each other;

[0015] The first random number is used by the initiator to encrypt the distance value of the first feature data of each pair of users in the user set of the initiator, and the second random number is used by the participant to encrypt the distance value of the second feature data of each pair of users in the user set of the participant.

[0016] In one embodiment of the present disclosure, determining the clustering result of each user in the user set according to the distance value set of the initiator and the distance value set of the participant includes:

[0017] Determine a plurality of user cluster centers according to the distance values ​​of the first feature data of two users from the initiator and the distance values ​​of the second feature data of two users from the participant;

[0018] Based on the multiple user cluster centers, a clustering result for each user in the user set is determined.

[0019] In one embodiment of the present disclosure, determining multiple user cluster centers according to the distance values ​​of the first feature data of two users from the initiator and the distance values ​​of the second feature data of two users from the participants includes:

[0020] By traversing each user in the user set, determining a distance value of joint feature data between each user and other users in the user set; the joint feature data includes the first feature data and the second feature data;

[0021] If the distance value between the joint feature data of the first user and other users in the user set is less than a preset distance value, and the number of the other users is greater than a preset number of users, the first user is taken as a user cluster center, and the first user is any user in the user set.

[0022] In one embodiment of the present disclosure, determining the distance value between the joint feature data of each user and other users in the user set includes:

[0023] Acquire a first distance value of first feature data of the first user and the second user sent by the initiator, and a second distance value of second feature data of the first user and the second user sent by the participant; the second user is any user in the user set except the first user;

[0024] A distance value of joint feature data of the first user and the second user is determined according to the first distance value and the second distance value.

[0025] In one embodiment of the present disclosure, determining a clustering result of each user in the user set based on the multiple user cluster centers includes:

[0026] Randomly select a user clustering center from the multiple user clustering centers, and determine whether there are other user clustering centers within the neighborhood of the randomly selected user clustering center;

[0027] If there are other user clustering centers, the randomly selected user clustering center and all users within the area where the other user clustering center is located are classified into one category.

[0028] In a second aspect, the present disclosure provides a data clustering device, comprising:

[0029] A receiving module, configured to receive a distance value set from an initiator and a distance value set from a participant, wherein the distance value set of the initiator includes distance values ​​of first feature data of two users in a user set of the initiator, and the distance value set of the participant includes distance values ​​of second feature data of two users in a user set of the participant, the user sets of the initiator and the participant are the same, and the first feature data is different from the second feature data;

[0030] A processing module, used to determine a clustering result of each user in the user set according to the distance value set of the initiator and the distance value set of the participant, wherein the clustering result is used to indicate the class to which each user belongs;

[0031] A sending module is used to return the clustering result to the initiator and the participants.

[0032] In a third aspect, the present disclosure provides an electronic device, the electronic device comprising:

[0033] A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the method according to any one of the first aspects of the present disclosure is implemented.

[0034] In a fourth aspect, the present disclosure provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method as described in any one of the first aspects of the present disclosure is implemented.

[0035] In a fifth aspect, the present disclosure provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method as described in any one of the first aspects of the present disclosure is implemented.

[0036] The present disclosure provides a data clustering method, apparatus, device and storage medium. The method receives a distance value set from an initiator and a distance value set from a participant, wherein the distance value set of the initiator includes the distance values ​​of the first feature data of two users in the user set of the initiator, and the distance value set of the participant includes the distance values ​​of the second feature data of two users in the user set of the participant, the user sets of the initiator and the participant are the same, and the first feature data is different from the second feature data. Based on the received distance value set of the initiator and the distance value set of the participant, the clustering result of each user in the user set is determined, and the clustering result of each user is returned to the initiator and the participant. The above scheme coordinates the data features of the overlapping users of the initiator and the participant, comprehensively considers the feature data of the users of all parties, and the obtained user clustering result is more accurate, thereby improving the overall performance of all parties. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 A schematic diagram of a scenario of a data clustering method provided in an embodiment of the present disclosure;

[0038] Figure 2 A schematic diagram of the process of the data clustering method provided in the embodiment of the present disclosure Figure 1 ;

[0039] Figure 3 A schematic diagram of the process of the data clustering method provided in the embodiment of the present disclosure Figure 2 ;

[0040] Figure 4 A schematic diagram of the process of the data clustering method provided in the embodiment of the present disclosure Figure 3 ;

[0041] Figure 5 Schematic diagram of user cluster center provided by the embodiment of the present disclosure Figure 1 ;

[0042] Figure 6Schematic diagram of user cluster center provided by the embodiment of the present disclosure Figure 2 ;

[0043] Figure 7 A schematic diagram of the structure of a data clustering device provided in an embodiment of the present disclosure;

[0044] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure.

[0045] The realization of the objectives, functional features and advantages of the present disclosure will be further described in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0046] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.

[0047] Based on the records in the background technology section, the data platform only performs cluster analysis based on the user data of its own platform, and the user clustering results only integrate some characteristics of the users in the platform, and the clustering accuracy is not high. The following shows an example of user clustering based on user data from different data platforms.

[0048] In an optional scenario, the e-commerce platform obtains the operation data of a large number of users on the platform and clusters the users. For example, users can be divided into different categories based on the number of orders, order amount, category of ordered products or services, platform browsing time, etc. The clustering solution in this scenario only considers the data characteristics of users on the e-commerce platform, and the user clustering effect needs to be improved.

[0049] In another optional scenario, the financial platform obtains the financial data of a large number of users on the platform and clusters the users. For example, users can be divided into different categories based on the amount of user current deposits, the number of times they purchase financial products, the number of transfers, the transfer amount, the credit card payment amount, etc. The clustering solution in this scenario only considers the data characteristics of users on the financial platform, and the user clustering effect needs to be improved.

[0050] In another optional scenario, the social platform clusters users by obtaining the search or browsing data of a large number of users on the platform. The user's search or browsing data indicates the content that the user is interested in, and the user can be divided into different categories. The clustering solution in this scenario only considers the data features of users on the social platform, and the user clustering effect needs to be improved.

[0051] With the continuous development of Internet technology, most users obtain information, purchase products or services through various data platforms, involving various fields of life, and the users of various data platforms have a high overlap. Therefore, when solving the above problems, the inventors consider combining user data from multiple data platforms and comprehensively clustering users based on the user's feature data on each data platform. Compared with the existing user clustering scheme, the user clustering effect of each data platform can be improved.

[0052] Due to the restrictions of privacy protection, the user data of each data platform cannot leave the local area. Therefore, the user data of each data platform cannot be directly collected to a third-party platform for comprehensive clustering. The present disclosure provides the following technical concept: consider placing the preprocessing process of user data on each participant, and each participant sends the preprocessed data (not the original user data) to a third party (or arbitrator). The third party performs comprehensive clustering of users based on the preprocessed data sent by each participant, and uses a density clustering algorithm to determine the clustering result of each user, and finally returns the clustering result of each user to each participant. The above scheme comprehensively considers the characteristic data of users from all parties, and the clustering results obtained are more accurate.

[0053] Before introducing the technical solution provided by the embodiment of the present disclosure, the application scenario of data clustering provided by the embodiment of the present disclosure is briefly described first.

[0054] For example, Figure 1 A schematic diagram of a scenario of a data clustering method provided in an embodiment of the present disclosure, such as Figure 1 As shown, the scenario includes at least three servers, e.g. Figure 1 The servers 11 to 13 are connected to each other in pairs, and the servers 11 and 12 represent servers of different data platforms respectively, for example, the server 11 is a server of a financial platform, and the server 12 is a server of an e-commerce platform. The server 13 represents a server of a third-party platform.

[0055] Part of the data can be exchanged between the server 11 and the server 12. For example, the server 11 sends the user identification stored in the server 11 to the server 12, and the server 12 sends the user identification stored in the server 12 to the server 11. Through data exchange, the server 11 and the server 12 determine which users need to preprocess the user data, that is, determine the user set, and the users in the user set exist in both servers. Among them, the preprocessing of user data mainly determines the distance value of the feature data of each two users in the user set, which is used to characterize the feature similarity between users. The higher the similarity, the smaller the distance value, and the lower the similarity, the larger the distance value.

[0056] Server 13 receives preprocessed data packets sent by server 11 and server 12, which include multiple distance values. Server 13 determines the distance values ​​of the joint feature data of each user based on the data packets sent by server 11 and server 12, determines the clustering center of the users based on the distance values ​​of the joint feature data of each user, and uses density clustering to determine the clustering result of each user.

[0057] The technical solution of the present disclosure is described in detail with specific embodiments below. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments.

[0058] Figure 2 A schematic diagram of the process of the data clustering method provided in the embodiment of the present disclosure Figure 1 The data clustering method provided in this embodiment can be applied to Figure 1 The server 13 shown is a third-party server, which is independent of the servers of the initiator and the participants.

[0059] like Figure 2 As shown, the method includes:

[0060] Step 101: Receive a distance value set from an initiator and a distance value set from a participant.

[0061] In this embodiment, the distance value set of the initiator includes the distance values ​​of the first feature data of each pair of users in the user set of the initiator, and the distance value set of the participants includes the distance values ​​of the second feature data of each pair of users in the user set of the participants.

[0062] The user sets of the initiator and the participant are the same, that is, the users in the user set of the initiator are also in the user set of the participant.

[0063] Exemplarily, the user sets of the initiator and the participant include user 1, user 2 and user 3, and the distance value sets of the initiator and the participant include the distance value of the feature data between user 1 and user 2, the distance value of the feature data between user 1 and user 3, and the distance value of the feature data between user 2 and user 3.

[0064] The distance values ​​in the distance value set of the initiator indicate the distance values ​​of the first feature data of two users, and the distance values ​​in the distance value set of the participants indicate the distance values ​​of the second feature data of two users.

[0065] For example, the initiator is a financial platform, and the participant is an e-commerce platform. The characteristic data of the users of the financial platform include the amount of demand deposits, the amount of financial products purchased, consumption channels, etc. The characteristic data of the users of the e-commerce platform include the number of orders, the amount of orders, the categories of products or services ordered or browsed, etc. From the above examples, it can be seen that the characteristic data of the users of the initiator and the participant are different, that is, the first characteristic data is different from the second characteristic data.

[0066] In one embodiment of the present disclosure, the first feature data or the second feature data is used to indicate a feature of a user, that is, the feature data of the user of the initiator or the participant are all feature data of a single dimension.

[0067] In one embodiment of the present disclosure, the first feature data or the second feature data is used to indicate at least two features of a user, that is, the feature data of the user of the initiator or the participant are all multi-dimensional feature data.

[0068] In this embodiment, no matter the initiator or the participant, the distance value of the characteristic data of two users is determined in the same manner. The following takes the initiator as an example and describes the process of determining the distance value of the characteristic data of two users in combination with two specific examples.

[0069] Example 1: The first characteristic data of the initiating user is characteristic data of a single dimension.

[0070] User a and user b are any two users in the user set of the initiator. Assuming that the first feature data of user a at the initiator includes feature A1_a, and the first feature data of user b at the initiator includes feature A1_b, the distance value between the first feature data of user a and user b can be expressed as dist host =(A1_a-A1_b) 2 .

[0071] In this example, the distance value between the first feature data of user a and user b represents the similarity between the two users in a single feature dimension.

[0072] Example 2: The first characteristic data of the initiating user is multi-dimensional characteristic data.

[0073] User a and user b are any two users in the user set of the initiator. Assuming that the first feature data of user a at the initiator includes feature A1_a, feature A2_a, feature A3_a, and the first feature data of user b at the initiator includes feature A1_b, feature A2_b, feature A3_b, then the distance value between the first feature data of user a and user b can be expressed as dist host =(A1_a-A1_b) 2 +(A2_a-A2_b) 2+(A3_a-A3_b) 2 .

[0074] In this example, the distance value of the first feature data of user 1 and user 2 represents the overall similarity between the two users in multiple feature dimensions.

[0075] Based on the same principle, the distance values ​​of the second characteristic data of each pair of users of the participants can be determined to obtain a distance value set of the participants.

[0076] In one embodiment of the present disclosure, before the initiator and the participant send the distance value set to the third party, the initiator and the participant need to align the user identification IDs of both parties using the federated intersection technology (intersect). After the initiator and the participant determine the users that exist in both parties, the initiator and the participant save the users that exist in both parties into a user set, extract the feature data of each user in the user set, calculate the distance value of the feature data of each user in the user set, and generate the distance value set of each party.

[0077] From the above description, it can be seen that the initiator and the participants of this embodiment do not set an initial user center point, and there is no need to calculate the distance value of the feature data of each user and the initial user center point. Instead, each user is traversed, and the distance value of the feature data of each user and other users in the user set is calculated to generate a distance value set. This can reduce the difficulty of adjusting the number of user cluster centers using traditional methods and obtain more reasonable clustering results.

[0078] Step 102: Determine the clustering result of each user in the user set according to the distance value set of the initiator and the distance value set of the participants. The clustering result is used to indicate the class to which each user belongs.

[0079] In this embodiment, multiple user clustering centers are determined based on the distance values ​​of the first feature data of each pair of users from the initiator and the distance values ​​of the second feature data of each pair of users from the participating parties, and then based on the multiple user clustering centers, the clustering results of each user in the user set are determined.

[0080] Since the users in the user sets of the initiator and the participants are the same, the distance values ​​of the feature data of the two users of the initiator and the participants are corresponding. For example, the distance value set of the initiator includes the distance value of the feature data of user 1 and user 2, and the distance value set of the participants also includes the distance value of the feature data of user 1 and user 2. According to the distance value of the feature data of the same two users in the distance value sets of the initiator and the participants, the distance value of the joint feature data of the two users can be determined, thereby obtaining multiple sets of distance values ​​of the joint feature data, and then multiple user cluster centers can be determined according to the distance values ​​of the multiple sets of joint feature data.

[0081] The user cluster center is actually a user determined from multiple users in the user set, and can represent a class of users. Specifically, the clustering result of each user in the user set is determined based on multiple user cluster centers, including: traversing each user cluster center, classifying all users within the neighborhood of the user cluster center into one class, thereby determining the clustering result of each user in the user set.

[0082] Step 103: Return the clustering results to the initiator and the participants.

[0083] After determining the clustering result for each user, the clustering result for each user is returned to the initiator and the participants to complete the user data clustering.

[0084] The data clustering method provided in this embodiment coordinates the data features of overlapping users of the initiator and the participants to achieve comprehensive clustering of overlapping users. The initiator and the participants transmit the distance values ​​of the feature data of each user to a third party to ensure that the feature data of each user does not leave the local area. The third party determines the clustering result of each user in the user set based on the distance value set sent by each party, and then returns the clustering result of each user to the initiator and the participants. The above data clustering process comprehensively considers the feature data of users from all parties, and the clustering result obtained is more accurate.

[0085] Optionally, in some embodiments, the distance value set received by the third party may come from three or more participants, where multiple participants have a large number of overlapping users, and the feature data of the users of each participant is different. For example, the first feature data of the user is stored in the server of participant 1, the second feature data of the user is stored in the server of participant 2, and the third feature data of the user is stored in the server of participant 3. Based on the implementation principle of the above embodiment, the third party can combine the distance value sets sent by three or more participants to determine the distance values ​​of the joint feature data of two users in the user set, and the joint feature data includes the above three feature data. According to the distance values ​​of the joint feature data of two users in the user set, multiple user cluster centers are determined, thereby realizing the classification of each user in the user set.

[0086] The following describes the implementation method of determining the user cluster center by the third party according to the distance value set sent by each party in conjunction with a specific embodiment. Figure 3 A schematic diagram of the process of the data clustering method provided in the embodiment of the present disclosure Figure 2 ,like Figure 3 As shown, the method includes:

[0087] Step 201: Determine the distance value between each user and the joint feature data of other users in the user set by traversing each user in the user set.

[0088] The joint feature data includes the first feature data and the second feature data.

[0089] The following takes the first user and the second user as an example to illustrate the process of determining the distance value of the joint feature data of two users. The first user is any user in the user set, and the second user is any user in the user set except the first user.

[0090] First, a first distance value of the first feature data of the first user and the second user is obtained from the distance value set of the initiator, and a second distance value of the second feature data of the first user and the second user is obtained from the distance value set of the participant. Then, according to the first distance value and the second distance value, the distance value of the joint feature data of the first user and the second user is determined.

[0091] Example 1: The first feature data and the second feature data are both feature data of a single dimension. The first feature data of the first user and the second user are A1_a and A1_b respectively, and the second feature data of the first user and the second user are B1_a and B1_b respectively.

[0092] The first distance value between the first feature data of the first user and the second user can be expressed as dist host _1=(A1_a-A1_b) 2 , the second distance value of the second feature data of the first user and the second user can be expressed as dist host _2=(B1_a-B1_b) 2 , the distance value of the joint feature data of the first user and the second user can be expressed as:

[0093]

[0094] Example 2: Both the first feature data and the second feature data are multi-dimensional feature data.

[0095] The first characteristic data of the first user of the initiator is {A1_a, A2_a, A3_a}, the first characteristic data of the second user is {A1_b, A2_b, A3_b}, and the first distance value of the first characteristic data of the first user and the second user can be expressed as dist host _1=(A1_a-A1_b) 2 +(A2_a-A2_b) 2 +(A3_a-A3_b) 2 .

[0096] Similarly, the second feature data of the first user of the participant is {B1_a, B2_a}, the second feature data of the second user is {B1_b, B2_b}, and the second distance value of the second feature data of the first user and the second user can be expressed as disthost _2=(B1_a-B1_b) 2 +(B2_a-B2_b) 2 .

[0097] The distance value of the joint feature data of the first user and the second user can be expressed as:

[0098]

[0099] From the above example, it can be known that the distance value of the joint feature data of two users in the user set is determined by adding the distance value of the first feature data and the distance value of the second feature data of the two users and taking the square root.

[0100] Step 202: If the number of other users whose joint feature data distance value with the first user is less than or equal to the preset distance value is greater than the preset number of users, the first user is regarded as a user cluster center.

[0101] Exemplarily, assuming that there are 10 users in the user set, the distance values ​​of the joint feature data of the first user and the other 9 users in the user set are 5, 6, 3, 3, 4, 6, 1, 7, and 8 respectively, the preset distance value is set to 6, and the preset number of users is set to 5. It can be determined that the number of other users whose distance value of the joint feature data with the first user is less than or equal to 6 is 6, and the number of other users is greater than the preset number of users 5, so the first user can be regarded as a user cluster center.

[0102] It should be understood that in actual applications, the number of users in the user set is greater, and the preset distance value and the preset number of users can be set according to application requirements, and this embodiment does not impose any limitation on this.

[0103] Through the above embodiment, each user in the user set is traversed to determine whether each user can be used as a user cluster center. However, among the multiple user cluster centers determined in the above manner, there are two adjacent cluster centers that are close to each other. Therefore, the multiple user cluster centers determined can be optimized through the following embodiment to determine the clustering result of each user in the user set.

[0104] Figure 4 A schematic diagram of the process of the data clustering method provided in the embodiment of the present disclosure Figure 3 , Figure 5 Schematic diagram of user cluster center provided by the embodiment of the present disclosure Figure 1 , Figure 6 Schematic diagram of user cluster center provided by the embodiment of the present disclosure Figure 2 .

[0105] like Figure 4 As shown, the method includes:

[0106] Step 301: randomly select a user clustering center from multiple user clustering centers, and determine whether there are other user clustering centers within the neighborhood of the randomly selected user clustering center.

[0107] Step 302: If there are other user clustering centers, the randomly selected user clustering center and all users within the area where the other user clustering centers are located are grouped into one category.

[0108] For example, assuming that the feature data of the users of the initiator and the participants are all single-dimensional feature data, the third party can determine the relative position relationship between the joint feature data of each user and other users based on the distance value of the joint feature data of each user of the initiator and the participants. Figure 5 It shows a relative position relationship of each user in the user set, using Figure 3 In the embodiment shown, five user cluster centers can be determined from the user set, such as Figure 5 The cluster centers A, B, C, D, and E shown in the figure are put into the cluster center set. A user cluster center is randomly selected from the cluster center set, for example, cluster center A. Since there is cluster center D in the neighborhood of cluster center A, all users in the neighborhood of cluster center A and cluster center D can be classified into one category.

[0109] The neighborhood range of each cluster center point refers to a range where the distance value from the cluster center point is less than a preset distance value. In this embodiment, it specifically refers to a range where the distance value of the joint feature data of users from the cluster center is less than a preset distance value.

[0110] Optionally, in some embodiments, there are other cluster centers within the neighborhood of the cluster center. In addition to classifying all users within the neighborhood of these two cluster centers into one category, it is necessary to further determine whether there are other cluster centers within the neighborhood of other cluster centers within the neighborhood of the cluster center, until there are no new cluster centers within the neighborhood of the most recently added cluster center.

[0111] Figure 6 shows another relative position relationship of each user in the user set, which is Figure 5 Similarly, it also includes 5 user cluster centers, namely cluster center points A, B, C, D, and E. Figure 5 The difference is that there is a cluster center point D in the neighborhood of cluster center point A. We further determine whether there are other cluster centers in the neighborhood of cluster center point D, such as Figure 6As shown in the figure, the neighborhood of cluster center D also includes cluster center C, so all users in the neighborhood of cluster centers A, D, and C can be classified into one category. Further judgment is made that cluster center C has no new cluster center, cluster centers A, D, and C are deleted from the cluster center set, and then a cluster center is randomly selected from the remaining cluster centers in the cluster center set, and the above judgment process is performed until the cluster center set is empty.

[0112] Through the technical solution provided by the above embodiment, user cluster centers with close distances are classified into one category, so that all users within the neighborhood of the user cluster center of the same category are classified into one category, thereby realizing density-based clustering. This clustering method has low sensitivity to outliers, but can simultaneously discover outliers and abnormal points. In addition, there is no need to set the initial number of cluster centers, and the clustering results for non-convex data sets are ideal.

[0113] On the basis of the above embodiments, the following embodiment mainly improves the data transmission between the initiator, the participants and the third party. Although in the above embodiments, the data sent by the initiator and the participants to the third party are not the original feature data of the user, there are still security risks. Therefore, the following embodiment provides an encrypted transmission solution, which uses secure aggregation calculation to realize encrypted data transmission.

[0114] Specifically, before receiving the distance value set from the initiator and the distance value set from the participant, the third party first sends a first random number to the initiator and sends a second random number to the participant, wherein the first random number and the second random number are opposite numbers.

[0115] The first random number is used by the initiator to encrypt the distance value of the first feature data of each pair of users in the initiator's user set, and the second random number is used by the participant to encrypt the distance value of the second feature data of each pair of users in the participant's user set.

[0116] The third party receives the distance values ​​of the first feature data of two users in the encrypted user set of the initiator, and the distance values ​​of the second feature data of two users in the encrypted user set of the participant. Then, based on the distance value sets of the initiator and the participant, multiple user cluster centers are determined to complete the classification of each user in the user set.

[0117] Exemplarily, the initiator uses the first random number a sent by the third party to encrypt the distance value of the first feature data of the two users, and the participants use the second random number -a sent by the third party to encrypt the distance value of the second feature data of the two users. The encryption method of the initiator and the participants is to add the distance value of the feature data to the random number. Since the first random number and the second random number are opposite numbers, when the third party calculates the distance value of the joint feature data of any two users, it can directly add and square the distance value of the feature data of any two users after encryption, without decrypting the distance value, which can improve the data processing speed of the third party.

[0118] It should be noted that in actual applications, a third party can send random numbers to three or more parties, the sum of the random numbers is 0, and each party cannot obtain the random numbers of other parties. By encrypting the distance value with random numbers, the security of the transmitted data can be ensured.

[0119] The disclosed embodiment can divide the data clustering device into functional modules according to the above-mentioned method embodiment. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical functional division. There may be other division methods in actual implementation. The following is an example of dividing each functional module corresponding to each function.

[0120] Corresponding to the data clustering method of the above embodiment, Figure 7 The structure diagram of the data clustering device provided by the embodiment of the present disclosure is shown in FIG. For the convenience of explanation, only the part related to the embodiment of the present disclosure is shown. Figure 7 As shown, the data clustering device 400 provided in this embodiment includes: a receiving module 401 , a processing module 402 and a sending module 403 .

[0121] The receiving module 401 is used to receive a distance value set from an initiator and a distance value set from a participant, wherein the distance value set of the initiator includes distance values ​​of first feature data of two users in a user set of the initiator, and the distance value set of the participant includes distance values ​​of second feature data of two users in a user set of the participant, the user sets of the initiator and the participant are the same, and the first feature data is different from the second feature data;

[0122] Processing module 402, used to determine a clustering result of each user in the user set according to the distance value set of the initiator and the distance value set of the participant, wherein the clustering result is used to indicate the class to which each user belongs;

[0123] The sending module 403 is used to return the clustering result to the initiator and the participants.

[0124] In one embodiment of the present disclosure, the first feature data or the second feature data is used to indicate at least one feature of the user.

[0125] In one embodiment of the present disclosure, the receiving module 401 is specifically configured to:

[0126] Receive the distance values ​​of the first feature data of each pair of users in the encrypted user set of the initiator and the distance values ​​of the second feature data of each pair of users in the encrypted user set of the participant.

[0127] In one embodiment of the present disclosure, the sending module 403 is further configured to:

[0128] Before the receiving module 401 receives the distance value set from the initiator and the distance value set of the participant, a first random number is sent to the initiator, and a second random number is sent to the participant, where the first random number and the second random number are opposite numbers to each other;

[0129] The first random number is used by the initiator to encrypt the distance value of the first feature data of each pair of users in the user set of the initiator, and the second random number is used by the participant to encrypt the distance value of the second feature data of each pair of users in the user set of the participant.

[0130] In one embodiment of the present disclosure, the processing module 402 is specifically configured to:

[0131] Determine a plurality of user cluster centers according to the distance values ​​of the first feature data of two users from the initiator and the distance values ​​of the second feature data of two users from the participant;

[0132] Based on the multiple user cluster centers, a clustering result for each user in the user set is determined.

[0133] In one embodiment of the present disclosure, the processing module 402 is specifically configured to:

[0134] By traversing each user in the user set, determining a distance value of joint feature data between each user and other users in the user set; the joint feature data includes the first feature data and the second feature data;

[0135] If the distance value between the joint feature data of the first user and other users in the user set is less than a preset distance value, and the number of the other users is greater than a preset number of users, the first user is taken as a user cluster center, and the first user is any user in the user set.

[0136] In one embodiment of the present disclosure, the processing module 402 is specifically configured to:

[0137] Acquire a first distance value of first feature data of the first user and the second user sent by the initiator, and a second distance value of second feature data of the first user and the second user sent by the participant; the second user is any user in the user set except the first user;

[0138] A distance value of joint feature data of the first user and the second user is determined according to the first distance value and the second distance value.

[0139] In one embodiment of the present disclosure, the processing module 402 is specifically configured to:

[0140] Randomly select a user clustering center from the multiple user clustering centers, and determine whether there are other user clustering centers within the neighborhood of the randomly selected user clustering center;

[0141] If there are other user clustering centers, the randomly selected user clustering center and all users within the area where the other user clustering center is located are classified into one category.

[0142] The data clustering device provided in the embodiment of the present disclosure is used to execute the technical solution of any of the aforementioned method embodiments, and its implementation principle and technical effect are similar and will not be repeated here.

[0143] Figure 8 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 8 As shown, the electronic device 500 of this embodiment may include:

[0144] At least one processor 501 ( Figure 8 Only one processor is shown); and

[0145] A memory 502 is communicatively connected to the at least one processor; wherein,

[0146] The memory 502 stores a computer program that can be executed by the at least one processor 501. The computer program is executed by the at least one processor 501 so that the electronic device 500 can perform the technical solution of any of the aforementioned method embodiments.

[0147] Optionally, the memory 502 may be independent or integrated with the processor 501 .

[0148] When the memory 502 is a device independent of the processor 501 , the electronic device 500 further includes a bus 503 for connecting the memory 502 and the processor 501 .

[0149] The electronic device provided by the embodiments of the present disclosure can execute the technical solution of any of the aforementioned method embodiments, and its implementation principles and technical effects are similar, which will not be repeated here.

[0150] The embodiments of the present disclosure further provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, it is used to implement the technical solution of any of the aforementioned method embodiments.

[0151] The embodiments of the present disclosure further provide a computer program product, including a computer program, which implements the technical solution of any of the aforementioned method embodiments when executed by a processor.

[0152] The disclosed embodiment further provides a chip, including: a processing module and a communication interface, wherein the processing module can execute the technical solution of any of the aforementioned method embodiments.

[0153] Furthermore, the chip also includes a storage module (such as a memory), the storage module is used to store instructions, the processing module is used to execute the instructions stored in the storage module, and the execution of the instructions stored in the storage module enables the processing module to execute the technical solution of any of the aforementioned method embodiments.

[0154] It should be understood that the processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented by a hardware processor or implemented by a combination of hardware and software modules in the processor.

[0155] The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a magnetic disk or an optical disk, etc.

[0156] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present disclosure is not limited to only one bus or one type of bus.

[0157] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.

[0158] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in an electronic device.

[0159] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present disclosure, rather than to limit them. Although the present disclosure has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein by equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present disclosure.

Claims

1. A data clustering method, characterized in that: include: Receiving a distance value set from an initiator and a distance value set from a participant, wherein the distance value set of the initiator includes distance values ​​of first feature data of two users in a user set of the initiator, and the distance value set of the participant includes distance values ​​of second feature data of two users in a user set of the participant, the user sets of the initiator and the participant are the same, and the first feature data is different from the second feature data; By traversing each user in the user set, determining a distance value of joint feature data between each user and other users in the user set; the joint feature data includes the first feature data and the second feature data; If the distance value between the joint feature data of the first user and other users in the user set is less than a preset distance value, and the number of the other users is greater than a preset number of users, the first user is taken as a user cluster center, the first user is any user in the user set, and the user cluster center is a user determined from multiple users in the user set; Based on the multiple user cluster centers, determining a clustering result for each user in the user set; the clustering result is used to indicate the class to which each user belongs; The clustering result is returned to the initiator and the participants.

2. The method according to claim 1, characterized in that: The receiving of the distance value set from the initiator and the distance value set from the participants includes: Receive the distance values ​​of the first feature data of each pair of users in the encrypted user set of the initiator and the distance values ​​of the second feature data of each pair of users in the encrypted user set of the participant.

3. The method according to claim 2, characterized in that Before receiving the distance value set from the initiator and the distance value set of the participant, the method includes: Sending a first random number to the initiator, and sending a second random number to the participant, wherein the first random number and the second random number are opposite numbers of each other; The first random number is used by the initiator to encrypt the distance value of the first feature data of each pair of users in the user set of the initiator, and the second random number is used by the participant to encrypt the distance value of the second feature data of each pair of users in the user set of the participant.

4. The method according to claim 1, characterized in that: The determining of the distance value of the joint feature data of each user and other users in the user set includes: Acquire a first distance value of first feature data of the first user and the second user sent by the initiator, and a second distance value of second feature data of the first user and the second user sent by the participant; the second user is any user in the user set except the first user; A distance value of joint feature data of the first user and the second user is determined according to the first distance value and the second distance value.

5. The method according to claim 1, characterized in that The determining, based on the multiple user cluster centers, a clustering result of each user in the user set includes: Randomly select a user clustering center from the multiple user clustering centers, and determine whether there are other user clustering centers within the neighborhood of the randomly selected user clustering center; If there are other user clustering centers, the randomly selected user clustering center and all users within the area where the other user clustering center is located are classified into one category.

6. A data clustering device, characterized in that: include: A receiving module, configured to receive a distance value set from an initiator and a distance value set from a participant, wherein the distance value set of the initiator includes distance values ​​of first feature data of two users in a user set of the initiator, and the distance value set of the participant includes distance values ​​of second feature data of two users in a user set of the participant, the user sets of the initiator and the participant are the same, and the first feature data is different from the second feature data; A processing module, configured to determine a distance value of joint feature data between each user and other users in the user set by traversing each user in the user set; the joint feature data includes the first feature data and the second feature data; If the distance value between the joint feature data of the first user and other users in the user set is less than a preset distance value, and the number of the other users is greater than the preset number of users, the first user is taken as a user cluster center, the first user is any user in the user set, and the user cluster center is a user determined from multiple users in the user set; based on the multiple user cluster centers, a clustering result of each user in the user set is determined; the clustering result is used to indicate the class to which each user belongs; A sending module is used to return the clustering result to the initiator and the participants.

7. An electronic device, characterized in that: The electronic device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program implements the data clustering method according to any one of claims 1 to 5 when executed by the processor.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the data clustering method according to any one of claims 1 to 5 is implemented.

9. A computer program product, characterized in that The invention comprises a computer program, which implements the data clustering method according to any one of claims 1 to 5 when executed by a processor.

Citation Information

Patent Citations

  • Federated data clustering method and device, computer equipment and storage medium

    CN112508203A