Data matching method, apparatus, and system

Through the combination of homomorphic encryption algorithm and tree structure, the problem of data security in the data matching process is solved, efficient and safe multi-party data matching is achieved, and the protection of data privacy and matching accuracy are ensured.

WO2024212647A1PCT designated stage expired Publication Date: 2024-10-17JINGDONG CITY BEIJING DIGITS TECH CO LTD

Patent Information

Application Number
PCT/CN2024/072357
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-04-10
Filing Date
2024-01-15
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

During the data matching process, it is difficult for existing technologies to effectively protect the security of private data and confidential data, especially when data is shared and matched by multiple parties, it can easily lead to data leakage.

Method used

The homomorphic encryption algorithm is used to generate the public key and private key, the query vector is encrypted, and the encrypted result and the query range information are matched. The tree structure and binary tree are used for efficient search to ensure data security during the data matching process. At the same time, Horizontal federated learning is used to jointly train feature extraction models to improve the accuracy and security of data matching.

Benefits of technology

It achieves efficient and secure matching that does not leak data privacy during the multi-party data matching process, protects the privacy and security of data from all parties, improves the accuracy and security of data matching, and avoids data leakage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024072357_17102024_PF_FP_ABST
    Figure CN2024072357_17102024_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of privacy computing and the technical field of computers, and in particular, to a data matching method, apparatus, and system. The method of the present disclosure comprises: using a homomorphic encryption algorithm to generate a public key and a private key, and using the public key to encrypt a query vector to obtain an encryption result of the query vector, the query vector being a feature vector of data to be matched; sending a query request to a matching party, the query request comprising the encryption result of the query vector and query range information; receiving a query result returned by the matching party, the query result comprising one or more encrypted similarity values, each encrypted similarity value representing an encryption result of a similarity value between a feature vector of one piece of data of the matching party and the query vector; and according to the private key and the one or more encrypted similarity values, determining whether the matching party has data that matches the data to be matched.
Need to check novelty before this filing date? Find Prior Art

Description

Data matching method, device and system

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application is based on the application with CN application number 202310373851.X and application date April 10, 2023, and claims its priority. The disclosed content of the CN application is hereby introduced as a whole into this application. Technical Field

[0003] The present disclosure relates to the fields of privacy computing technology and computer technology, and in particular to a data matching method, device, and system. Background Art

[0004] Many current applications combine data from multiple data sources to provide users with higher-quality services, such as location analysis applications and user identity authentication applications. Data from multiple data sources needs to be matched.

[0005] When the existing data matching method is extended to multiple parties, one party needs to share its entire database with other matching parties. After the other matching parties match with their own databases to obtain matching results, they will synchronize the matching results.

[0006] Summary of the Invention

[0007] According to some embodiments of the present disclosure, a data matching method is provided, including: generating a public key and a private key using a homomorphic encryption algorithm, and encrypting a query vector using the public key to obtain an encrypted result of the query vector, wherein the query vector is a feature vector of the data to be matched; sending a query request to a matching party, wherein the query request includes: the encrypted result of the query vector and query range information; receiving a query result returned by the matching party, wherein the query result includes: one or more encrypted similarity values, each encrypted similarity value representing an encrypted result of a similarity value between a feature vector of a piece of data of the matching party and the query vector; and determining whether the matching party has data that matches the data to be matched based on the private key and the one or more encrypted similarity values.

[0008] In some embodiments, the query range information includes a query sphere, and the method further includes determining a minimum circumscribed sphere of the query vector and a similarity vector of the query vector as the query sphere.

[0009] In some embodiments, determining the minimum circumscribed sphere of a query vector and a similar vector to the query vector includes: searching in a tree structure storing the query vector, selecting a preset number of one or more feature vectors in ascending order according to their distance from the query vector as similar vectors to the query vector, wherein the tree structure stores multiple feature vectors of multiple data of the same type as the data to be matched and the query vector; and determining the minimum circumscribed sphere containing the query vector and the similar vector to the query vector.

[0010] In some embodiments, determining whether the matching party has data that matches the data to be matched based on the private key and one or more encrypted similarity values ​​includes: decrypting one or more encrypted similarity values ​​using the private key to obtain one or more similarity values; comparing the one or more similarity values ​​with a similarity threshold to determine whether the matching party has data that matches the data to be matched.

[0011] In some embodiments, the method further includes: extracting feature vectors of a plurality of locally stored data using a shared feature extraction model, wherein the plurality of locally stored data includes the data to be matched.

[0012] In some embodiments, the method further comprises: constructing a binary tree according to the distances between the feature vectors of the plurality of data to store the feature vectors of the plurality of data, wherein the plurality of nodes in the binary tree correspond one to one with the feature vectors of the plurality of data

[0013] In some embodiments, the method further includes: jointly training a shared feature extraction model with other participants based on local training data, wherein the other participants include: a matching party, and the local training data is of the same type as the training data of each other participant and has the same feature space.

[0014] In some embodiments, training a shared feature extraction model jointly with other participants based on local training data includes: receiving the latest parameters of the shared feature extraction model broadcast by the intermediate server, and synchronizing the latest parameters to the local feature extraction model; adjusting the parameters of the local feature extraction model using local training data to obtain locally updated parameters; sending the locally updated parameters to the intermediate server so that the intermediate server determines the latest parameters of the shared feature extraction model based on the locally updated parameters; repeating the above process until the shared feature extraction model converges, synchronizing the latest parameters of the shared feature extraction model broadcast by the intermediate server to the local feature extraction model, and obtaining a shared feature extraction model.

[0015] In some embodiments, the data to be matched includes private data or confidential data.

