Data clustering analysis method, device and secure computing system
By splitting the array to be analyzed in the security computing system and sending it to a dual server for collaborative calculation, the ciphertext similarity matrix is generated, and the problem of data leakage in clustering analysis is solved, achieving safe and efficient data clustering analysis.
Patent Information
- Application Number
- CN202510345744.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-24
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2045-03-24
AI Technical Summary
Existing cluster analysis methods are prone to data leakage, resulting in insufficient data security, and inability to conduct effective data mining and analysis while ensuring data privacy.
By splitting the array to be analyzed into a first array and a second array, and sending it to the first server and the second server for collaborative calculations, a ciphertext similarity matrix between the clients is generated, and a dual server is used for secure multi-party calculations to avoid plaintext transmission. The triplet generated by the key center is used for encryption calculations, and the random number blinding processing is combined to ensure data security.
It improves the security of data transmission and processing security, ensures the data security of the client, solves the problem of data leakage in cluster analysis, and realizes data clustering analysis that ensures privacy.
Smart Images

Figure CN119884790B_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, which often contains a large amount of sensitive information that cannot be directly transmitted, analyzed, or processed. For example, financial institutions use interactions to obtain more information and accurately model investment scenarios to mitigate risks and maximize profits. However, directly transmitting data can lead to information leakage and may violate data security regulations. Clustering is a key tool for data mining and analysis. Cluster analysis can measure the similarities between different data sources and uncover potential patterns in the data. However, the accuracy of existing cluster analysis modeling methods is mostly based on the centralized aggregation of large data sets. This approach not only faces the challenges of data aggregation but is also prone to data leakage, posing challenges to data privacy and security.
[0003] Currently, no effective solution has been proposed to address the problem that cluster analysis in related technologies is prone to data leakage and leads to insufficient data security. Summary of the Invention
[0004] In this embodiment, a data cluster analysis method, device, and secure computing system are provided to solve the problem in related technologies that cluster analysis is prone to data leakage and leads to insufficient data security.
[0005] In a first aspect, this embodiment provides a data clustering analysis method, which is applied to a client in a secure computing system. The secure computing system also includes a first server and a second server that are communicatively connected to a plurality of the clients, and the first server and the second server are communicatively connected to each other. The method includes:
[0006] 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;
[0007] 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 calculation based on the multiple first arrays and the multiple second arrays sent by the multiple clients to obtain a ciphertext similarity matrix between each two 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.
[0008] In some embodiments, the first server and the second server perform collaborative calculation based on the plurality of first arrays and the plurality of second arrays sent by the plurality of clients to obtain a ciphertext similarity matrix between each of the plurality of clients, including:
[0009] The first server performs collaborative calculation based on the multiple first arrays and pre-acquired first triples, and the second server performs collaborative calculation based on the multiple second arrays and pre-acquired second triples, to obtain a first distance matrix and a second distance matrix between each of the multiple clients;
[0010] 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 corresponding ciphertext similarity matrices.
[0011] In some embodiments, the first server performs collaborative calculation based on the plurality of first arrays and pre-acquired first triples, and the second server performs collaborative calculation based on the plurality of second arrays and pre-acquired second triples, to obtain first distance matrices and second distance matrices between the plurality of clients, comprising:
[0012] 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 first intermediate data and send it to the second server;
[0013] 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 second intermediate data and send it to the first server;
[0014] 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;
[0015] 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.
[0016] In some embodiments, the first server calculating 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 includes:
[0017] The first server calculates a first intermediate array and a second intermediate array based on the first intermediate data and the second intermediate data;
[0018] The first server calculates the first distance matrix based on the first intermediate array, the second intermediate array, and the first triplet.
[0019] In some embodiments, the first server and the second server respectively perform blinding 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:
[0020] 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;
[0021] 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;
[0022] 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;
[0023] 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.
[0024] In some embodiments, the first server calculating a first similarity matrix based on the third intermediate data, the fourth intermediate data, and the first triplet includes:
[0025] The first server calculates a third intermediate array and a fourth intermediate array based on the third intermediate data and the fourth intermediate data;
[0026] The first server calculates the first similarity matrix based on the third intermediate array, the fourth intermediate array, and the first triplet.
[0027] In some embodiments, the secure computing system further includes a key center,
[0028] 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.
[0029] In some embodiments, 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 includes:
[0030] Dividing the client set into a first client set and a second client set based on a ciphertext similarity matrix between two of the clients in the client set;
[0031] 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;
[0032] 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.
[0033] In a second aspect, this embodiment provides a data cluster analysis device, which is applied to a client in a secure computing system. The secure computing system also includes a first server and a second server that are communicatively connected to the plurality of clients. The first server and the second server are communicatively connected to each other. The device includes:
[0034] a splitting module, configured 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;
[0035] The sending module is configured 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 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.
[0036] On the third aspect, a secure computing system is provided in this embodiment, which 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 the second aspect.
[0037] 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 the client in the secure computing system, sends the first array to the first server, sends the second array to the second server, and splits the privacy data and sends them to the two servers respectively, 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 the clustering results and send them to the multiple clients, and the dual servers participate in the cluster analysis, which ensures the data security of each client and solves the problem that cluster analysis easily causes data leakage and leads to insufficient data security.
[0038] The 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
[0039] 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:
[0040] Figure 1 is a structural block diagram of a secure computing system according to some embodiments of the present application;
[0041] Figure 2 is a flow chart of a data clustering analysis method according to some embodiments of the present application;
[0042] Figure 3 This is a flowchart for obtaining a ciphertext similarity matrix in some embodiments of the present application;
[0043] Figure 4 is a flowchart for obtaining the first distance matrix and the second distance matrix in some embodiments of the present application;
[0044] Figure 5 is a flowchart of calculating the ciphertext similarity matrix in some embodiments of the present application;
[0045] Figure 6 is a cluster analysis flow chart of some embodiments of the present application;
[0046] Figure 7 is a flow chart of a data clustering analysis method according to some preferred embodiments of the present application;
[0047] Figure 8This is a structural block diagram of a data clustering analysis device in some embodiments of the present application. DETAILED DESCRIPTION
[0048] In order to more clearly understand the purpose, technical solutions and advantages of this 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 this application and are not intended to limit this application.
[0049] Unless otherwise defined, technical or scientific terms used in this application shall have the ordinary meanings as understood by persons of ordinary skill in the art to which this application belongs. The terms "a," "an," "the," "these," and similar expressions in this application do not denote limitations on quantity and may be singular or plural. The terms "comprise," "include," "have," and any variations thereof, as used in this application, are intended to cover non-exclusive inclusions. For example, a process, method, 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 other steps or modules (units) inherent to the process, method, product, or device. The terms "connected," "connected," "coupled," and similar expressions used in this application are not limited to physical or mechanical connections but may include electrical connections, whether direct or indirect. As used in this application, "plurality" means two or more. "And / or" describes an association between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone; A and B exist simultaneously; or B exists alone. Generally, the character " / " indicates that the objects in the preceding and following relationship are in an "or" relationship. The terms "first", "second", "third", etc. involved in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0050] 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 This 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 multiple clients DO1, DO2, ..., DOn, and a first server S1 and a second server S2 that are connected to the multiple clients. The first server S1 and the second server S2 are connected to each other. It can be understood by those skilled in the art 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 FIG, which are not limited in this embodiment.
[0051] This embodiment provides a data clustering analysis method, 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:
[0052] 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.
[0053] 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, namely 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:
[0054]
[0055] 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 the 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.
[0056] In step S202, the first array is sent to the first server, and the second array is sent to the second server. 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 clustering results and send them to the multiple clients.
[0057] 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. The ciphertext similarity matrix is used to describe the data similarity between two clients. Specifically, the collaborative calculation method can include two servers 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 perform calculations 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.
[0058] The first or second server then performs cluster analysis on the clients based on their ciphertext similarity matrix, generating clustering results. This clustering result divides the clients into multiple clusters, where clients within the same cluster have similar data. Cluster analysis has many established algorithms and will not be detailed here.
[0059] Through steps S201~S202, the client in the secure computing system splits the array to be analyzed into a first array and a second array, sends the first array to the first server, and sends the second array to the second server. The private data is split and sent to the two servers respectively, 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 a 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.
[0060] 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.
[0061] The key center can pre-generate a multiplication triplet (u, v, z), where z = uv. The key center can split the multiplication triplet (u, v, z) into a first triplet (u1, v1, z1) and a second triplet (u2, v2, z2), with u = u1 + u2, v = v1 + v2, and z = z1 + z2. The key center sends (u1, v1, z1) to the first server and (u2, v2, z2) to the second server.
[0062] 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 ciphertext similarity matrices between multiple clients.
[0063] The data clustering analysis method of this embodiment splits the multiplication triple into a first triple and a second triple through a key center and sends them to the first server and the second server respectively. The split first triple and the second triple are used as auxiliary parameters for encryption calculation. The first server and the second server use the auxiliary parameters to encrypt and decrypt the data of the first array and the second array during the data calculation process, thereby improving the security of the data processing process.
[0064] In some embodiments, Figure 3 This is a flowchart of obtaining the ciphertext similarity matrix in some embodiments of the present application, such as Figure 3 As shown, the process includes the following steps:
[0065] 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.
[0066] 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.
[0067] 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.
[0068] In step S302 , the first server and the second server respectively perform blinding 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 corresponding ciphertext similarity matrices.
[0069] Specifically, the first server can generate a first random number, and use the first triplet and the first random number as auxiliary parameters for the 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 the blind calculation of the second distance matrix to obtain the calculation result after blind processing.
[0070] In some embodiments, similar to step S301, the first server and the second server each send their blinded calculation results to each other. The first server then performs calculations based on its own calculation results and the calculation results sent by the second server to obtain a first similarity matrix. The second server performs calculations based on its own calculation results 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 a ciphertext similarity matrix based on the first similarity matrix and the second similarity matrix.
[0071] 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. When the first server and the second server do not obtain real data to be analyzed, the Euclidean distance calculation of data between different clients is 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 their own generated random numbers, and perform collaborative calculations to obtain corresponding ciphertext similarity matrices, thereby providing accurate basic data for cluster analysis and further improving the security and privacy of data analysis.
[0072] 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:
[0073] 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.
[0074] 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:
[0075]
[0076] The first server sends the first intermediate data <e ij >1. <f ij >1 is sent to the second server.
[0077] 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.
[0078] Similarly, the second server may be based on the second array corresponding to 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:
[0079]
[0080] The second server sends the second intermediate data <e ij >2. <f ij >2 is sent to the first server.
[0081] Step S401 and step S402 can be performed in reverse order or simultaneously.
[0082] 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.
[0083] Specifically, the step of obtaining the first distance matrix may include:
[0084] 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.
[0085] The first server sends the first intermediate data <e ij >1. <f ij >1 and second intermediate data <e ij >2. <f ij >2Sum the corresponding values in the following way to get the first intermediate array e ij and the second intermediate array f ij :
[0086]
[0087] Step S4032: The first server calculates a first distance matrix based on the first intermediate array, the second intermediate array, and the first triplet.
[0088] The first server can 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:
[0089]
[0090] 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.
[0091] 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.
[0092] Then, the second server can calculate the value of the first intermediate array e ij , the second intermediate array f ij And the second triplet (u2, v2, z2), calculate the second distance matrix according to the following equation <D ij >2:
[0093]
[0094] Step S403 and step S404 can be performed in reverse order or simultaneously.
[0095] Through steps S401 to S404, the first server and the second server respectively calculate the first intermediate data and the second intermediate data and send them to each other, and calculate the first distance matrix and the second distance matrix. Without obtaining the actual data to be analyzed from the client, the Euclidean distance between the data to be analyzed of clients i and j can be evaluated, thereby protecting the data privacy of the clients.
[0096] 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:
[0097] 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.
[0098] 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:
[0099]
[0100] The first server sends the third intermediate data <E ij >1. <F ij >1 is sent to the second server.
[0101] 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.
[0102] Similarly, the second server can calculate the distance between the second server and the second distance matrix by the following equation: <D ij >2, the second triplet (u2, v2, z2) and the pre-generated second random number <r i >2, get the fourth intermediate data <E ij >2. <F ij >2:
[0103]
[0104] The second server sends the fourth intermediate data <E ij >2. <F ij >2 is sent to the first server.
[0105] Step S501 and step S502 can be performed in reverse order or simultaneously.
[0106] In 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.
[0107] Specifically, the step of obtaining the first similarity matrix may include:
[0108] 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.
[0109] The first server sends the third intermediate data <E ij >1. <F ij >1 and the fourth intermediate data <E ij >2. <F ij >2According to the following method, we can sum the corresponding values and get the third intermediate array E. ij and the fourth intermediate array F ij :
[0110]
[0111] Step S5032: The first server calculates a first similarity matrix based on the third intermediate array, the fourth intermediate array, and the first triplet.
[0112] The first server can be configured 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:
[0113]
[0114] The first server may <G ij >1 is sent to the second server.
[0115] 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.
[0116] 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.
[0117] Then, the second server can calculate the value of 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:
[0118]
[0119] 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 calculates 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 :
[0120]
[0121] Step S503 and step S504 can be performed in reverse order or simultaneously.
[0122] 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 clients i and j is evaluated by the blinded intermediate data, thereby improving the data security of the client while obtaining the similarity data.
[0123] In some embodiments, Figure 6 This 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:
[0124] 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.
[0125] 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.
[0126] 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.
[0127] 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.
[0128] 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.
[0129] If the minimum value is greater than the preset similarity threshold, the client set is updated. Specifically, the client set with the larger number of clients in the first client set c1 and the second client set c2 is assigned to the client set c. Then, 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.
[0130] Through steps S601 to S603, the client set is divided into a first client set and a second client set based on the ciphertext similarity matrix between each of the multiple 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, if 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 the multiple clients are clustered into multiple client sets according to the preset threshold, thereby completing cluster analysis.
[0131] The preferred embodiment of the present invention is described and illustrated below. The preferred embodiment of the present invention is applied to a client in a secure computing system, wherein the secure computing system further includes a key center, a first server and a second server that are communicatively connected to the key center and a plurality of clients, and the first server and the second server are communicatively connected to each other. Figure 7 is a flow chart of a data clustering analysis method according to some preferred embodiments of the present application, such as Figure 7 As shown, the process includes the following steps:
[0132] Step S701: The key center generates a multiplication triplet (u, v, z), where z = uv; splits the multiplication triplet into a first triplet (u1, v1, z1) and a second triplet (u2, v2, z2), and makes u = u1 + u2, v = v1 + v2, and z = z1 + z2.
[0133] Step S702: The key center sends (u1, v1, z1) to the first server and sends (u2, v2, z2) to the second server.
[0134] Step S703: The client splits the local data into a first array and a second array, where 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;
[0135] Step S704: the first server calculates and sends the result to the second server;
[0136]
[0137] Step S705: The second server calculates and sends the result to the first server;
[0138]
[0139] Step S706: The first server and the second server respectively calculate:
[0140]
[0141] Step S707: The first server calculates:
[0142]
[0143] Step S708: The second server calculates:
[0144]
[0145] Step S709: The first server generates a random number <r i >1, calculate and send to the second server;
[0146]
[0147] Step S710: The second server generates a random number <r i >2, calculate and send to the first server:
[0148]
[0149] In step S711, the first server and the second server respectively calculate:
[0150]
[0151] Step S712: the first server calculates and sends the result to the second server;
[0152]
[0153] Step S713: The second server calculates the ciphertext similarity matrix G ij :
[0154]
[0155] Step S714: dividing the client set into a first client set and a second client set based on a ciphertext similarity matrix between two clients in the client set;
[0156] Step S715: 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;
[0157] Step S716: If the minimum value is greater than a 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.
[0158] Through steps S701 to S716, the key center splits the multiplication triple into a first triple and a second triple and sends them to the first server and the second server respectively. The first triple and the second triple 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 client splits the array to be analyzed into a first array and a second array, sends the first array to the first server, and sends the second array to the second server, thereby avoiding the plaintext transmission of the data to be analyzed, thereby improving the security of data transmission, 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 calculations 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 client's data privacy; 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, which ensures the data security of each client and solves the problem that cluster analysis easily causes data leakage and leads to insufficient data security.
[0159] 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.
[0160] In some embodiments, the present application also provides a data cluster analysis device that utilizes a client in a secure computing system. The secure computing system also includes a first server and a second server that are communicatively connected to the plurality of clients, and the first server and the second server are communicatively connected to each other. The data cluster analysis device is used to implement the above-mentioned embodiments and preferred implementations, and those that have already been described will not be repeated. The terms "module," "unit," "subunit," etc. used below refer to a combination of software and / or hardware that can implement a predetermined function.
[0161] In some embodiments, Figure 8 This is a structural block diagram of a data cluster analysis device according to some embodiments of the present application. Figure 8 As shown, the device includes:
[0162] A splitting module 801 is configured 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;
[0163] 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 a clustering result and send it to the multiple clients.
[0164] The data clustering analysis device of this embodiment splits the array to be analyzed into a first array and a second array through the 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 plaintext 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 the sending module 802, and performs collaborative calculations based on the multiple first arrays and multiple second arrays sent by multiple clients to obtain a ciphertext similarity matrix between multiple clients, introduces dual servers for secure multi-party computing, and improves the security of data processing; the first server and the second server perform cluster analysis on multiple clients based on the ciphertext similarity matrix, obtains clustering results and sends them to 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.
[0165] 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 communicatively connected to the first server and the second server respectively, and the client includes the data clustering analysis device in the above embodiment.
[0166] 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 the 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 caused by clustering analysis is solved.
[0167] It should be noted that, for specific examples in this embodiment, reference may be made to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.
[0168] It should be understood that the specific embodiments described herein are only used to explain this application and are not used 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 scope of protection of this application.
[0169] Obviously, the accompanying drawings are merely examples or embodiments of the present application. A person skilled in the art can also apply the present application to other similar situations based on these drawings without inventive effort. Furthermore, it is understandable that, although the work involved in this development process may be complex and lengthy, certain design, manufacturing, or production changes based on the technical content disclosed in this application are merely routine technical means for a person skilled in the art and should not be considered to constitute a deficiency in the disclosure of the present application.
[0170] The term "embodiment" as used herein refers to specific features, structures, or characteristics described in connection with the embodiment that may be included in at least one embodiment of the present invention. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it imply that the embodiments are mutually exclusive, independent, or optional. It is understood, either explicitly or implicitly, that the embodiments described herein may be combined with other embodiments unless there is a conflict.
[0171] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of patent protection. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended 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 includes a first server and a second server that are communicatively connected to a plurality of the clients, and 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; 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 calculation based on the multiple first arrays and 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; 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 a ciphertext similarity matrix between the multiple clients, including: The first server performs collaborative calculation based on the multiple first arrays and pre-acquired first triples, and the second server performs collaborative calculation based on the multiple second arrays and pre-acquired second triples, to obtain a first distance matrix and a second distance matrix between each of the multiple clients; The first server and the second server respectively perform blinding 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 corresponding ciphertext similarity matrices; The first server performs collaborative calculation based on the multiple first arrays and pre-acquired first triples, and the second server performs collaborative calculation based on the multiple second arrays and pre-acquired second triples, to obtain first distance matrices and second distance matrices 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 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 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.
2. The method according to claim 1, 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.
3. The method according to claim 1, characterized in that The first server and the second server respectively perform blinding 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 corresponding ciphertext similarity matrices 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.
4. The method according to claim 3, wherein The first server calculating, based on the third intermediate data, the fourth intermediate data, and the first triplet, a first similarity matrix includes: 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.
5. The method according to claim 1, wherein 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.
6. 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 includes: Dividing the client set into a first client set and a second client set based on a ciphertext similarity matrix between two of the clients in the 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.
7. A data cluster analysis device, characterized in that: The device is applied to a client in a secure computing system, wherein the secure computing system further includes a first server and a second server that are communicatively connected to the plurality of clients, wherein the first server and the second server are communicatively connected to each other, and the device includes: a splitting module, configured 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; a sending module, configured 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 calculation 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; 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 a ciphertext similarity matrix between the multiple clients, including: The first server performs collaborative calculation based on the multiple first arrays and pre-acquired first triples, and the second server performs collaborative calculation based on the multiple second arrays and pre-acquired second triples, to obtain a first distance matrix and a second distance matrix between each of the multiple clients; The first server and the second server respectively perform blinding 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 corresponding ciphertext similarity matrices; The first server performs collaborative calculation based on the multiple first arrays and pre-acquired first triples, and the second server performs collaborative calculation based on the multiple second arrays and pre-acquired second triples, to obtain first distance matrices and second distance matrices 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 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 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.
8. 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 according to claim 7.
Citation Information
Patent Citations
Federal learning video recommendation method, system and device based on clustering
CN117033698A
Multi-client data privacy processing method, system, device, medium and product
CN118410521A