Data clustering analysis method and device and secure computing system
By splitting and distributing the array to be analyzed in a secure computing system, and using the dual-server collaborative computing method, the problem of data leakage in cluster analysis is solved, and high security of data transmission and processing is achieved.
Patent Information
- Application Number
- CN202510345744.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2045-03-24
AI Technical Summary
The existing clustering analysis methods are prone to data leakage during data aggregation, resulting in insufficient data security and lack of effective solutions.
By splitting the array to be analyzed into a first array and a second array on the client of the security computing system, and sending it to the first server and the second server respectively, the ciphertext similarity matrix is obtained by co-calculating with dual servers and performing cluster analysis, and the plaintext transmission of data is avoided.
It improves the security of data transmission and processing, ensures the data privacy of each client, solves the data leakage problem caused by cluster analysis, and enhances data security.
Smart Images

Figure CN119884790A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of secure computing technology, and in particular to a data clustering analysis method, device and secure computing system. Background Art
[0002] In the era of big data, various production and life scenarios are closely related to data, and data often contains a large amount of sensitive information that cannot be directly transmitted and analyzed. For example, financial institutions obtain more information through interaction and then accurately model investment scenarios to avoid risks and maximize profits. However, direct data transmission will cause information leakage and may violate data security regulations. Clustering is an important tool for data mining and data analysis. Clustering analysis of data can measure the similarity between different data sources and mine the potential patterns of data. The accuracy of existing clustering analysis modeling methods is mostly based on the centralized aggregation of a large number of data. This method not only faces the challenge of data aggregation, but also easily causes data leakage, posing a challenge to data privacy and security.
[0003] There is currently no effective solution to the problem that cluster analysis in related technologies is prone to data leakage, resulting in insufficient data security. Summary of the invention
[0004] In this embodiment, a data clustering analysis method, device and secure computing system are provided to solve the problem in related technologies that clustering analysis is prone to data leakage, resulting in insufficient data security.
[0005] In a first aspect, a data clustering analysis method is provided in this embodiment, the method is applied to a client in a secure computing system, the secure computing system further includes a first server and a second server that are communicatively connected to a plurality of the clients, the first server and the second server are communicatively connected to each other, the method includes: Splitting the array to be analyzed into a first array and a second array, wherein each element of the array to be analyzed is equal to the sum of the elements at corresponding positions in the first array and the second array; The first array is sent to the first server, and the second array is sent to the second server; wherein the first server and the second server perform collaborative calculations based on the multiple first arrays and the multiple second arrays sent by the multiple clients to obtain a ciphertext similarity matrix between each of the multiple clients, and perform cluster analysis on the multiple clients based on the ciphertext similarity matrix to obtain a clustering result and send it to the multiple clients.
[0006] In some embodiments, the first server and the second server perform collaborative calculation based on the multiple first arrays and the multiple second arrays sent by the multiple clients to obtain the ciphertext similarity matrix between the multiple clients, including: The first server performs collaborative calculation based on the multiple first arrays and the pre-acquired first triples, and the second server performs collaborative calculation based on the multiple second arrays and the pre-acquired second triples, to obtain a first distance matrix and a second distance matrix between the multiple clients; The first server and the second server respectively blind the first distance matrix and the second distance matrix based on the random numbers generated by each server, and perform collaborative calculation to obtain a corresponding ciphertext similarity matrix.
[0007] In some embodiments, the first server performs collaborative calculation based on the plurality of first arrays and pre-acquired first triples with the second server based on the plurality of second arrays and pre-acquired second triples to obtain the first distance matrix and the second distance matrix between the plurality of clients, including: The first server is based on the first array corresponding to the client i <x i >1. The first array corresponding to client j <x j >1, and the first triplet, obtain the first intermediate data and send it to the second server; The second server is based on the second array corresponding to the client i <x i >2. The second array corresponding to the client j <x j >2, and the second triplet, obtain the second intermediate data and send it to the first server; The first server calculates a first distance matrix between the client i and the client j based on the first intermediate data, the second intermediate data and the first triplet; The second server calculates a second distance matrix between the client i and the client j based on the first intermediate data, the second intermediate data and the second triplet.
[0008] In some embodiments, the first server calculates a first distance matrix between the client i and the client j based on the first intermediate data, the second intermediate data and the first triplet, including: The first server calculates a first intermediate array and a second intermediate array based on the first intermediate data and the second intermediate data; The first server calculates the first distance matrix based on the first intermediate array, the second intermediate array, and the first triplet.
[0009] In some embodiments, the first server and the second server respectively blind the first distance matrix and the second distance matrix based on the random numbers generated by each server, and perform collaborative calculation to obtain the corresponding ciphertext similarity matrix including: The first server obtains third intermediate data based on the first distance matrix, the first triplet and a pre-generated first random number and sends the third intermediate data to the second server; The second server obtains fourth intermediate data based on the second distance matrix, the second triplet and a pre-generated second random number, and sends the fourth intermediate data to the first server; The first server calculates a first similarity matrix based on the third intermediate data, the fourth intermediate data and the first triplet, and sends the first similarity matrix to the second server; The second server calculates a second similarity matrix based on the third intermediate data, the fourth intermediate data and the second triplet; and calculates the ciphertext similarity matrix based on the first similarity matrix and the second similarity matrix.
[0010] In some embodiments, the first server calculates a first similarity matrix based on the third intermediate data, the fourth intermediate data and the first triplet, including: The first server calculates a third intermediate array and a fourth intermediate array based on the third intermediate data and the fourth intermediate data; The first server calculates the first similarity matrix based on the third intermediate array, the fourth intermediate array and the first triplet.
[0011] In some of the embodiments, the secure computing system further includes a key center, The key center splits the pre-generated multiplication triplet into the first triplet and the second triplet, sends the first triplet to the first server, and sends the second triplet to the second server; each element of the multiplication triplet is equal to the sum of the elements in the corresponding positions in the first triplet and the second triplet.
[0012] In some embodiments, performing cluster analysis on the multiple clients based on the ciphertext similarity matrix, obtaining clustering results and sending them to the multiple clients includes: Based on a ciphertext similarity matrix between two of the plurality of clients in the client set, dividing the client set into a first client set and a second client set; Obtaining a minimum value in a ciphertext similarity matrix between each client in the first client set and each client in the second client set; When the minimum value is greater than a preset similarity threshold, the client set is updated and the above steps are repeated until a clustering result is obtained.
[0013] In a second aspect, a data clustering analysis device is provided in this embodiment, the device is applied to a client in a secure computing system, the secure computing system further includes a first server and a second server that are communicatively connected to a plurality of the clients, the first server and the second server are communicatively connected to each other, and the device includes: A splitting module, used for splitting the array to be analyzed into a first array and a second array, each element of the array to be analyzed is equal to the sum of the elements at corresponding positions in the first array and the second array; A sending module is used to send the first array to the first server and send the second array to the second server; wherein the first server and the second server perform collaborative calculations based on the multiple first arrays and the multiple second arrays sent by the multiple clients to obtain a ciphertext similarity matrix between the multiple clients, and perform cluster analysis on the multiple clients based on the ciphertext similarity matrix to obtain a clustering result and send it to the multiple clients.
[0014] According to a third aspect, a secure computing system is provided in this embodiment, wherein the secure computing system comprises a first server and a second server that are communicatively connected to each other, and a plurality of clients that are communicatively connected to the first server and the second server respectively, wherein the clients comprise the data clustering analysis device as described in the second aspect.
[0015] Compared with the related art, the data clustering analysis method provided in this embodiment splits the array to be analyzed into a first array and a second array through a client in a secure computing system, sends the first array to a first server, sends the second array to a second server, and splits the privacy data and sends them to the two servers respectively, thereby avoiding the plaintext transmission of the data to be analyzed and improving the security of data transmission; the first server and the second server perform collaborative calculations based on multiple first arrays and multiple second arrays sent by multiple clients to obtain a ciphertext similarity matrix between multiple clients, introduce dual servers for secure multi-party computing, and improve the security of data processing; the first server and the second server perform cluster analysis on multiple clients based on the ciphertext similarity matrix, obtain clustering results and send them to multiple clients, and the dual servers participate in the cluster analysis to ensure the data security of each client, and solve the problem that cluster analysis easily causes data leakage and leads to insufficient data security.
[0016] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 is a structural block diagram of a secure computing system in some embodiments of the present application; Figure 2 is a flow chart of a data clustering analysis method according to some embodiments of the present application; Figure 3 is a flowchart of obtaining a ciphertext similarity matrix in some embodiments of the present application; Figure 4 is a flowchart of obtaining the first distance matrix and the second distance matrix in some embodiments of the present application; Figure 5 is a calculation flow chart of the ciphertext similarity matrix of some embodiments of the present application; Figure 6 is a cluster analysis flow chart of some embodiments of the present application; Figure 7 is a flow chart of a data clustering analysis method of some preferred embodiments of the present application; Figure 8 It is a structural block diagram of a data clustering analysis device in some embodiments of the present application. DETAILED DESCRIPTION
[0018] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0019] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0020] The data clustering analysis method provided in the embodiment of the present application can be executed on a client in a secure computing system. Figure 1 is a structural block diagram of a secure computing system in some embodiments of the present application. Figure 1 As shown, the secure computing system includes a plurality of clients DO1, DO2, ..., DOn, and a first server S1 and a second server S2 that are connected to the plurality of clients for communication. The first server S1 and the second server S2 are connected to each other for communication. A person skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned secure computing system. Figure 1 There are more components shown in the figure, which are not limited in this embodiment.
[0021] In this embodiment, a data clustering analysis method is provided, which is applied to a client in a secure computing system. Figure 2 is a flow chart of a data clustering analysis method according to some embodiments of the present application, such as Figure 2 As shown, the process includes the following steps: Step S201 : splitting the array to be analyzed into a first array and a second array, wherein each element of the array to be analyzed is equal to the sum of the elements at corresponding positions in the first array and the second array.
[0022] The data that needs to be analyzed and processed by each client in the secure computing system can be represented in the form of an array, that is, the array to be analyzed. The number of elements contained in the array to be analyzed of each client is the same. For example, for clients i and j, their arrays to be analyzed are: Each client splits its own array to be analyzed into a first array and a second array. For example, the array to be analyzed x i Split into first array <x i >1 and second array <x i >2, and x i = <x i >1+ <x i >2, that is, x i Each element of the first array is equal to <x i >1 and second array <x i >The sum of the elements in corresponding positions in 2.
[0023] Step S202, sending the first array to the first server, and sending the second array to the second server; wherein the first server and the second server perform collaborative calculations based on the multiple first arrays and the multiple second arrays sent by the multiple clients to obtain a ciphertext similarity matrix between the multiple clients, and perform cluster analysis on the multiple clients based on the ciphertext similarity matrix, obtain clustering results and send them to the multiple clients.
[0024] After the client completes the array splitting, it sends the first array to the first server and the second array to the second server, avoiding the plaintext transmission of the data to be analyzed. The first server performs collaborative calculations based on the first arrays corresponding to each client, and the second server performs collaborative calculations based on the second arrays corresponding to each client to obtain a ciphertext similarity matrix between multiple clients. Among them, the ciphertext similarity matrix is used to describe the data similarity between two clients. Specifically, the collaborative calculation method can include two servers respectively calculating their respective arrays based on the same algorithm to obtain local calculation results, and transmitting the local calculation results to another server. The two servers then calculate based on the local calculation results and the calculation results received from the other server, and finally obtain the ciphertext similarity matrix between the two clients.
[0025] Then, the first server or the second server performs cluster analysis on the multiple clients based on the ciphertext similarity matrix of the multiple clients to obtain a clustering result. The clustering result divides the multiple clients into multiple classes, and the clients in the same class have similar data. There are many mature algorithms for cluster analysis, which will not be described here.
[0026] Through steps S201~S202, the array to be analyzed is split into a first array and a second array by the client in the secure computing system, the first array is sent to the first server, the second array is sent to the second server, and the privacy data is split and sent to the two servers respectively, thereby avoiding the plaintext transmission of the data to be analyzed and improving the security of data transmission; the first server and the second server perform collaborative calculations based on the multiple first arrays and the multiple second arrays sent by the multiple clients to obtain the ciphertext similarity matrix between the multiple clients, introduce dual servers for secure multi-party computing, and improve the security of data processing; the first server and the second server perform cluster analysis on the multiple clients based on the ciphertext similarity matrix, obtain clustering results and send them to the multiple clients, and the dual servers participate in the cluster analysis, thereby ensuring the data security of each client and solving the problem that cluster analysis easily causes data leakage and leads to insufficient data security.
[0027] In a further embodiment, the secure computing system may further include a key center connected to the first server and the second server. The key center splits the pre-generated multiplication triple into a first triple and a second triple, sends the first triple to the first server, and sends the second triple to the second server; each element of the multiplication triple is equal to the sum of the elements at corresponding positions in the first triple and the second triple.
[0028] The key center may generate a multiplication triplet (u, v, z) in advance, where z = uv. The key center may split the multiplication triplet (u, v, z) to obtain a first triplet (u1, v1, z1) and a second triplet (u2, v2, z2), and make u = u1 + u2, v = v1 + v2, and z = z1 + z2. The key center sends (u1, v1, z1) to the first server and sends (u2, v2, z2) to the second server.
[0029] The first server may perform collaborative calculations based on the first triplet (u1, v1, z1) and the first array, and the second server may perform collaborative calculations based on the second triplet (u2, v2, z2) and the second array to obtain a ciphertext similarity matrix between each of the multiple clients.
[0030] The data clustering analysis method of this embodiment splits the multiplication triplet into the first triplet and the second triplet through the key center and sends them to the first server and the second server respectively, and uses the split first triplet and the second triplet as auxiliary parameters for encryption calculation. The first server and the second server encrypt and decrypt the first array and the second array during the data calculation process through the auxiliary parameters, thereby improving the security of the data processing process.
[0031] In some embodiments, Figure 3is a flowchart of obtaining the ciphertext similarity matrix of some embodiments of the present application, such as Figure 3 As shown, the process includes the following steps: Step S301: The first server performs collaborative calculation based on multiple first arrays and pre-acquired first triples and the second server performs collaborative calculation based on multiple second arrays and pre-acquired second triples to obtain first distance matrices and second distance matrices between multiple clients.
[0032] The first distance matrix and the second distance matrix may be used to describe the Euclidean distance calculation results between each element of the first array and the second array of client i and each element of the first array and the second array of client j. Specifically, the first server may use the first triplet as an auxiliary parameter for calculating the Euclidean distance between the first array element of client i and the first array element of client j, and the second server may use the second triplet as an auxiliary parameter for calculating the Euclidean distance between the second array element of client i and the second array element of client j.
[0033] In some embodiments, after the first server and the second server obtain the calculation results respectively, they send their own calculation results to each other, and then the first server performs calculations based on the calculation results obtained by itself and the calculation results sent by the second server to obtain a first distance matrix; the second server performs calculations based on the calculation results obtained by itself and the calculation results sent by the first server to obtain a second distance matrix.
[0034] In step S302, the first server and the second server respectively blind the first distance matrix and the second distance matrix based on the random numbers generated by each server, and perform collaborative calculation to obtain corresponding ciphertext similarity matrices.
[0035] Specifically, the first server can generate a first random number, and use the first triplet and the first random number as auxiliary parameters for blind calculation of the first distance matrix to obtain the calculation result after blind processing; the second server can generate a second random number, and use the second triplet and the second random number as auxiliary parameters for blind calculation of the second distance matrix to obtain the calculation result after blind processing.
[0036] In some embodiments, similar to step S301, the first server and the second server respectively send their own calculation results after blinding processing to each other, and then the first server performs calculations based on the calculation results obtained by itself and the calculation results sent by the second server to obtain a first similarity matrix; the second server performs calculations based on the calculation results obtained by itself and the calculation results sent by the first server to obtain a second similarity matrix. Finally, the first server and the second server can exchange data again, and either server can calculate the ciphertext similarity matrix based on the first similarity matrix and the second similarity matrix.
[0037] Through steps S301~S302, the first server performs collaborative calculations based on multiple first arrays and pre-acquired first triples, and the second server performs collaborative calculations based on multiple second arrays and pre-acquired second triples to obtain first distance matrices and second distance matrices between multiple clients. In the case where the first server and the second server do not obtain real data to be analyzed, Euclidean distance calculations of data between different clients are completed through triples, thereby protecting the data privacy of the clients. The first server and the second server blind the first distance matrix and the second distance matrix based on random numbers generated by each server, and perform collaborative calculations to obtain corresponding ciphertext similarity matrices, thereby providing accurate basic data for clustering analysis and further improving the security and privacy of data analysis.
[0038] In some embodiments, Figure 4 is a flowchart of obtaining the first distance matrix and the second distance matrix in some embodiments of the present application, such as Figure 4 As shown, the process includes the following steps: Step S401: The first server generates a first array corresponding to the client i. <x i >1. The first array corresponding to client j <x j >1, and the first triplet, obtain the first intermediate data and send it to the second server.
[0039] Specifically, the first server may be based on the first array corresponding to the client i <x i >1. The first array corresponding to client j <x j >1. In the first triple (u1,v1,z1) <u1>and <v1>, calculate the first intermediate data <e ij >1. <f ij >1: The first server sends the first intermediate data <e ij >1. <f ij >1 is sent to the second server.
[0040] Step S402: The second server generates a second array corresponding to the client i. <x i >2. The second array corresponding to client j <x j >2, and the second triplet, obtain the second intermediate data and send it to the first server.
[0041] Similarly, the second server may be based on the second array corresponding to the client i <x i >2. The second array corresponding to client j <x j >2, in the second triple (u2,v2,z2) <u2>and <v2>, calculate the second intermediate data <e ij >2. <f ij >2: The second server sends the second intermediate data <e ij >2. <f ij >2 is sent to the first server.
[0042] Step S401 and step S402 may be performed in reverse order or simultaneously.
[0043] Step S403: The first server calculates a first distance matrix between the client i and the client j based on the first intermediate data, the second intermediate data and the first triplet.
[0044] Specifically, the step of obtaining the first distance matrix may include: Step S4031: The first server calculates a first intermediate array and a second intermediate array based on the first intermediate data and the second intermediate data.
[0045] The first server sends the first intermediate data <e ij >1. <f ij >1 and second intermediate data <e ij >2. <f ij >2 Sum the corresponding values in the following way to get the first intermediate array e ij and the second intermediate array f ij : Step S4032: The first server calculates a first distance matrix based on the first intermediate array, the second intermediate array, and the first triplet.
[0046] The first server may be configured to generate a first intermediate array e ij , the second intermediate array f ij And the first triple (u1, v1, z1), calculate the first distance matrix according to the following equation <D ij >1: Step S404: The second server calculates a second distance matrix between the client i and the client j based on the first intermediate data, the second intermediate data and the second triplet.
[0047] Specifically, the second server is based on the first intermediate data <e ij >1. <f ij >1. Second intermediate data <e ij >2. <f ij >2, calculate the first intermediate array e ij and the second intermediate array f ij This process is the same as step S4031 and will not be described again here.
[0048] Then, the second server can use the first intermediate array e ij , the second intermediate array f ij And the second triple (u2, v2, z2), calculate the second distance matrix according to the following equation <D ij >2: Step S403 and step S404 may be performed in reverse order or simultaneously.
[0049] Through steps S401 to S404, the first intermediate data and the second intermediate data are calculated by the first server and the second server respectively and sent to each other, and the first distance matrix and the second distance matrix are calculated. Without obtaining the actual data to be analyzed by the client, the Euclidean distance between the data to be analyzed of the clients i and j can be evaluated, thereby protecting the data privacy of the clients.
[0050] In some embodiments, Figure 5 is a calculation flow chart of the ciphertext similarity matrix of some embodiments of the present application, such as Figure 5 As shown, the process includes the following steps: Step S501: The first server obtains third intermediate data based on the first distance matrix, the first triplet and the pre-generated first random number and sends the third intermediate data to the second server.
[0051] Specifically, the first server can use the following equation based on the first distance matrix <D ij >1. The first triple (u1, v1, z1) and the first pre-generated random number <r i >1, get the third intermediate data <E ij >1. <F ij >1: The first server sends the third intermediate data <E ij >1. <F ij >1 is sent to the second server.
[0052] Step S502: The second server obtains fourth intermediate data based on the second distance matrix, the second triplet and the pre-generated second random number and sends the fourth intermediate data to the first server.
[0053] Similarly, the second server can use the following equation based on the second distance matrix <D ij >2, the second triple (u2, v2, z2) and the pre-generated second random number <r i >2, get the fourth intermediate data <E ij >2. <F ij >2: The second server sends the fourth intermediate data <E ij >2. <F ij >2 is sent to the first server.
[0054] Step S501 and step S502 may be performed in reverse order or simultaneously.
[0055] Step S503: The first server calculates a first similarity matrix based on the third intermediate data, the fourth intermediate data and the first triplet, and sends the first similarity matrix to the second server.
[0056] Specifically, the step of obtaining the first similarity matrix may include: Step S5031: The first server calculates a third intermediate array and a fourth intermediate array based on the third intermediate data and the fourth intermediate data.
[0057] The first server sends the third intermediate data <E ij >1. <F ij >1 and the fourth intermediate data <E ij >2. <F ij >2 Sum the corresponding values in the following way to obtain the third intermediate array E ij and the fourth intermediate array F ij : Step S5032: The first server calculates a first similarity matrix based on the third intermediate array, the fourth intermediate array, and the first triplet.
[0058] The first server may be configured to generate a plurality of intermediate arrays according to the third intermediate array E. ij , the fourth intermediate array F ij And the first triple (u1, v1, z1), calculate the first similarity matrix according to the following equation <G ij >1: The first server may <G ij >1 is sent to the second server.
[0059] Step S504: The second server calculates a second similarity matrix based on the third intermediate data, the fourth intermediate data, and the second triplet; and calculates a ciphertext similarity matrix based on the first similarity matrix and the second similarity matrix.
[0060] Specifically, the second server is based on the third intermediate data <E ij >1. <F ij >1. Fourth intermediate data <E ij >2. <F ij >2, calculate the third intermediate array E ij and the fourth intermediate array F ij This process is the same as step S5031 and will not be described again here.
[0061] Then, the second server can use the third intermediate array E ij , the fourth intermediate array F ij And the second triple (u2, v2, z2), calculate the second similarity matrix according to the following equation <G ij >2: In some embodiments, the second server sends the second similarity matrix <G ij >2 is sent to the first server, and the first server calculates the ciphertext similarity matrix based on the following formula; in other embodiments, the first server sends the first similarity matrix <G ij >1 is sent to the second server, and the second server calculates the ciphertext similarity matrix G based on the following formula ij : Step S503 and step S504 may be performed in reverse order or simultaneously.
[0062] Through steps S501 to S504, the third intermediate data and the fourth intermediate data are calculated by the first server and the second server respectively and sent to each other, and the first similarity matrix and the second similarity matrix are calculated. When the data of the distance matrix is blinded by random numbers, the similarity between the data to be analyzed of the clients i and j is evaluated by the blinded intermediate data, thereby improving the data security of the client while obtaining the similarity data.
[0063] In some embodiments, Figure 6 is a cluster analysis flow chart of some embodiments of the present application, such as Figure 6 As shown, the process includes the following steps: Step S601: dividing the client set into a first client set and a second client set based on a ciphertext similarity matrix between two or more clients in the client set.
[0064] Suppose multiple clients are DO1, DO2, ..., DOn, n ≥ 2, and there is a corresponding ciphertext similarity matrix between any two clients. Divide the client set c consisting of multiple clients into two subsets, the first client set c1 and the second client set c2, so that c1∪c2=c, and satisfy max i∈c1,j∈c2 (D ij ) is the smallest, that is, the maximum value of the ciphertext similarity matrix between any client in the first client set c1 and any client in the second client set c2 is the smallest.
[0065] Step S602: Obtain the minimum value in the ciphertext similarity matrix between each client in the first client set and each client in the second client set.
[0066] The first client set c1 and the second client set c2 are traversed to obtain the minimum value in the ciphertext similarity matrix between any client in the first client set c1 and any client in the second client set c2.
[0067] Step S603: when the minimum value is greater than a preset similarity threshold, the client set is updated and the above steps are repeated until a clustering result is obtained.
[0068] If the minimum value is greater than the preset similarity threshold, the client set is updated. Specifically, the client set with more clients in the first client set c1 and the second client set c2 is assigned to the client set c, and then the above steps S601 to S603 are repeated until the minimum value in the ciphertext similarity matrix between any client in the first client set and any client in the second client set is less than the similarity threshold, the clustering analysis ends, and the final clustering result is obtained.
[0069] Through steps S601 to S603, the client set is divided into a first client set and a second client set based on a ciphertext similarity matrix between two or more clients in the client set, thereby completing preliminary client clustering based on data similarity; by obtaining the minimum value in the ciphertext similarity matrix between each client in the first client set and each client in the second client set, when the minimum value is greater than a preset similarity threshold, the client set is updated and the above steps are repeated until a clustering result is obtained, and multiple clients are clustered into multiple client sets according to the preset threshold, thereby completing cluster analysis.
[0070] The preferred embodiment of the present application is described and illustrated below. The preferred embodiment of the present application is applied to a client in a secure computing system, the secure computing system also includes a key center, a first server and a second server that are connected to the key center and multiple clients, and the first server and the second server are connected to each other. Figure 7 is a flow chart of a data clustering analysis method of some preferred embodiments of the present application, such as Figure 7 As shown, the process includes the following steps: Step S701, the key center generates a multiplication triple (u, v, z), where z=uv; splits the multiplication triple into a first triple (u1, v1, z1) and a second triple (u2, v2, z2), and makes u= u1+ u2, v=v1+v2, z=z1+z2; Step S702, the key center sends (u1, v1, z1) to the first server and sends (u2, v2, z2) to the second server; Step S703, the client splits the local data into a first array and a second array, each element of the array to be analyzed is equal to the sum of the elements at corresponding positions in the first array and the second array; sends the first array to the first server, and sends the second array to the second server; Step S704, the first server calculates and sends to the second server; Step S705, the second server calculates and sends to the first server; Step S706: The first server and the second server respectively calculate: Step S707, the first server calculates: Step S708, the second server calculates: Step S709: The first server generates a random number <r i >1, calculate and send to the second server; Step S710: The second server generates a random number <r i >2, calculate and send to the first server: Step S711, the first server and the second server respectively calculate: Step S712, the first server calculates and sends to the second server; Step S713: The second server calculates and obtains the ciphertext similarity matrix G ij : Step S714, dividing the client set into a first client set and a second client set based on a ciphertext similarity matrix between two of the multiple clients in the client set; Step S715, obtaining the minimum value in the ciphertext similarity matrix between each client in the first client set and each client in the second client set; Step S716, when the minimum value is greater than the preset similarity threshold, the client set is updated and steps S714 to S716 are repeated until a clustering result is obtained and sent to each client.
[0071] Through steps S701 to S716, the multiplication triplet is split into the first triplet and the second triplet by the key center and sent to the first server and the second server respectively. The first triplet and the second triplet play an encryption role in the data calculation process of the first array and the second array, thereby improving the security of the data processing process; the array to be analyzed is split into the first array and the second array by the client, the first array is sent to the first server, and the second array is sent to the second server, thereby avoiding the plaintext transmission of the data to be analyzed, thereby improving the security of data transmission, and introducing dual servers for secure multi-party computing, thereby improving the security of data processing; the first server and the second server calculate multiple first arrays and multiple second arrays based on multiple clients. , perform collaborative calculation to obtain the first distance matrix and the second distance matrix between multiple clients, and complete the Euclidean distance calculation of data between different clients without the first server and the second server obtaining the real data to be analyzed, thereby protecting the data privacy of the clients; through the blinding processing of random numbers, the corresponding ciphertext similarity matrix is obtained, which provides accurate basic data for cluster analysis and further improves the security and privacy of data analysis; by performing cluster analysis on multiple clients based on the ciphertext similarity matrix, the clustering results are obtained and sent to multiple clients, and cluster analysis is performed by dual servers, thereby ensuring the data security of each client and solving the problem that cluster analysis is prone to data leakage and insufficient data security.
[0072] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0073] In some embodiments, the present application also provides a data clustering analysis device, which uses a client in a secure computing system, and the secure computing system also includes a first server and a second server that are communicatively connected to multiple clients, and the first server and the second server are communicatively connected to each other. The data clustering analysis device is used to implement the above-mentioned embodiments and preferred implementation modes, and those that have been explained will not be repeated. The terms "module", "unit", "subunit", etc. used below can be a combination of software and / or hardware that can implement predetermined functions.
[0074] In some embodiments, Figure 8 is a structural block diagram of a data clustering analysis device in some embodiments of the present application, such as Figure 8 As shown, the device comprises: A splitting module 801 is used to split the array to be analyzed into a first array and a second array, wherein each element of the array to be analyzed is equal to the sum of the elements at corresponding positions in the first array and the second array; The sending module 802 is used to send the first array to the first server and the second array to the second server; wherein the first server and the second server perform collaborative calculations based on the multiple first arrays and the multiple second arrays sent by the multiple clients to obtain a ciphertext similarity matrix between the multiple clients, and perform cluster analysis on the multiple clients based on the ciphertext similarity matrix to obtain clustering results and send them to the multiple clients.
[0075] The data clustering analysis device of this embodiment splits the array to be analyzed into a first array and a second array through a splitting module 801, sends the first array to the first server, and sends the second array to the second server, and sends the privacy data to the two servers after splitting, thereby avoiding the plain text transmission of the data to be analyzed and improving the security of data transmission; sends the first array to the first server and the second array to the second server through a sending module 802, and performs collaborative calculations based on multiple first arrays and multiple second arrays sent by multiple clients by the first server and the second server to obtain a ciphertext similarity matrix between multiple clients, introduces dual servers for secure multi-party computing, and improves the security of data processing; performs clustering analysis on multiple clients based on the ciphertext similarity matrix by the first server and the second server, obtains clustering results and sends them to multiple clients, and uses dual servers to participate in clustering analysis, thereby ensuring the data security of each client and solving the problem that clustering analysis easily causes data leakage and leads to insufficient data security.
[0076] In some embodiments, the present application also provides a secure computing system, which includes a first server and a second server that are communicatively connected to each other, and multiple clients that are respectively communicatively connected to the first server and the second server, and the client includes the data clustering analysis device in the above embodiment.
[0077] The secure computing system of this embodiment splits the array to be analyzed into a first array and a second array through a data clustering analysis device, thereby avoiding plaintext transmission of the data to be analyzed and improving the security of data transmission; by introducing dual servers for secure multi-party computing, the security of data processing is improved, and the problem of insufficient data security caused by data leakage due to clustering analysis is solved.
[0078] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0079] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0080] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0081] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
[0082] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.
Claims
1. A data clustering analysis method, characterized in that: The method is applied to a client in a secure computing system, wherein the secure computing system further comprises a first server and a second server that are communicatively connected to a plurality of the clients, wherein the first server and the second server are communicatively connected to each other, and the method comprises: Splitting the array to be analyzed into a first array and a second array, wherein each element of the array to be analyzed is equal to the sum of the elements at corresponding positions in the first array and the second array; The first array is sent to the first server, and the second array is sent to the second server; wherein the first server and the second server perform collaborative calculations based on the multiple first arrays and the multiple second arrays sent by the multiple clients to obtain a ciphertext similarity matrix between each of the multiple clients, and perform cluster analysis on the multiple clients based on the ciphertext similarity matrix to obtain a clustering result and send it to the multiple clients.
2. The method according to claim 1, characterized in that The first server and the second server perform collaborative calculation based on the multiple first arrays and the multiple second arrays sent by the multiple clients to obtain the ciphertext similarity matrix between the multiple clients, including: The first server performs collaborative calculation based on the multiple first arrays and the pre-acquired first triples, and the second server performs collaborative calculation based on the multiple second arrays and the pre-acquired second triples, to obtain a first distance matrix and a second distance matrix between the multiple clients; The first server and the second server respectively blind the first distance matrix and the second distance matrix based on the random numbers generated by each server, and perform collaborative calculation to obtain a corresponding ciphertext similarity matrix.
3. The method according to claim 2, characterized in that The first server performs collaborative calculation based on the multiple first arrays and the pre-acquired first triples, and the second server performs collaborative calculation based on the multiple second arrays and the pre-acquired second triples, to obtain the first distance matrix and the second distance matrix between the multiple clients, including: The first server is based on the first array corresponding to the client i <x i >1. The first array corresponding to client j <x j >1, and the first triplet, obtain the first intermediate data and send it to the second server; The second server is based on the second array corresponding to the client i <x i >2. The second array corresponding to the client j <x j >2, and the second triplet, obtain the second intermediate data and send it to the first server; The first server calculates a first distance matrix between the client i and the client j based on the first intermediate data, the second intermediate data and the first triplet; The second server calculates a second distance matrix between the client i and the client j based on the first intermediate data, the second intermediate data and the second triplet.
4. The method according to claim 3, characterized in that: The first server calculates a first distance matrix between the client i and the client j based on the first intermediate data, the second intermediate data and the first triplet, including: The first server calculates a first intermediate array and a second intermediate array based on the first intermediate data and the second intermediate data; The first server calculates the first distance matrix based on the first intermediate array, the second intermediate array, and the first triplet.
5. The method according to claim 2, characterized in that: The first server and the second server respectively perform blind processing on the first distance matrix and the second distance matrix based on the random numbers generated by each server, and perform collaborative calculation to obtain the corresponding ciphertext similarity matrix including: The first server obtains third intermediate data based on the first distance matrix, the first triplet and a pre-generated first random number and sends the third intermediate data to the second server; The second server obtains fourth intermediate data based on the second distance matrix, the second triplet and a pre-generated second random number, and sends the fourth intermediate data to the first server; The first server calculates a first similarity matrix based on the third intermediate data, the fourth intermediate data and the first triplet, and sends the first similarity matrix to the second server; The second server calculates a second similarity matrix based on the third intermediate data, the fourth intermediate data and the second triplet; and calculates the ciphertext similarity matrix based on the first similarity matrix and the second similarity matrix.
6. The method according to claim 5, characterized in that The first server calculates a first similarity matrix based on the third intermediate data, the fourth intermediate data and the first triplet, including: The first server calculates a third intermediate array and a fourth intermediate array based on the third intermediate data and the fourth intermediate data; The first server calculates the first similarity matrix based on the third intermediate array, the fourth intermediate array and the first triplet.
7. The method according to claim 2, characterized in that: The secure computing system further includes a key center, The key center splits the pre-generated multiplication triplet into the first triplet and the second triplet, sends the first triplet to the first server, and sends the second triplet to the second server; each element of the multiplication triplet is equal to the sum of the elements in the corresponding positions in the first triplet and the second triplet.
8. The method according to claim 1, characterized in that The performing cluster analysis on the multiple clients based on the ciphertext similarity matrix, obtaining clustering results and sending the clustering results to the multiple clients comprises: Based on a ciphertext similarity matrix between two of the plurality of clients in the client set, dividing the client set into a first client set and a second client set; Obtaining a minimum value in a ciphertext similarity matrix between each client in the first client set and each client in the second client set; When the minimum value is greater than a preset similarity threshold, the client set is updated and the above steps are repeated until a clustering result is obtained.
9. A data clustering analysis device, characterized in that: The device is applied to a client in a secure computing system, the secure computing system further comprising a first server and a second server connected to the plurality of clients for communication, the first server and the second server being connected to each other for communication, and the device comprising: A splitting module, used for splitting the array to be analyzed into a first array and a second array, each element of the array to be analyzed is equal to the sum of the elements at corresponding positions in the first array and the second array; A sending module is used to send the first array to the first server and send the second array to the second server; wherein the first server and the second server perform collaborative calculations based on the multiple first arrays and the multiple second arrays sent by the multiple clients to obtain a ciphertext similarity matrix between the multiple clients, and perform cluster analysis on the multiple clients based on the ciphertext similarity matrix to obtain a clustering result and send it to the multiple clients.
10. A secure computing system, characterized in that: The secure computing system includes a first server and a second server that are communicatively connected to each other, and a plurality of clients that are communicatively connected to the first server and the second server respectively, and the clients include the data clustering analysis device as described in claim 9.
Citation Information
Patent Citations
Service competitiveness realization system and method based on social contact network
CN103455593A
Federal learning video recommendation method, system and device based on clustering
CN117033698A
Clustering federal learning method based on perception of data difference between clients
CN117494846A
Robustness federated learning method and system based on Euclidean distance, and storage medium
CN118195030A
Multi-client data privacy processing method, system, device, medium and product
CN118410521A