[0016] According to other embodiments of the present disclosure, a data matching method is provided, including: receiving a query request sent by a query party, wherein the query request includes: an encrypted result of a query vector and query range information, the query vector is a feature vector of the data to be matched, and the encrypted result of the query vector is obtained by encrypting the query vector using a public key generated by the query party using a homomorphic encryption algorithm; querying one or more feature vectors of one or more data according to the query range information; determining one or more encrypted similarity values ​​based on the encryption result of the one or more feature vectors and the query vector; and sending a query result to the query party, wherein the query result includes: one or more encrypted similarity values, so that the query party can determine whether there is data that matches the data to be matched based on the one or more encrypted similarity values.

[0017] In some embodiments, the query range information includes: a query sphere, which is the minimum circumscribed sphere of the query vector and the similarity vector of the query vector determined by the querying party, and one or more feature vectors of one or more data queried according to the query request include: determining one or more feature vectors of one or more data enclosed by the query sphere among the feature vectors of multiple data stored locally.

[0018] In some embodiments, determining one or more feature vectors of one or more data items surrounded by a query sphere among the feature vectors of multiple data items stored locally includes: searching in a tree structure storing the feature vectors of multiple data items to determine one or more feature vectors of one or more data items surrounded by a query sphere.

[0019] In some embodiments, the homomorphic encryption algorithm is an additive homomorphic encryption algorithm, wherein determining one or more encrypted similarity values ​​based on the encryption results of one or more feature vectors and a query vector includes: for each feature vector in the one or more feature vectors, determining the encrypted similarity value corresponding to the feature vector based on the product of the encryption result of the feature vector and the query vector.

[0020] In some embodiments, the method further includes: extracting feature vectors of each piece of locally stored data using a shared feature extraction model.

[0021] In some embodiments, the method further includes: constructing a binary tree according to the distances between the feature vectors of the plurality of data to store the feature vectors of the plurality of data, wherein the plurality of nodes in the binary tree correspond one-to-one to the feature vectors of the plurality of data.

[0022] In some embodiments, the method further includes: jointly training a shared feature extraction model with other participants based on local training data, wherein the other participants include: a querying party, and the local training data is of the same type as the training data of each other participant and has the same feature space.

[0023] In some embodiments, training a shared feature extraction model jointly with other participants based on local training data includes: receiving the latest parameters of the shared feature extraction model broadcast by the intermediate server, and synchronizing the latest parameters to the local feature extraction model; adjusting the parameters of the local feature extraction model using local training data to obtain locally updated parameters; sending the locally updated parameters to the intermediate server so that the intermediate server determines the latest parameters of the shared feature extraction model based on the locally updated parameters; repeating the above process until the shared feature extraction model converges, synchronizing the latest parameters of the shared feature extraction model broadcast by the intermediate server to the local feature extraction model, and obtaining a shared feature extraction model.

[0024] In some embodiments, the data to be matched includes private data or confidential data.

[0025] According to some further embodiments of the present disclosure, a query device is provided, including: an encryption module, used to generate a public key and a private key using a homomorphic encryption algorithm, and encrypt a query vector using the public key to obtain an encrypted result of the query vector, wherein the query vector is a feature vector of the data to be matched; a sending module, used to send a query request to a matching party, wherein the query request includes: the encrypted result of the query vector and query range information; a receiving module, used to receive a query result returned by the matching party, wherein the query result includes: one or more encrypted similarity values, each encrypted similarity value represents an encrypted result of a similarity value between a feature vector of a piece of data of the matching party and the query vector; a determination module, used to determine whether the matching party has data that matches the data to be matched based on the private key and the one or more encrypted similarity values.

[0026] According to some further embodiments of the present disclosure, a matching device is provided, including: a receiving module for receiving a query request sent by a query party, wherein the query request includes: an encrypted result of a query vector and query range information, the query vector is a feature vector of the data to be matched, and the encrypted result of the query vector is obtained by encrypting the query vector using a public key generated by the query party using a homomorphic encryption algorithm; a query module for querying one or more feature vectors of one or more data according to the query range information; a determination module for determining one or more encrypted similarity values ​​based on the encryption result of the one or more feature vectors and the query vector; and a sending module for sending the query result to the query party, wherein the query result includes: one or more encrypted similarity values, so that the query party can determine whether there is data that matches the data to be matched based on the one or more encrypted similarity values.

[0027] According to some further embodiments of the present disclosure, a data matching system is provided, comprising: the query device in the aforementioned embodiment and the matching device in the aforementioned embodiment.

[0028] According to some further embodiments of the present disclosure, a data matching device is provided, including: a processor; and a memory coupled to the processor, for storing instructions, which, when executed by the processor, causes the processor to execute the data matching method of any of the aforementioned embodiments.

[0029] According to some further embodiments of the present disclosure, a non-transitory computer-readable storage medium is provided, on which a computer program is stored, wherein the program, when executed by a processor, implements the data matching method of any of the aforementioned embodiments.

[0030] Other features and advantages of the present disclosure will become apparent from the following detailed description of exemplary embodiments of the present disclosure with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0032] FIG1 is a schematic flow chart showing a data matching method according to some embodiments of the present disclosure.

[0033] FIG2 is a schematic flow chart showing a data matching method according to other embodiments of the present disclosure.

[0034] FIG3 is a schematic flow chart showing a data matching method according to some other embodiments of the present disclosure.

[0035] FIG4 shows a schematic diagram of a data matching method according to some embodiments of the present disclosure.

[0036] FIG5 shows a schematic structural diagram of a query device according to some embodiments of the present disclosure.

[0037] FIG6 is a schematic structural diagram of a matching device according to some embodiments of the present disclosure.

[0038] FIG7 shows a schematic structural diagram of a data matching device according to some embodiments of the present disclosure.

