Provided are a
trie-based private set intersection method and
system, relating to the technical field of computers. The method comprises: first, encoding original sets of all participants into corresponding tries by using a
trie encoding mode (S1); then, traversing all nodes of the tries in lexicographical order, and invoking a preset private set intersection protocol to perform private set intersection to obtain a common
trie of all the participants (S2); and finally, decoding the obtained common trie of all the participants to obtain an intersection set (S3). By using a trie to represent a set, the space utilization is better than that of conventional
set representation, especially when there is a very long common prefix. Furthermore, the complexity of adding, deleting and querying elements on the trie is 0 / 1, facilitating maintenance of the set. Additionally, because different sub-trees under the same path are independent of each other, in the process of traversing child nodes, concurrent execution can be performed by different threads, facilitating
parallel optimization.