[0039] FIG8 is a schematic structural diagram of a data matching device according to some other embodiments of the present disclosure.

[0040] FIG9 shows a schematic structural diagram of a data matching system according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0041] The following will be combined with the drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and is in no way intended to limit the present disclosure and its application or use. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present disclosure.

[0042] The inventors discovered that user address information, identity information, etc. are private data or confidential data. Sharing these data with matching parties may lead to leakage of private or confidential data.

[0043] A technical problem to be solved by the present disclosure is: how to improve data security during the data matching process.

[0044] The present disclosure provides a data matching method, which is applicable to data query and matching between two or more parties, and is described below with reference to Figures 1 to 4.

[0045] Figure 1 is a flow chart of some embodiments of the data matching method disclosed herein. As shown in Figure 1 , the method of this embodiment includes: steps S102 to S108, which can be executed by the querying party.

[0046] In step S102, a public key and a private key are generated using a homomorphic encryption algorithm, and the query vector is encrypted using the public key to obtain an encrypted result of the query vector.

[0047] The query vector is the feature vector of the data to be matched. Examples of the data to be matched include text, images, and videos. The data to be matched may include private and / or confidential data. Examples include address text, facial images, facial videos, fingerprint images, and iris images. These data may be private and confidential data in practical applications, but are not limited to these examples. Feature vectors of the data to be matched can be extracted using a feature extraction model, which will be described in detail in subsequent embodiments.

[0048] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of this disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.

[0049] It should be noted that in the technical solutions disclosed herein, the collection, use, storage, sharing and transfer of privacy data or confidential data involved must be informed to the user and the user's consent or authorization must be obtained. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.

[0050] The homomorphic encryption algorithm is, for example, an additive homomorphic encryption algorithm, such as Paillier, zk-SNARK algorithm, etc., but is not limited to the examples given.

[0051] In step S104, a query request is sent to a matching party.

[0052] The query request includes, for example, an encrypted result of the query vector and query range information. The query range information may be a range determined based on the query vector and / or a vector similar to the query vector.

[0053] In some embodiments, the query range information includes a query sphere. The query sphere is, for example, the minimum circumscribed sphere of the query vector and its similarity vectors, and can be represented by a center and a radius. Similarity vectors to the query vector can be determined based on the similarity between feature vectors of each piece of local data and the query vector. Similarity can be measured using the distance between two vectors. For example, a preset number of one or more feature vectors are selected in ascending order of distance from the query vector as similarity vectors to the query vector.

[0054] When the amount of data is large, simply comparing the query vector with the feature vectors of other data makes it difficult to quickly determine similar vectors and query range information for the query vector. To improve the efficiency of determining similar vectors and query range information for the query vector, a structure (e.g., a tree structure) suitable for searching multidimensional spatial data (e.g., range search and nearest neighbor search) can be used to store the feature vectors of each data item (including the query vector).

[0055] In some embodiments, for feature vectors of multiple pieces of data (including multiple feature vectors of multiple pieces of data of the same type as the data to be matched and a query vector), a binary tree is constructed based on the distances between the feature vectors of the multiple pieces of data to store the feature vectors of the multiple pieces of data. Multiple nodes in the binary tree correspond one-to-one to the feature vectors of the multiple pieces of data, each node in the binary tree is represented by a vector, and a vector index can also be established for each feature vector. Examples of the binary tree include, but are not limited to, a KD Tree or a Ball Tree.

[0056] In some embodiments, a search is performed in a tree structure storing a query vector, and a preset number of one or more feature vectors are selected in ascending order of distance from the query vector as similar vectors to the query vector, and a minimum circumscribed sphere containing the query vector and the similar vector to the query vector is determined.

[0057] For example, the query vector may be used to search for feature vectors of k nearest neighbors in the KD Tree, and then a minimum range space sphere including the query vector and the feature vectors of its k nearest neighbors is generated as the query sphere.

[0058] In step S106, the query result returned by the matching party is received.

[0059] For example, the query result includes one or more encrypted similarity values, each of which represents an encrypted result of a similarity value between a feature vector of a piece of data of the matching party and the query vector.

[0060] The matching party can retrieve one or more feature vectors for one or more pieces of data based on the query scope information. Based on the encryption result of the one or more feature vectors and the query vector, one or more encrypted similarity values ​​are determined. This will be described in detail in subsequent embodiments. Because the encrypted result of the query vector is obtained using a homomorphic encryption algorithm, the matching party can use the encrypted result of the query vector to calculate one or more encrypted similarity values.

[0061] In step S108, it is determined whether the matching party has data that matches the data to be matched based on the private key and one or more encrypted similarity values.

[0062] In some embodiments, one or more encrypted similarity values ​​are decrypted using a private key to obtain one or more similarity values. The one or more similarity values ​​are then compared with a similarity threshold to determine whether the matching party has data that matches the data to be matched. If the similarity value exceeds the similarity threshold, the corresponding data pair is determined to be a match; otherwise, it is not a match. The matching results can also be synchronously sent to the matching party.

[0063] In the above embodiment, a homomorphic encryption algorithm is used to generate a public key and a private key, and the public key is used to encrypt the feature vector of the data to be matched, i.e., the query vector, to obtain the encrypted result of the query vector. The encrypted result of the query vector and the query range information are sent to the matching party. The matching party can perform a query based on the query range information, and obtain one or more encrypted similarity values ​​based on the one or more feature vectors queried and the encrypted result of the query vector. After receiving the one or more encrypted similarity values ​​returned by the matching party, the private key and the one or more encrypted similarity values ​​can be used to determine whether the matching party has data that matches the data to be matched. The scheme of the above embodiment can realize data matching of multiple parties, and does not require any party to share a database. By encrypting the data in a homomorphic encryption manner, the security of the data can be improved and the matching of the data can be completed accurately, thereby protecting the privacy and security of the data of all parties.

[0064] Other embodiments of the data matching method disclosed herein are described below in conjunction with FIG. 2 .

[0065] Figure 2 is a flow chart of another embodiment of the data matching method disclosed herein. As shown in Figure 2 , the method of this embodiment includes: steps S202 to S208 , which can be performed by the matching party.

[0066] In step S202, a query request sent by a querying party is received.

[0067] For example, a query request includes an encrypted query vector and query range information. The query vector is a feature vector of the data to be matched. The encrypted query vector is generated by encrypting the query vector using a public key generated by a homomorphic encryption algorithm. The method for generating the encrypted query vector can be found in the previous embodiment and will not be further described here.

[0068] In step S204, one or more feature vectors of one or more pieces of data are found according to the query range information.

[0069] The query range information may be a range determined based on the query vector and its similarity vector. In some embodiments, the query range information includes a query sphere, which is the minimum circumscribed sphere of the query vector and its similarity vector determined by the querying party, and reference may be made to the aforementioned embodiments.

[0070] In some embodiments, one or more feature vectors of one or more data pieces surrounded by the query sphere are determined from the feature vectors of the multiple data pieces stored locally.

[0071] To improve search efficiency, a structure (e.g., a tree structure) suitable for searching multidimensional spatial data (e.g., range search and nearest neighbor search) can be used to store the feature vectors of multiple pieces of data (including the query vector). For example, a search can be performed within the tree structure storing the feature vectors of each piece of data to determine one or more feature vectors of one or more pieces of data enclosed by the query sphere.

[0072] A tree structure can be pre-built to store the feature vectors of each piece of data. For example, a binary tree can be constructed based on the distances between the feature vectors of multiple pieces of data to store the feature vectors of the multiple pieces of data. Multiple nodes in the binary tree correspond one-to-one to the feature vectors of the multiple pieces of data, and each node in the binary tree is represented by a vector. Examples of binary trees include, but are not limited to, KD Trees and Ball Trees. For example, by calling the KD Tree interface and inputting parameters corresponding to the center and radius of a query ball, all feature vectors within the query ball can be searched.

[0073] Each participant (which can be a query party or a matching party) can use the same method to store the feature vectors of multiple local data. The local data of each participant belongs to the same type of data.

[0074] In step S206, one or more encrypted similarity values ​​are determined according to the encryption results of the one or more feature vectors and the query vector.

[0075] In some embodiments, for each feature vector in the one or more feature vectors, an encrypted similarity value corresponding to the feature vector is determined based on a product of the feature vector and an encrypted result of the query vector.

[0076] For example, cosine similarity can be used to measure the similarity between vectors. The encrypted result of cosine similarity between vectors can be calculated based on the encrypted result of searching one or more feature vectors and the received query vector to obtain one or more encrypted similarity values. Assume that Q represents a query vector, E pub (Q) represents the encryption result after the query vector Q is encrypted using the public key of the homomorphic encryption algorithm, and K represents a feature vector that is searched. Then the encryption result E based on the query vector pub (Q) and the searched feature vector K, the encrypted result E of the cosine similarity between Q and K vectors pub (similarity) is: E pub (similarity)=E pub (Q)*K (1)

[0077] The above method can enable the matching party to calculate the encrypted result of the similarity value between the searched feature vector and the query vector without decrypting the encrypted result of the query vector, so that the query party's data will not be leaked.

[0078] In step S208, the query result is sent to the querying party.

[0079] The query result includes: one or more encrypted similarity values, so that the query party can determine whether there is data that matches the data to be matched based on the one or more encrypted similarity values. The query party can obtain one or more similarity values ​​by decrypting using the following formula, for example. pri (E pub (similarity)=Q*K (2)

[0080] Any participant can act as a querying party to request data matching from other participants (as matching parties), and can also act as a matching party to receive requests from other participants (as querying parties). Each participant stores its own data locally and does not need to share data with other participants. Data matching can be completed using the method of the above embodiment, thereby improving data security.

[0081] To improve the accuracy of data matching, this disclosure also provides a method for extracting data feature vectors. In some embodiments, each participant (which can be a querying party or a matching party) uses a shared feature extraction model to extract feature vectors for each locally stored piece of data. The shared feature extraction model is the same for each participant, so the method used to extract feature vectors remains consistent, which can improve the accuracy of subsequent data matching.

[0082] Furthermore, in order to further improve the security of data, the present disclosure also provides a method for training a shared feature extraction model. In some embodiments, for each participant, the shared feature extraction model is trained jointly with other participants based on local training data. The local training data of the participant is of the same type as the training data of each other participant and has the same feature space.

[0083] The training process is described in detail below with reference to FIG3 .

[0084] Figure 3 is a flow chart of some other embodiments of the data matching method disclosed herein. As shown in Figure 3 , the method of this embodiment includes: steps S302 to S308 , which can be performed by each participant.

[0085] In step S302, the latest parameters of the shared feature extraction model broadcast by the intermediate server are received, and the latest parameters are synchronized to the local feature extraction model.

[0086] The intermediate server acts as a trusted third-party intermediary to distribute and aggregate model parameters.

[0087] In step S304 , it is determined whether the shared feature extraction model has converged. If so, step S306 is executed; otherwise, the process ends.

[0088] The intermediate server can determine whether the model has converged, for example, by determining whether a preset number of training cycles has been reached or whether a performance evaluation metric has reached a maximum value. The intermediate server then sends this information to each participant. Alternatively, each participant can determine whether the model has converged.

[0089] In step S306, the parameters of the local feature extraction model are adjusted using the local training data to obtain locally updated parameters.

[0090] The disclosed solution can be applied to the fields of geographic information technology and address matching technology. The following uses text data (e.g., address text) as an example to illustrate the training process. The feature extraction model can be, for example, a BERT encoder, or alternatively, an LSTM, Transformer, or other encoder, without limitation to the examples given.

[0091] For each participant, local training data such as address set First, we can use a tokenizer to segment the address records in the address set into multiple words, and determine the index of each word based on a pre-set dictionary. Then, we input the processed address text into the BERT encoder to obtain the corresponding feature vector.

[0092] The unsupervised contrastive learning method can be used to fine-tune the model parameters. The unsupervised contrastive learning method uses dropout technology to enhance the original text data to construct positive sample pairs. For example, each sample x i It will be input into the encoder twice in sequence to obtain vector h i and Due to the existence of the random dropout mask mechanism, inputting the same sample twice into the same encoder will result in two different representation vectors. As h i Positive example, x i With other vectors as negative examples, the loss function of unsupervised contrastive learning can be expressed by the following formula.

[0093] h i and is x i The semantic representation vector obtained by inputting the encoder twice is used, and τ is the temperature parameter.

[0094] Each model can be updated based on the above loss function to obtain locally updated parameters. The loss function and training method can be selected based on actual needs and are not limited to the examples given.

[0095] In step S308, the locally updated parameters are sent to the intermediate server.

[0096] The intermediate server determines the latest parameters of the shared feature extraction model based on the locally updated parameters of each participant. For example, after receiving the locally updated parameters sent by each participant, the server performs arithmetic averaging on all parameters to obtain the latest parameters of the shared feature extraction model.

[0097] Return to step S302 and restart execution.

[0098] The method in the above embodiment is based on the concept of horizontal federated learning, enabling joint training of a shared feature extraction model by all participating parties. Without requiring the parties to share data, that is, without requiring the data to be transferred locally, joint training is performed, ultimately establishing a shared model. Therefore, this method can improve the performance of the address feature extraction model while ensuring data privacy and security, thereby increasing the accuracy of subsequent data matching.

[0099] Some application examples of the data matching method disclosed herein are described below with reference to FIG. 4 .

[0100] As shown in Figure 4, taking two participants A and B as an example, the training part of the shared feature extraction model includes:

[0101] ① Parameter distribution: The intermediate server broadcasts the latest parameters to all participants.

[0102] ② Local training: After receiving the latest broadcast parameters, each participant uses local data for training and obtains locally updated parameters.

[0103] ③ Parameter upload: Each participant uploads the locally updated parameters to the intermediate server.

[0104] ④ Parameter aggregation: The intermediate server receives the locally updated parameters uploaded by each participant and aggregates them to obtain the latest parameters of the shared feature extraction model.

[0105] Repeat the above steps until the shared feature extraction model obtained by training is finally converged.

[0106] Each participant obtains the final trained, shared feature extraction model. They can then execute subsequent data matching solutions. The data matching process utilizes homomorphic encryption algorithms and a tree-like storage structure (e.g., KD Tree) for searching in high-dimensional spaces to achieve efficient and secure data matching. Each participant can obtain intersection data without compromising data privacy. As shown in Figure 4, using KD Tree as an example, the detailed process is as follows.

[0107] 1) Each participant uses a shared feature extraction model to encode all the data in the database into corresponding feature vectors, and then uses KD Tree to store all the feature vectors and establish vector indexes.

[0108] 2) The querying party (e.g., party A) traverses each feature vector in the database as a query vector (Q) and searches for similar vectors of the query vector (e.g., feature vectors of the k nearest neighbors) in the KD Tree to generate a query sphere.

[0109] 3) The querying party uses the homomorphic encryption algorithm to generate a public-private key pair, encrypts the query vector with the public key, and then sends the encrypted result of the query vector (E pub (Q)) and query the ball to the matching party (e.g., participant B).

[0110] 4) The matching party performs a range search in its own KD Tree, that is, searches the database for all feature vectors within the query sphere.

[0111] 5) The matching party calculates the encrypted result of the cosine similarity between the vectors (E) based on the searched feature vector (K) and the encrypted result of the received query vector pub (similarity)), and then sends the encrypted result of the cosine similarity between the vectors to the query party.

[0112] 6) The querying party uses the private key to decrypt the encrypted cosine similarity between the vectors and compares it with the similarity threshold. If the similarity is greater than the threshold, the corresponding data pair is considered a match; otherwise, it is not a match. The matching result is then synchronously sent to the matching party.

[0113] The present disclosure provides a complete set of secure matching methods for multi-party cross-domain data. This method can obtain matching data pairs between participants without revealing the databases of the participants, thereby protecting the privacy and security of the participants' data. The idea of ​​horizontal federated learning is applied in multi-party cross-domain data matching applications. Without releasing the original data of each party to the warehouse, the shared feature extraction model is trained in conjunction with the data of multiple participants to improve model performance. Efficient and secure data matching is achieved based on the homomorphic encryption algorithm and a storage structure that is easy to search. The solution disclosed in the present disclosure is applicable to address matching, and the matched addresses obtained can be used to integrate the corresponding location-related data later.

[0114] The present disclosure also provides a query device, which is described below in conjunction with FIG5 .

[0115] FIG5 is a structural diagram of some embodiments of the query device disclosed herein. As shown in FIG5 , the device 50 of this embodiment includes: an encryption module 510 , a sending module 520 , a receiving module 530 , and a determination module 540 .

[0116] The encryption module 510 is used to generate a public key and a private key using a homomorphic encryption algorithm, and use the public key to encrypt a query vector to obtain an encrypted result of the query vector, wherein the query vector is a feature vector of the data to be matched.

[0117] In some embodiments, the data to be matched includes private data or confidential data.

[0118] The sending module 520 is configured to send a query request to the matching party, wherein the query request includes the encrypted result of the query vector and query range information.

[0119] The receiving module 530 is used to receive the query result returned by the matching party, wherein the query result includes one or more encrypted similarity values, each of which represents the encrypted result of the similarity value between the feature vector of a piece of data of the matching party and the query vector.

[0120] The determination module 540 is used to determine whether the matching party has data that matches the data to be matched based on the private key and one or more encrypted similarity values.

[0121] In some embodiments, the determination module 540 is used to decrypt one or more encrypted similarity values ​​using a private key to obtain one or more similarity values; compare the one or more similarity values ​​with a similarity threshold to determine whether the matching party has data that matches the data to be matched.

[0122] In some embodiments, the query range information includes a query sphere, and the query device 50 further includes: a data processing module 550, configured to determine a minimum circumscribed sphere of the query vector and a similar vector of the query vector as the query sphere.

[0123] In some embodiments, the data processing module 550 is used to search in a tree structure storing a query vector, and select a preset number of one or more feature vectors in order of distance from the query vector from small to large as similar vectors to the query vector, wherein the tree structure stores multiple feature vectors of multiple data of the same type as the data to be matched and the query vector; and determine the minimum circumscribed sphere containing the query vector and the similarity vector of the query vector.

[0124] In some embodiments, the data processing module 550 is further configured to extract feature vectors of multiple pieces of data stored locally using a shared feature extraction model, wherein the multiple pieces of data stored locally include data to be matched.

[0125] In some embodiments, the query device 50 also includes: a storage module 560, which is used to construct a binary tree to store the feature vectors of multiple data according to the distance between the feature vectors of the multiple data, wherein the multiple nodes in the binary tree correspond one-to-one to the feature vectors of the multiple data, and each node in the binary tree is represented by a vector.

[0126] In some embodiments, the query device 50 also includes: a training module 570, which is used to jointly train a shared feature extraction model with other participants based on local training data, wherein the other participants include: a matching party, and the local training data is the same type of training data as each other participant and has the same feature space.

[0127] In some embodiments, the training module 570 is used to receive the latest parameters of the shared feature extraction model broadcast by the intermediate server, and synchronize the latest parameters to the local feature extraction model; use local training data to adjust the parameters of the local feature extraction model to obtain locally updated parameters; send the locally updated parameters to the intermediate server so that the intermediate server determines the latest parameters of the shared feature extraction model based on the locally updated parameters; repeat the above process until the shared feature extraction model converges, and synchronize the latest parameters of the shared feature extraction model broadcast by the intermediate server to the local feature extraction model to obtain a shared feature extraction model.

[0128] The present disclosure also provides a matching device, which will be described below in conjunction with FIG6 .

[0129] FIG6 is a structural diagram of some embodiments of the matching device disclosed herein. As shown in FIG6 , the device 60 of this embodiment includes: a receiving module 610 , a query module 620 , a determination module 630 , and a sending module 640 .

[0130] The receiving module 610 is used to receive a query request sent by the querying party, wherein the query request includes: the encryption result of the query vector and the query range information. The query vector is a feature vector of the data to be matched. The encryption result of the query vector is obtained by encrypting the query vector using a public key generated by the querying party using a homomorphic encryption algorithm.

[0131] In some embodiments, the data to be matched includes private data or confidential data.

[0132] The query module 620 is configured to query one or more feature vectors of one or more pieces of data according to the query range information.

[0133] In some embodiments, the query range information includes: a query sphere, which is the minimum circumscribed sphere of the query vector and the similarity vector of the query vector determined by the query party, and the query module 620 is used to determine one or more feature vectors of one or more data items surrounded by the query sphere from the feature vectors of each piece of data stored locally.

[0134] In some embodiments, the query module 620 is configured to search in a tree structure storing feature vectors of multiple pieces of data to determine one or more feature vectors of one or more pieces of data surrounded by the query sphere.

[0135] The determination module 630 is configured to determine one or more encrypted similarity values ​​according to the encryption results of the one or more feature vectors and the query vector.

[0136] In some embodiments, the homomorphic encryption algorithm is an additive homomorphic encryption algorithm, and the determination module 630 is used to determine the encrypted similarity value corresponding to each feature vector in one or more feature vectors based on the product of the encryption result of the feature vector and the query vector.

[0137] The sending module 640 is used to send the query result to the query party, wherein the query result includes: one or more encrypted similarity values, so that the query party can determine whether there is data matching the data to be matched based on the one or more encrypted similarity values.

[0138] In some embodiments, the matching device 60 further includes: a data processing module 650, configured to extract feature vectors of each piece of locally stored data using a shared feature extraction model.

[0139] In some embodiments, the matching device 60 also includes: a storage module 660, which is used to construct a binary tree to store the feature vectors of multiple data according to the distance between the feature vectors of the multiple data, wherein the multiple nodes in the binary tree correspond one-to-one to the feature vectors of the multiple data, and each node in the binary tree is represented by a vector.

[0140] In some embodiments, the matching device 60 also includes: a training module 670, which is used to jointly train a shared feature extraction model with other participants based on local training data, wherein the other participants include: a query party, and the local training data is the same type of training data as each other participant and has the same feature space.

[0141] In some embodiments, the training module 670 is also used to receive the latest parameters of the shared feature extraction model broadcast by the intermediate server, and synchronize the latest parameters to the local feature extraction model; use local training data to adjust the parameters of the local feature extraction model to obtain locally updated parameters; send the locally updated parameters to the intermediate server so that the intermediate server determines the latest parameters of the shared feature extraction model based on the locally updated parameters; repeat the above process until the shared feature extraction model converges, and synchronize the latest parameters of the shared feature extraction model broadcast by the intermediate server to the local feature extraction model to obtain a shared feature extraction model.

[0142] The data matching device (including the query device or the matching device) in the embodiments of the present disclosure can be implemented by various computing devices or computer systems, which will be described below in conjunction with FIG. 7 and FIG. 8 .

[0143] FIG7 is a block diagram of some embodiments of the data matching apparatus of the present disclosure. As shown in FIG7 , the apparatus 70 of this embodiment includes: a memory 710 and a processor 720 coupled to the memory 710 , wherein the processor 720 is configured to execute the data matching method of any of the embodiments of the present disclosure based on instructions stored in the memory 710 .

[0144] The memory 710 may include, for example, a system memory, a fixed non-volatile storage medium, etc. The system memory may store, for example, an operating system, an application program, a boot loader, a database, and other programs.

[0145] FIG8 is a structural diagram of some other embodiments of the data matching device disclosed herein. As shown in FIG8 , the device 80 of this embodiment includes: a memory 810 and a processor 820, which are similar to the memory 710 and the processor 720, respectively. It may also include an input / output interface 830, a network interface 840, a storage interface 850, and the like. These interfaces 830, 840, 850 and the memory 810 and the processor 820 may be connected, for example, via a bus 860. Among them, the input / output interface 830 provides a connection interface for input / output devices such as a display, a mouse, a keyboard, and a touch screen. The network interface 840 provides a connection interface for various networked devices, such as a database server or a cloud storage server. The storage interface 850 provides a connection interface for external storage devices such as SD cards and USB flash drives.

[0146] The present disclosure also provides a data matching system, which is described below in conjunction with FIG9 .

[0147] Figure 9 is a structural diagram of some embodiments of the data matching system disclosed herein. As shown in Figure 9 , the system 9 of this embodiment includes: the query device 50 and the matching device 60 of the aforementioned embodiment.

[0148] The present disclosure further provides a computer-readable storage medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the data matching method in any of the aforementioned embodiments.

[0149] The present disclosure further provides a computer program, comprising: instructions, which, when executed by the processor, cause the processor to execute the data matching method in any of the aforementioned embodiments.

[0150] The present disclosure further provides a computer program product, comprising: instructions, which, when executed by the processor, enable the processor to execute the data matching method in any of the aforementioned embodiments.

[0151] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable non-transient storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0152] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0153] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0154] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0155] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure should be included in the scope of protection of the present disclosure.

[0156] The above description is only a preferred embodiment of the present disclosure and is not intended to limit the present disclosure. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present disclosure should be included in the scope of protection of the present disclosure.

Claims

1. A data matching method, comprising: Generate a public key and a private key using a homomorphic encryption algorithm, and use the public key to encrypt a query vector to obtain an encrypted result of the query vector, wherein the query vector is a feature vector of the data to be matched; Sending a query request to a matching party, wherein the query request includes the encrypted result of the query vector and query range information; Receiving a query result returned by the matching party, wherein the query result includes one or more encrypted similarity values, each of which represents an encrypted result of a similarity value between a feature vector of a piece of data of the matching party and the query vector; It is determined whether the matching party has data matching the data to be matched according to the private key and the one or more encrypted similarity values.

2. The data matching method according to claim 1, wherein: The query range information includes a query ball, and the method further includes: A minimum circumscribed sphere of the query vector and a similarity vector to the query vector is determined as a query sphere.

3. The data matching method according to claim 2, wherein: Determining the minimum circumscribed sphere of the query vector and the similarity vector of the query vector comprises: Searching in a tree structure storing the query vector, selecting a preset number of one or more feature vectors in ascending order of distance from the query vector as similar vectors to the query vector, wherein the tree structure stores a plurality of feature vectors of a plurality of data of the same type as the data to be matched and the query vector; A minimum circumscribed sphere that includes the query vector and similar vectors to the query vector is determined.

4. The data matching method according to any one of claims 1 to 3, wherein: The determining, according to the private key and the one or more encrypted similarity values, whether the matching party has data matching the data to be matched comprises: Decrypting the one or more encrypted similarity values ​​using the private key to obtain one or more similarity values; The one or more similarity values ​​are compared with a similarity threshold to determine whether the matching party has data that matches the data to be matched.

5. The data matching method according to any one of claims 1 to 4, further comprising: A shared feature extraction model is used to extract feature vectors of multiple pieces of data stored locally, wherein the multiple pieces of data stored locally include the data to be matched.

6. The data matching method according to claim 5, further comprising: A binary tree is constructed according to the distances between the feature vectors of the plurality of data to store the feature vectors of the plurality of data, wherein a plurality of nodes in the binary tree correspond one-to-one to the feature vectors of the plurality of data.

7. The data matching method according to claim 5 or 6, further comprising: The shared feature extraction model is trained jointly with other participants according to local training data, wherein the other participants include the matching party, and the local training data is of the same type as the training data of each other participant and has the same feature space.

8. The data matching method according to claim 7, wherein: The training of the shared feature extraction model in conjunction with other participants based on the local training data includes: Receiving the latest parameters of the shared feature extraction model broadcasted by the intermediate server, and synchronizing the latest parameters to the local feature extraction model; Using local training data to adjust the parameters of the local feature extraction model to obtain locally updated parameters; Sending the locally updated parameters to the intermediate server so that the intermediate server determines the latest parameters of the shared feature extraction model according to the locally updated parameters; The above process is repeated until the shared feature extraction model converges, and the latest parameters of the shared feature extraction model broadcast by the intermediate server are synchronized to the local feature extraction model to obtain the shared feature extraction model.

9. The data matching method according to any one of claims 1 to 8, wherein: The data to be matched includes: private data and / or confidential data.

10. A data matching method, comprising: Receive a query request sent by a query party, wherein the query request includes an encrypted result of a query vector and query range information, the query vector is a feature vector of data to be matched, and the encrypted result of the query vector is obtained by encrypting the query vector using a public key generated by a homomorphic encryption algorithm by the query party; Query one or more feature vectors of one or more pieces of data according to the query range information; Determining one or more encrypted similarity values ​​according to the encryption results of the one or more feature vectors and the query vector; Sending a query result to the query party, wherein the query result includes the one or more encrypted similarity values, so that the query party can determine whether there is data matching the data to be matched based on the one or more encrypted similarity values.

11. The data matching method according to claim 10, wherein: The query range information includes a query sphere, which is the minimum circumscribed sphere of the query vector and a similar vector of the query vector determined by the query party, and the one or more feature vectors of the one or more data queried according to the query request include: Among the feature vectors of the multiple pieces of data stored locally, one or more feature vectors of the one or more pieces of data surrounded by the query sphere are determined.

12. The data matching method according to claim 11, wherein: Determining one or more feature vectors of one or more data pieces surrounded by the query sphere from the feature vectors of the multiple pieces of data stored locally comprises: A search is performed in a tree structure storing the feature vectors of the plurality of data to determine one or more feature vectors of the one or more data enclosed by the query sphere.

13. The data matching method according to any one of claims 10 to 12, wherein: The homomorphic encryption algorithm is an additive homomorphic encryption algorithm, wherein determining one or more encrypted similarity values ​​according to the encryption results of the one or more feature vectors and the query vector comprises: For each feature vector in the one or more feature vectors, an encrypted similarity value corresponding to the feature vector is determined according to a product of the feature vector and an encryption result of the query vector.

14. The data matching method according to any one of claims 10 to 13, further comprising: A shared feature extraction model is used to extract feature vectors of multiple locally stored data.

15. The data matching method according to claim 14, further comprising: A binary tree is constructed according to the distances between the feature vectors of the plurality of data to store the feature vectors of the plurality of data, wherein a plurality of nodes in the binary tree correspond one-to-one to the feature vectors of the plurality of data.

16. The data matching method according to claim 14 or 15, further comprising: The shared feature extraction model is trained jointly with other participants according to local training data, wherein the other participants include: the query party, and the local training data is of the same type as the training data of each other participant and has the same feature space.

17. The data matching method according to claim 16, wherein: The training of the shared feature extraction model in conjunction with other participants based on the local training data includes: Receiving the latest parameters of the shared feature extraction model broadcasted by the intermediate server, and synchronizing the latest parameters to the local feature extraction model; Using local training data to adjust the parameters of the local feature extraction model to obtain locally updated parameters; Sending the locally updated parameters to the intermediate server so that the intermediate server determines the latest parameters of the shared feature extraction model according to the locally updated parameters; The above process is repeated until the shared feature extraction model converges, and the latest parameters of the shared feature extraction model broadcast by the intermediate server are synchronized to the local feature extraction model to obtain the shared feature extraction model.

18. The data matching method according to any one of claims 10 to 17, wherein: The data to be matched includes: private data and / or confidential data.

19. A query device, comprising: An encryption module, used to generate a public key and a private key using a homomorphic encryption algorithm, and encrypt a query vector using the public key to obtain an encryption result of the query vector, wherein the query vector is a feature vector of the data to be matched; A sending module is used to send a query request to a matching party, wherein the query request includes: The encrypted results and query range information of the quantity; A receiving module, configured to receive a query result returned by the matching party, wherein the query result includes: one or more encrypted similarity values, each of which represents an encrypted result of a similarity value between a feature vector of a piece of data of the matching party and the query vector; A determination module is used to determine whether the matching party has data matching the data to be matched based on the private key and the one or more encrypted similarity values.

20. A matching device, comprising: A receiving module, configured to receive a query request sent by a query party, wherein the query request includes: an encrypted result of a query vector and query range information, the query vector being a feature vector of the data to be matched, and the encrypted result of the query vector being encrypted by the query party using a public key generated by a homomorphic encryption algorithm; A query module, used to query one or more feature vectors of one or more pieces of data according to the query range information; a determination module, configured to determine one or more encrypted similarity values ​​according to the encryption results of the one or more feature vectors and the query vector; A sending module is used to send the query result to the query party, wherein the query result includes: the one or more encrypted similarity values, so that the query party can determine whether there is data matching the data to be matched based on the one or more encrypted similarity values.

21. A data matching system, comprising: The query device as claimed in claim 19, and the matching device as claimed in claim 20.

22. A data matching device, comprising: processor; as well as A memory coupled to the processor, for storing instructions, wherein when the instructions are executed by the processor, the processor executes the data matching method according to any one of claims 1 to 18.

23. A computer-readable storage medium having a computer program stored thereon, wherein: When the program is executed by a processor, the steps of the method according to any one of claims 1 to 18 are implemented.

24. A computer program comprising: Instructions, when executed by the processor, cause the processor to execute the data matching method as described in any one of claims 1-18.

Citation Information

Patent Citations

  • Multi-dimensional sequencing and searching method for mass data

    CN107169114A

  • Hidden trace data verification method and system based on homomorphic encryption

    CN114756895A

  • Biological information identification method and device

    CN115100715A

  • Data matching method, device and system

    CN116401705A

  • Enhanced encryption for face-related data

    US11496288B1

Cited By

  • Data anomaly detection method and system for data privacy protection of novel power system

    CN119939652A

  • Data query method, data query device, data query system and storage medium

    CN120372690A