A privacy protection subgraph matching method and system for stream graphs

By replicating the secret sharing mechanism and using the endpoint adjacency matrix technique represented by one-hot vectors, the privacy protection problem of streaming graphs in cloud storage environments is solved, ensuring that cloud servers cannot obtain specific data content and can only detect the occurrence of pattern matching.

CN118484818BActive Publication Date: 2025-11-07HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410478118.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-19
Publication Date
2025-11-07
Estimated Expiration
2044-04-19

AI Technical Summary

Technical Problem

Existing technologies lack privacy protection measures for streaming graphs, query patterns, and query results in scenarios based on cloud storage and query streaming graphs, leading to the risk of information leakage.

Method used

A replication secret sharing mechanism is used to encrypt the streaming graph and query data. Each of the three terminals holds a secret share of the data, and subgraph matching is performed within the encrypted domain. One-hot vectors are used to represent edge labels and an endpoint adjacency matrix is ​​constructed for secure matching to ensure that information is not leaked.

Benefits of technology

This achieves privacy protection for streaming graphs in a cloud storage environment. The cloud server can only obtain information about pattern matching, but cannot obtain the specific data content, thus ensuring data privacy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118484818B_ABST
    Figure CN118484818B_ABST
Patent Text Reader

Abstract

The application provides a privacy protection subgraph matching method and system for a flow graph, and relates to the technical field of information security. The method comprises the following steps: a trusted terminal encrypts edge data in a flow graph and to-be-processed query data based on a replicated secret sharing mechanism, and sends secret shares of the edge data and secret shares of the to-be-processed query data to a first terminal, a second terminal and a third terminal respectively; the trusted terminal sends plaintext data of edge indexes in each subquery of a to-be-matched query to the first terminal, the second terminal and the third terminal respectively; and the first terminal, the second terminal and the third terminal determine a subgraph matching result of the to-be-matched query in the flow graph based on locally held data. The application can realize privacy protection in a subgraph matching process of a flow graph.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information security, and in particular to a privacy protection subgraph matching method and system for streaming graphs. BACKGROUND

[0002] Graph data in real society and production environment increasingly presents massive and dynamic characteristics, and such graph is called a streaming graph. The streaming graph is a graph structure that evolves continuously, in which the vertices and edges of the graph change over time. In the streaming graph, the vertices represent various dynamic entities, and the edges between the vertices represent various dynamic connection relationships between the entities. Such graph structure can be used to describe and process continuously generated data streams, and clearly show the dynamic evolution of the data streams and the changes of processing steps.

[0003] The time-constrained subgraph matching, as one of the most popular streaming graph search functions, aims to detect, within a given time window, a subgraph that is isomorphic to a given query pattern and whose edge appearance order conforms to the time order constraint specified by the query pattern. The time-constrained subgraph matching on the streaming graph can benefit various applications, such as credit card fraud detection and network attack detection.

[0004] With the development of cloud computing technology, more and more enterprises or organizations use the cloud to store and query the streaming graph database. However, relying on a public commercial cloud to perform streaming graph search can leak the privacy of the information-rich streaming graph data. There is no privacy protection measure for the data (including the streaming graph, the query pattern, and the query result) of the subgraph matching process of the streaming graph in the prior art in the scenario of cloud storage and query of the streaming graph. SUMMARY

[0005] The present application provides a privacy protection subgraph matching method and system for streaming graphs, which solves the defect that there is no privacy protection measure for the streaming graph, the query pattern, and the query result in the prior art in the scenario of cloud storage and query of the streaming graph, and realizes the privacy protection subgraph matching for streaming graphs.

[0006] The present application provides a privacy protection subgraph matching method for streaming graphs, comprising:

[0007] The trusted terminal encrypts the edge data in the stream graph and the to-be-processed query data based on a replicated secret sharing mechanism, and sends secret shares of the edge data and secret shares of the to-be-processed query data to the first terminal, the second terminal and the third terminal respectively, wherein the edge data comprises two endpoint IDs and an edge label of an edge in the stream graph, the to-be-processed query data comprises a graph structure of a to-be-matched query, an edge label of each edge in the to-be-matched query and compatibility order constraints of the to-be-matched query, the trusted terminal sends plaintext data of edge indexes in each subquery of the to-be-matched query to the first terminal, the second terminal and the third terminal respectively, one subquery of the to-be-matched query reflects one edge time order constraint of the to-be-matched query, and the compatibility order constraints of the to-be-matched query reflect time order constraints between edges of each subquery, and the edge label is represented by a one-hot vector.

[0008] The first terminal, the second terminal and the third terminal determine encrypted matching edges in the stream graph based on secret shares of edge labels in a locally held snapshot of the stream graph and edge labels in the to-be-matched query, wherein the edge labels of the matching edges are consistent with the edge labels in the to-be-processed query data.

[0009] The first terminal, the second terminal and the third terminal determine encrypted first candidate partial matches corresponding to each subquery of the to-be-matched query based on edge time order constraints in each subquery of the to-be-matched query and timestamps of the matching edges.

[0010] The first terminal, the second terminal and the third terminal determine encrypted second candidate partial matches corresponding to each subquery in each encrypted first candidate partial match based on graph structures of the encrypted first candidate partial matches and graph structures of subqueries of the encrypted to-be-matched query.

[0011] The first terminal, the second terminal and the third terminal determine a subgraph matching result of the to-be-matched query in the stream graph based on the encrypted second candidate partial matches, compatibility order constraints of the encrypted to-be-matched query and the graph structure of the encrypted to-be-matched query.

[0012] According to the privacy protection subgraph matching method for stream graphs provided by the application, the encrypted form of each compatibility order constraint of the to-be-matched query comprises plaintext data of two edge indexes and an encrypted form of a first order result, the first order result reflects time order of the two edge indexes, the two edge indexes are from two subqueries of the to-be-matched query respectively, and the first order result is 0 or 1.

[0013] According to the privacy protection subgraph matching method for a streaming graph provided by the application, the encrypted form of the graph structure is generated based on the following steps:

[0014] An endpoint adjacency matrix corresponding to the graph structure is constructed, and the value of the element at position (i, j) in the endpoint adjacency matrix reflects whether the edge e i and e j share an endpoint, and the element in the endpoint adjacency matrix is a four-bit vector.

[0015] The encrypted form of the endpoint adjacency matrix corresponding to the graph structure is taken as the encrypted form of the graph structure.

[0016] According to the privacy protection subgraph matching method for a streaming graph provided by the application, the first terminal, the second terminal and the third terminal determine the encrypted matching edge in the streaming graph based on the secret shares of the edge labels in the snapshot of the streaming graph and the edge labels in the query to be matched, which are locally held, and the method comprises the steps of:

[0017] The first terminal and the second terminal respectively fill in false edges in the snapshot locally held, and send the secret shares of the false edges to other terminals, wherein the endpoint ID of the false edge is different from the endpoint ID of all edges in the streaming graph.

[0018] The first terminal, the second terminal and the third terminal perform encrypted sorting on the edges in the snapshot after the false edges are filled in based on the secret shares of the timestamps of the false edges and the timestamps of the edges in the snapshot locally held, to obtain an encrypted sorting result, wherein the edge label, the endpoint ID and the timestamp of each edge in the encrypted sorting result are all encrypted.

[0019] The first terminal, the second terminal and the third terminal determine the encrypted matching edge based on the edge label in the encrypted sorting result and the encrypted edge label of the query to be matched.

[0020] According to the privacy protection subgraph matching method for a streaming graph provided by the application, the first terminal, the second terminal and the third terminal determine the encrypted matching edge based on the edge label in the encrypted sorting result and the encrypted edge label of the query to be matched, and the method comprises the steps of:

[0021] The first terminal, the second terminal and the third terminal determine whether the one-hot vectors corresponding to the edge label in the encrypted sorting result and the encrypted edge label of the query to be matched are equal to determine the encrypted matching edge.

[0022] According to the privacy protection subgraph matching method for stream graph provided by the application, the first terminal, the second terminal and the third terminal determine the encrypted second candidate partial matching corresponding to each subquery in each encrypted first candidate partial matching based on the encrypted graph structure of the first candidate partial matching and the encrypted graph structure of the to-be-matched query, and the method comprises the steps of:

[0023] The first terminal, the second terminal and the third terminal determine whether the endpoint ID corresponding to each edge in the first candidate partial matching is equal to determine the encrypted endpoint adjacency matrix of the first candidate partial matching.

[0024] The first terminal, the second terminal and the third terminal determine whether the encrypted endpoint adjacency matrix of the subquery and the first candidate partial matching is equal to determine whether the first candidate partial matching is the second candidate partial matching.

[0025] According to the privacy protection subgraph matching method for stream graph provided by the application, the second terminal, the second terminal and the third terminal determine whether the first one-hot vector and the second one-hot vector are equal based on the following steps:

[0026] Obtain the encrypted first operation result, which is the exclusive or operation result of each second operation result, and each second operation result is the and operation result of one bit in the first one-hot vector and one bit in the second one-hot vector;

[0027] Decrypt the encrypted first operation result to obtain the judgment result of whether the one-hot vectors corresponding to the two encrypted edge labels are equal.

[0028] According to the privacy protection subgraph matching method for stream graph provided by the application, the first terminal, the second terminal and the third terminal determine the subgraph matching result of the to-be-matched query in the stream graph based on the encrypted second candidate partial matching, the compatibility order constraint of the to-be-matched query and the graph structure of the to-be-matched query, and the method comprises the steps of:

[0029] The first terminal, the second terminal and the third terminal determine each first encrypted judgment result based on the encrypted second candidate partial matching and the compatibility order constraint of the to-be-matched query, and the first encrypted judgment result reflects whether the candidate matching is the first candidate matching, each candidate matching is a combination of one first candidate partial matching corresponding to each subquery, and the compatibility order constraint of the first candidate matching is consistent with the compatibility order of the to-be-matched query.

[0030] The first terminal, the second terminal, and the third terminal determine whether the encrypted endpoint adjacency matrix of the candidate match is equal to the encrypted endpoint adjacency matrix of the query to be matched in order to obtain a second encryption judgment result. The second encryption judgment result reflects whether the candidate match is a second candidate match. The graph structure of the second candidate match is consistent with the graph structure of the query to be matched.

[0031] The first terminal, the second terminal, and the third terminal determine whether each candidate match is a subgraph match result of the query to be matched in the streaming graph based on the first encryption judgment result and the second encryption judgment result.

[0032] According to a privacy-preserving subgraph matching method for streaming graphs provided by the present invention, the first terminal, the second terminal, and the third terminal determine the encrypted judgment result of whether the first endpoint adjacency matrix and the second endpoint adjacency matrix are equal based on the following steps:

[0033] The first terminal, the second terminal, and the third terminal calculate the following formula in the copied secret shared domain to obtain the encryption judgment result of whether the adjacency matrix of the first endpoint and the adjacency matrix of the second endpoint are equal:

[0034]

[0035] in, This represents the encryption judgment result of whether the first endpoint adjacency matrix and the second endpoint adjacency matrix are equal. M[i,j][s] represents the s-th bit of element M[i,j] in the endpoint adjacency matrix, M1[i,j] is an element in the first endpoint adjacency matrix, and M2[i,j] is an element in the second endpoint adjacency matrix. The ∨ operation is performed on the bits shared by the two secrets. and Performed, through formula Completed, ω=1 means M1≠M2; ω=0 means M1=M2, and the number of endpoints in both the first endpoint adjacency matrix and the second endpoint adjacency matrix is ​​κ.

[0036] The present invention also provides a privacy-preserving subgraph matching system for streaming graphs, the system comprising a trusted terminal, a first terminal, a second terminal, and a third terminal; the trusted terminal, the first terminal, the second terminal, and the third terminal collaboratively perform the privacy-preserving subgraph matching method for streaming graphs as described in any of the preceding claims.

[0037] The stream graph-oriented privacy protection subgraph matching method and system provided by the application ensure that the first terminal, the second terminal and the third terminal only obtain the following information, and cannot obtain any other information: (1) whether there is a pattern matching occurrence in the detection process; (2) the number of edges in the stream graph and the query pattern, and the timestamp associated with each edge. BRIEF DESCRIPTION OF DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are some embodiments of the application, and other drawings can also be obtained by those skilled in the art without any creative effort on the basis of these drawings.

[0039] Figure 1 Application case diagram of stream graph data in the financial field;

[0040] Figure 2 Stream graph subgraph matching diagram in the plaintext domain;

[0041] Figure 3 Flowchart of the stream graph-oriented privacy protection subgraph matching method provided by the application;

[0042] Figure 4 Schematic diagram of the application scenario of the stream graph-oriented privacy protection subgraph matching method provided by the application;

[0043] Figure 5 Decomposition schematic diagram of the query to be matched in the stream graph-oriented privacy protection subgraph matching method provided by the application;

[0044] Figure 6 Pseudo code schematic diagram of the algorithm for safely filling false edges in the stream graph-oriented privacy protection subgraph matching method provided by the application;

[0045] Figure 7 Pseudo code schematic diagram of the algorithm for safely filling false edges in the stream graph-oriented privacy protection subgraph matching method provided by the application;

[0046] Figure 8 Pseudo code schematic diagram of the algorithm for safely filling false edges in the stream graph-oriented privacy protection subgraph matching method provided by the application;

[0047] Figure 9 Pseudo code schematic diagram of the algorithm for safely filling false edges in the stream graph-oriented privacy protection subgraph matching method provided by the application;

[0048] Figure 10The secure partial match detection algorithm pseudocode diagram in the flow graph oriented privacy protection subgraph matching method provided by the application;

[0049] Figure 11 The secure partial match compatibility checking algorithm pseudocode diagram in the flow graph oriented privacy protection subgraph matching method provided by the application

[0050] Figure 12 The structural diagram of the flow graph oriented privacy protection subgraph matching system provided by the application. DETAILED DESCRIPTION

[0051] In order to make the objects, technical solutions and advantages of the present application clearer, the technical solutions in the present application will be described clearly and completely below in combination with the drawings in the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative labor fall within the protection scope of the present application.

[0052] In order to facilitate those of ordinary skill in the art to understand the technical solutions of the flow graph oriented privacy protection subgraph matching method provided by the present application, the technical background of the method provided by the present application is described first.

[0053] Figure 1 An application case of a flow graph subgraph matching in the financial field is depicted, Figure 1 In the case, a criminal builds a plan involving a merchant and a series of intermediate accounts controlled by the criminal to illegally defraud credit card funds. First, using a false identity, the criminal can obtain a short-term credit card authorization from the bank, and then the criminal attempts to illegally withdraw money at time t1 by means of a fake transaction, and after receiving the bank's payment at t2, the merchant attempts to return the money to the criminal between t3 and t4 through a series of intermediate accounts. This specific mode transacts in a time sequence (t1 < t2 < t3 < t4), which can be conveniently modeled as a flow graph query with time sequence constraints. If the bank's transaction system can detect this pattern in time, it is possible to prevent such fraudulent activities.

[0054] Definition 1: A flow graph G is a set of dynamic (monotonically increasing) directed and labeled edges {e x} x∈[X] , where X represents the total number of edges gradually increasing over time. Each edge e x =(sid x , eid x , l x , t x ) represents the edge e x at time tx (Also known as a timestamp) appears as a tagged record. x The edge connects the edge with the identity identifier (ID) sid. x Vertices and having IDeid x The vertices of the edges. Two edges are considered connected if they share the same vertex. Here, [S] represents the set {1,2,…,S}, {a...}. i} i∈[S] Let the set {a1, ..., a1} represent the set {a1, ..., a2}. S}

[0055] The two vertices connected by an edge are called the endpoints of the edge. Furthermore, the labels of the vertices can be implicitly represented using the labels of the edges. The edge label is... x Indicates the connection edge e x The labels of the two vertices. For example, in a financial transaction network, “001” can be used to label a “credit payment” type transaction (i.e., an edge) from an entity of type “credit card” (i.e., a vertex) to an entity of type “restaurant”, and “002” can be used to label a “credit payment” type transaction from an entity of type “credit card” to an entity of type “supermarket”.

[0056] Furthermore, subgraph matching on a streaming graph is performed separately for each streaming graph snapshot, which can be defined as follows.

[0057] Definition 2: Given a time window size W and the current time point t, the current snapshot of the streaming graph G. It is a subgraph of G, consisting of edges with timestamps within the time interval (tW, t] and vertices adjacent to these edges. It is the set of edges whose timestamps are within the time interval (tW,t]. Is with The set of vertices adjacent to an edge in the time window. Obviously, as the time window slides, some edges may expire, while some new edges may arrive.

[0058] by Figure 1 For example, credit card fraud often occurs within specific time intervals. For system efficiency, the credit card fraud detection process can focus only on transactions that occurred within the most recent W time units. Furthermore, the query pattern can be defined as follows.

[0059] Definition 3: The query pattern Q is derived from the query graph {σ} y} y∈[Y] and time sequence constraints {σ m <σ n} Definition. Here, Y represents the number of edges in Q, σ y =(sid) y ,eid y,l y () is a connection with ID sid y vertex to have ID eid y The label of the vertex is l y The edge. {(σ m <σ n )} represents the set of strict partial order relations between edges. σ m <σ n This means that in the graph g that matches Q, edge e i Matching edge σ m , side e j Matching edge σ n (e i ,e j ∈g), e i It shouldn't be in e j Previously appeared (represented as e) i <e j ).

[0060] The goal of temporal constraint pattern matching on a streaming graph is to identify all temporal constraint matches for a given query pattern on each snapshot of the streaming graph. Temporal constraint matches can be defined as follows.

[0061] Definition 4: Given a query schema Q and a snapshot G t If there exists a bijective function f(·) from vertex V(Q) of Q to vertex V(g) of g such that the following conditions are satisfied: (1) Isomorphism: connected vertices v i v j The labels of the edges between ∈V(Q) and f(v) i ), f(v j (2) Temporal order consistency: Consider each temporal order constraint And assume edge e i e j ∈g respectively match σ m , σ n Then e i <e j Established. The edges between should not be in The edge between them appears before, where v σ and v′ σ These are the two endpoints of edge σ in Q, and Is the edge f(v) σ )→f(v′ σ (timestamp) It is a time-ordered set given Q.

[0062] For clarity, combined Figure 2Illustration of subgraph matching of a stream graph: Figure 2 A stream graph G is shown, as well as its snapshots G9 and G 10 under a time window of size 9, and a query pattern Q and its corresponding temporal constraint matching. G contains edges of seven different labels, i.e., {001,…,007}. At time point t = 10, since the time window W is (1,10], edge e1 expires, edge e 10 arrives, forming a new snapshot G 10 . In the figure, the expired edge is shown with a dashed line, while the newly arrived edge (e 10 ) is shown with a darker color line. Query pattern Q contains four edges with labels {σ1:005,σ2:006,σ3:001,σ4:004} and has temporal order set {σ1<σ4<σ2;σ3<σ2}. Q has a single temporal constraint matching in snapshot G9, including edges {e1,e7,e5,e4}, where e1 matches σ1, e7 matches σ2, e4 matches σ3, and e5 matches σ4.

[0063] The method provided by the application realizes encrypted calculation based on replicated secret sharing.

[0064] Given a secret bit Replicated secret sharing (RSS) divides x into three shares <x> 1、 <x>2 and where x= 0 <x> 1⊕ <x> 2⊕ <x>3. Three pairs of shares <x> 1, <x> 2)、( <x> 2, <x>3) and ( <x> 3, <x>1) held by three parties P1, P2 and P3 respectively. For ease of description, the notation i±1 is used to denote the next (+) party (or secret share) or the previous (+) party (or secret share), in particular, P 3+1 (Or <x> 3+1 ) represents P1(or <x>1), P 1-1 (Or <x> 1-1 ) represents P3(or <x>3). By this representation method, it is possible to use <x> i , <x> i+1 ) represents P i (i∈{1,2,3}) holds, and let the encrypted bit x be represented as

[0065] The basic operations of the RSS of a domain include the following two:

[0066] XOR⊕: The XOR operation on the secret shared bits only requires local computation. To compute Each party P i Local computation i = <x> i ⊕ <y> i and i = <x> i ⊕ <y> i .

[0067] AND To compute Each party P i First locally compute But this operation will produce additive secret sharing that is each party P i Holds only <z> i To obtain replicated secret shares for subsequent computations, P i a re-sharing operation is needed between P i Each party P i+1 a masked share (i.e. masked <z> i <α> i where <α> i is a fresh secret share about 0, i.e., <α>1⊕<α>2⊕<α>3=0. Such a fresh secret share about 0 can be efficiently generated by a pseudorandom function (PRF) with an output domain of Specifically, in the initialization phase, each party P i samples a PRF key k i and sends k i to P i+1 . After that, to generate the j-th fresh secret share about 0, each party P i locally computes <α> i =F(k i , j)⊕F(k i-1 , j), which satisfies <α>1⊕<α>2⊕<α>3=0.

[0068] Based on the above background introduction, the privacy protection subgraph matching method for a streaming graph provided by the present application, as shown in the figure, comprises the following steps: Figure 3 S110, the trusted terminal encrypts the edge data in the streaming graph and the to-be-processed query data based on a replicated secret sharing mechanism, and sends the secret shares of the edge data and the to-be-processed query data to the first terminal, the second terminal and the third terminal respectively, the edge data comprising two endpoint IDs and an edge label of an edge in the streaming graph, and the to-be-processed query data comprising a graph structure of a to-be-matched query, an edge label of each edge in the to-be-matched query and a compatibility order constraint of the to-be-matched query, the trusted terminal sending the plaintext data of edge indexes in each subquery of the to-be-matched query to the first terminal, the second terminal and the third terminal respectively, one subquery of the to-be-matched query reflecting one edge time order constraint of the to-be-matched query, and the compatibility order constraint of the to-be-matched query reflecting the time order constraints between edges of each subquery, the edge label being represented by a one-hot vector;

[0069] S120, the first terminal, the second terminal and the third terminal determine the encrypted matching edge in the streaming graph based on the secret shares of the edge labels in the snapshot of the locally held streaming graph and the to-be-matched query, the edge label of the matching edge being consistent with the edge label in the to-be-processed query data;

[0070] S130, the first terminal, the second terminal and the third terminal determine the encrypted first candidate partial match corresponding to each subquery based on the edge time order constraint in each subquery of the to-be-matched query and the timestamp of the matching edge;

[0071]

[0072] ​S140, the first terminal, the second terminal, and the third terminal determine the encrypted second candidate partial match corresponding to each subquery in each encrypted first candidate partial match based on the graph structure of the encrypted first candidate partial match and the graph structure of the encrypted subquery of the query to be matched.

[0073] S150, the first terminal, the second terminal, and the third terminal determine the subgraph matching result of the query to be matched in the streaming graph based on the encrypted second candidate partial matching, the compatibility order constraint of the encrypted query to be matched, and the graph structure of the encrypted query to be matched.

[0074] like Figure 4 As shown, the system architecture of the method provided by this invention consists of three main entities: the user, a local server (denoted as FE, i.e., trusted terminal) specifically maintained by a regulatory agency, and a cloud server. Regulatory agencies, such as banks or cybersecurity centers, aim to continuously detect specific temporally constrained subgraph patterns in user-generated streaming graphs via cloud servers. Attracted by the advantages of cloud computing, such as scalability, ubiquitous network access, and reduced burden of local storage management, regulatory agencies wish to leverage the power of cloud computing to manage streaming graphs and alert them when specified patterns appear in the streaming graphs. However, due to concerns about privacy breaches of proprietary streaming graphs and query patterns, embedding security safeguards in such outsourced services is crucial to protect streaming graphs, query patterns, and detection results. This invention employs a distributed trust architecture, with the cloud providing the service divided into three servers (i.e., the first terminal, the second terminal, and the third terminal, denoted as S). 123 = {S1, S2, S3}). In actual deployment, S 123 It can be provided by an independent commercial cloud service provider.

[0075] This invention considers a semi-honest and non-colluding adversary model, in which each cloud server (first terminal, second terminal, and third terminal) honestly follows the protocol provided by this invention but may attempt to independently infer sensitive information while providing pattern matching services. Furthermore, it is assumed that the regulatory body and the FE are trusted parties, since the regulatory body could be an official institution (e.g., a bank), and the FE is a server specifically maintained by the regulatory body (trusted terminal). Users are also considered trusted because they are the generators of the graph data. Under the above adversary model, this invention guarantees that each cloud server receives only the following information, and no other information: (1) whether pattern matching occurred during the detection process; (2) the number of edges in the streaming graph and the query pattern, and the timestamp associated with each edge.

[0076] To facilitate secure updates of the encrypted streaming graph in the cloud, the present invention adopts an edge list structure to model the streaming graph, that is, every time a user generates a new edge, the trusted terminal encrypts it and adds it to the edge list. Specifically, the newly generated edge is modeled as e x = (sid x , eid x , l x , t x ). Only the IDs sid x and eid x of the endpoints and the label l x of the edge need to be encrypted, because the timestamp t x of the edge is considered public. To achieve high efficiency through lightweight secret sharing techniques, the FE applies the RSS technique to each value to be encrypted. However, after a detailed analysis of the temporal constraint subgraph pattern detection, the inventors found that the equality test is a key operation whose efficiency dominates the overall performance of the pattern detection. Therefore, in order to achieve efficient equality testing in the secret sharing domain, the arithmetic RSS is not directly used to encrypt each value.

[0077] Instead, the present invention introduces a preprocessing step in which each value to be encrypted is encoded as a one-hot vector. In a one-hot vector, all elements are set to "0", except for the element corresponding to the value, which is set to "1". To simplify the notation, we use the symbol p to denote the length of all one-hot vectors. Then, the binary RSS technique is applied to these one-hot vectors. Based on the above design idea, a newly generated edge e x can be encrypted as where the bold indicates the one-hot vector. The FE continuously sends the encrypted edge to the S 123 , which stores the encrypted graph as

[0078] It is challenging to find a bijective function (see Definition 4) for the temporal constraint match using widely used subgraph isomorphism algorithms (e.g., depth-first search) in the ciphertext domain. Therefore, in order to achieve secure subgraph isomorphism checking in the ciphertext domain, the present invention proposes the concept of "endpoint adjacency matrix" (EAM) to model the graph structure. The encrypted form of the graph structure is generated based on the following steps:

[0079] Construct the endpoint adjacency matrix corresponding to the graph structure, the value of the element at position (i, j) in the endpoint adjacency matrix reflects whether the edges e i and e j share an endpoint, the elements in the endpoint adjacency matrix are four-bit vectors;

[0080] The encryption form of the endpoint adjacency matrix corresponding to the graph structure is used as the encryption form of the graph structure.

[0081] Definition 5: Given a graph structure {e y =(sid) y ,eid y )} y∈[Y] Its EAM is a matrix M∈{0000,1000,0100,1100,0010,0001,0011} Y×Y Each row / column of M corresponds to an edge in the graph structure. Each element M[i,j], where i,j∈[Y] and i≠j, is a 4-bit vector representing the edge e. i and e j Whether the endpoint is shared. Specifically, if and only if the sid i =sid j The first bit of M[i,j] is equal to 1 if and only if eid i =eid j The second bit of M[i,j] is equal to 1 if and only if eid i =sid j The third bit of M[i,j] is equal to 1 if and only if sid i =eid j The fourth bit of M[i,j] is equal to 1. Furthermore, M[i,i] = 0000, i ∈ [Y]. That is...

[0082] (1) If sid i ≠sid j eid i ≠eid j eid i ≠sid j sid i ≠eid j Then M[i,j]=0000;

[0083] (2) If sid i =sid j eid i ≠eid j eid i ≠sid j sid i ≠eid j If M[i,j] = 1000;

[0084] (3) If sid i ≠sid j ,eid i =eid j ,eid i ≠sid j ,sid i ≠eid j Then M[i,j] = 0100;

[0085] (4) If sid i =sid j ,eid i =eid j ,eid i ≠sid j ,sid i ≠eid j Then M[i,j]=1100;

[0086] (5) If sid i ≠sid j ,eid i ≠eid j ,eid i =sid j ,sid i ≠eid j Then M[i,j]=0010;

[0087] (6) If sid i ≠sid j ,eid i ≠eid j ,eid i ≠sid j ,sid i =eid j Then M[i,j]=0001;

[0088] (7) If sid i ≠sid j ,eid i ≠eid j ,eid i =sid j ,sid i =eid j Then M[i,j]=0011.

[0089] The following explains how the temporal constraints of the query Q to be matched are represented:

[0090] The trusted terminal FE first decomposes the query Q to be matched into several time-series joined subquery patterns Q:={Q d } d∈[D] :

[0091] Definition 6: Given a subquery pattern consisting of κ edges, if there exists an arrangement of edges such that the temporal constraints between these edges are increasing: σ1 < ... < σ κ The query pattern is then a temporal join query pattern.

[0092] The decomposition of Q can be represented as where D is the number of temporal join sub-query patterns decomposed from Q. Each y d is a list representing the indices of the edges in the sub-temporal join query pattern Q d . Specifically, where κ d is the length of y d . Note that the length of each decomposition can be different and the decomposition of a query pattern is not unique.

[0093] In addition, there can be temporal order constraints between edges belonging to different temporal join sub-query patterns. These constraints are referred to as compatibility order constraints and are represented as where C is the number of them. The encrypted form of each compatibility order constraint of the query Q to be matched includes the plaintext data of two edge indices and the encrypted form of a first order result, which reflects the temporal order of the two edge indices from two sub-queries of the query to be matched, and the first order result is 0 or 1. A compatibility order constraint o c = (y1, y2, θ) indicates that there is a temporal order constraint between edges and . Here, θ = 1 means and θ = 0 means

[0094] Figure 5 shows how to decompose the query pattern Q shown in Figure 2 , in which case Q is decomposed into two temporal join sub-query patterns: Q1 = {σ1, σ4, σ2} and Q2 = {σ3} (the corresponding decompositions are y1 = [1, 4, 2] and y2 = [3]). In addition, there is a compatibility order constraint between Q1 and Q2: (3, 2, 1), i.e., σ3 < σ2.

[0095] The trusted terminal encrypts the sensitive information contained in the query Q to be matched using the following method:

[0096] (1) Each element of the EAM M of Q is encrypted by binary RSS as M.

[0097] (2) Each edge label l y , y ∈ [Y] is encoded as a one-hot vector l y , and then encrypted by binary RSS as

[0098] (3) Compatibility order constraints are encrypted as where

[0099] Note that FE does not encrypt each o c 's edge index y1, y2, because they only reveal the existence of the temporal order constraint between edges but not the exact temporal order constraint. Moreover, FE does not encrypt the decomposition way because they only reflect the edge indices irrelevant to Q's private information. Specifically, since FE can assign indices to edges in Q arbitrarily and the security of RSS guarantees that each encrypted edge's secret share is indistinguishable from a uniformly random value, it does not leak any private information about Q.

[0100] Finally, Q's ciphertext representation is

[0101] Upon receiving the encrypted query pattern from FE, cloud server S 123 continuously detects the encrypted temporal constraint match of query on each encrypted snapshot .

[0102] First, cloud server S 123 can easily obtain the encrypted snapshot at time point t by checking whether the public timestamp of each encrypted edge in is within the time interval (t-W, t]. Here, W is the window size. Subsequently, cloud server S 123 needs to decompose the query pattern into encrypted sub-query patterns according to the decomposition . Here, each represents the index of an edge in a sub-query pattern. Thus, S 123 can easily obtain the encrypted structure of a sub-query pattern and the encrypted edge labels of the sub-query pattern from and of query pattern by clear decomposition y d , which constitutes the encrypted sub-query pattern Specifically, (1) (2) Here, is the permutation sub-matrix of consisting of the elements in located at the intersection of row y d and column y d .

[0103] In the method provided by the application, the first terminal, the second terminal and the third terminal first determine a partial match, which refers to a graph matched with a subquery of a query to be matched. In a secure partial match detection process, S 123 First, from the candidate matches of are obtained as the first candidate partial matches without considering the graph structure. Then, S 123 filters out the candidate matches inconsistent with , and obtains the matches of as the second candidate partial matches, i.e. the partial matches of .

[0104] The stage of extracting the first candidate partial matches includes two steps: (1) S 123 safely obtains encrypted edges with labels from . These edges are called matching edges, and the set of matching edges with labels is denoted as (2) S 123 organizes edges from different and meeting the timing constraints of into candidate partial matches.

[0105] For step (1), S 123 performs a secure equality test on and the encrypted label of each edge in the encrypted snapshot , and then decrypts the test results one by one to obtain the encrypted matching edges. However, simply decrypting the test results enables S 123 to determine which edges in are matching edges, thereby obtaining the access pattern of the query. To solve this problem, S 123 safely fills the encrypted false edges in the snapshot. This ensures the secure decryption of the equality test results while preventing S 123 from learning the access pattern.

[0106] For step (2), the solution is based on the fact that is a subquery pattern of a temporal join. If S 123 can preserve the arrangement order of the real edges in the snapshot after filling the false edges, they can determine the (non-private) timing of all matching edges. Therefore, S 123 can easily organize the matching edges into candidate partial matches according to their timing and the timing constraints of .

[0107] Specifically, the first terminal, the second terminal and the third terminal determine encrypted matching edges in the stream graph based on secret shares of edge labels in a locally held snapshot of the stream graph and edge labels in a query to be matched, comprising:

[0108] The first terminal and the second terminal respectively fill in fake edges in the locally held snapshot, and send secret shares of the fake edges to the other terminal, the endpoint IDs of the fake edges being different from the endpoint IDs of all edges in the stream graph;

[0109] The first terminal, the second terminal and the third terminal encryptally order the edges in the snapshot after filling in the fake edges based on secret shares of timestamps of the fake edges and timestamps of the edges in the locally held snapshot, obtaining an encrypted ordering result, the edge labels, the endpoint IDs and the timestamps of each edge in the encrypted ordering result being encrypted;

[0110] The first terminal, the second terminal and the third terminal determine encrypted matching edges based on edge labels in the encrypted ordering result and encrypted edge labels of the query to be matched.

[0111] As shown in Figure 6 , the process of securely filling in fake edges (subroutine 1: olivPad) includes: first, S1 and S2 respectively fill in encrypted fake edges with different labels to the snapshot, while ensuring that S cannot know the number of fake edges for each label. 123 The number and position of fake edges for each label are both unaware. Specifically, for each possible edge label l, S1 first generates several fake edges locally, in the form of {(-1,-1,l,t x )} (lines 2-8 of subroutine 1), where {t x} is a random timestamp. The IDs of the two endpoints of each fake edge are set to -1, which distinguishes them from real vertices and prevents them from affecting the accuracy of detection. After that, S1 encodes -1, -1, l into one-hot vectors respectively, and then secret shares all fake edges with S2 and S3 in the form of RSS, generating (9th line of subroutine 1). It should be noted that the timestamp t x here is also encrypted. Similarly, S2 performs the above process (lines 10 and 11 of subroutine 1). Then, S 123 integrates these encrypted fake edges into the encrypted snapshot (line 12 of subroutine 1). Since the edge labels are encrypted, S1 and S2 cannot know the number of fake edges for each label filled in by the other party.

[0112] However, S 123 can still determine which edges in the filled snapshot are fake, because they know the edges recently shared by the other cloud server. Therefore, the challenge that must be solved is to make S 123 The edges in the padded snapshot can be rearranged while ensuring S 123 The new positions of each fake and real edge cannot be obtained. Moreover, it is crucial to preserve the temporal order of real edges for facilitating the partial matching of security built-in temporal constraints later. To achieve both goals, S 123 The edges in the padded snapshot are securely ordered based on their encrypted timestamps (line 14). Since the timestamps of fake edges are random and encrypted, S 123 After performing the secure ordering, the new positions of fake and real edges in the padded snapshot (denoted as ) cannot be determined, and thus the access pattern cannot be obtained.

[0113] The first terminal, the second terminal and the third terminal determine the encrypted matching edges based on the edge labels in the encrypted ordering result and the encrypted edge labels of the query to be matched, comprising:

[0114] The first terminal, the second terminal and the third terminal determine the encrypted matching edges by determining whether the one-hot vectors corresponding to the edge labels in the encrypted ordering result and the encrypted edge labels of the query to be matched are equal.

[0115] The first terminal, the second terminal and the third terminal determine whether the first one-hot vector and the second one-hot vector are equal based on the following steps:

[0116] Obtain the encrypted first operation result, which is the XOR operation result of each second operation result, and each second operation result is the AND operation result of one bit in the first one-hot vector and one bit in the second one-hot vector;

[0117] Decrypt the encrypted first operation result to obtain the judgment result of whether the one-hot vectors corresponding to the two encrypted edge labels are equal.

[0118] As shown in Figure 7 , the secure equality test (subroutine 2: secTest): now introduce S 123 how to efficiently and securely perform equality test on two encrypted one-hot vectors and . If a = b, output the secret sharing ω = 1, otherwise output ω = 0. First, perform bitwise AND operation on and , then use XOR operation to calculate on the result of AND operation to generate i.e.

[0119]

[0120] Since the above formula contains a "dot product" calculation, in each Operations that do not require re-sharing at the end of the operation. Specifically, S 123 may locally perform ⊕ (line 4 of Subroutine 2) on the additive secret sharing of ω (line 2 of Subroutine 2), thereby generating an additive secret sharing of ω, without having to re-share the result after each operation to generate a replicated secret sharing.

[0121] S 123 The equality test result ω is then decrypted to determine whether an encrypted edge is a matching edge. Since S 123 the encrypted snapshot is oblivious to the new location of the true edges, the decryption of the test result does not leak the access pattern.

[0122] As shown in FIG. 3, S Figure 8 constructs encrypted candidate partial matches (Subroutine 3: Constr): After obtaining the matching edges for each edge label of , S 123 performs Step (2): Organize the edges from different matching edge sets that satisfy the temporal order constraints of into encrypted candidate partial matches. Since the edges in are arranged according to their timestamps, S 123 can determine the temporal order of all matching edges. Since is a temporal join subquery pattern, S 123 can easily organize the matching edges into the first candidate partial matches according to their temporal order.

[0123] More specifically, S 123 first constructs the set (line 2 of Subroutine 3) that includes all combinations of edges from different . Then, S 123 checks the temporal order of the edges in each combination (lines 3-7 of Subroutine 3). Specifically, given is a first candidate partial match if holds.

[0124] The first terminal, the second terminal, and the third terminal determine, based on the graph structure of the encrypted first candidate partial matches and the graph structure of the subquery of the encrypted query to be matched, in each encrypted first candidate partial match, an encrypted second candidate partial match corresponding to the respective subquery, comprising:

[0125] ​​The first terminal, the second terminal, and the third terminal determine whether the one-hot vectors corresponding to the endpoint IDs of each edge in the first candidate partial match are equal to determine the encrypted endpoint adjacency matrix of the first candidate partial match.

[0126] The first terminal, the second terminal, and the third terminal determine whether the encrypted endpoint adjacency matrix of the subquery and the first candidate partial match are equal to determine whether the first candidate partial match is the second candidate partial match.

[0127] The first candidate partial match is extracted by considering edge label matching and temporal order constraints, but not structural matching. The following section describes a safe way to filter those with structural similarities. Inconsistent candidate partial matching, to obtain an encrypted second candidate partial matching method (e.g.) Figure 9 Subroutine 4 (secFltr) is shown. It's important to note that checking structural consistency between graphs involves high computational complexity. Therefore, it is first based on... Matching each cryptographic candidate part The one-to-one matching relationship between them establishes Theorem 1, so that S 123 Easily check the structural consistency between them.

[0128] Theorem 1: Given a query Q = {σ1,…,σ} n } and EAMM1 of Q; query a candidate match P = {e1,…,e n } and P's EAMM2, where edge e i Matching edge σ i , i∈[n]. If M1=M2, then P is a match of Q; if M1≠M2, then P is not a match of Q.

[0129] Theorem 1 holds because M1 = M2 implies M1[i,j] = M2[i,j]. This means... Q in (σ i ,σ j The connection relationship between ) and P (e) i ,e j The connections between M1 and M2 are the same. Conversely, M1≠M2 means... M1[i,j]≠M2[i,j]. This means that... (σ i ,σ j The connection relationship between (e) and (e) i ,e j The connection relationships are different. Therefore, S 123 They can be easily evaluated by comparing their encrypted EAMs. Match with its candidates Structural consistency between them.

[0130] Securely constructing an encrypted EAM: Given an encrypted first candidate part matching S 123 First, construct its encrypted EAM. S 123 It is necessary to match each pair of edges in the candidate parts. and The endpoint ID is used to perform a secure equality test (secTest). Specifically, given... endpoint ID and e j endpoint ID S 123 implement:

[0131]

[0132] in "‖" indicates that the elements are concatenated into a vector.

[0133] Securely check structural consistency: Then, S 123 Safety assessment Whether it is valid, among which It was obtained during the preprocessing stage. The encrypted EAM. To achieve this, S... 123 implement:

[0134]

[0135] Where M[i,j][s] represents the s-th bit of M[i,j]. The OR(∨) operation operates on bits shared between two secrets. and This can be done through a formula. Completed. ω = 1 represents M. d ≠M l ω = 0 indicates M d =M l Finally, S 123 Decryption Determine whether to match the first candidate part Add it to the second candidate partial matching set.

[0136] The complete process of extracting the second candidate partial match is as follows: Figure 10 As shown.

[0137] The second candidate part matches corresponding to each subquery can form a set, S 123 The partial matches from different sets need to be combined to form the final encrypted detection result. However, simply combining partial matches can lead to false matches, because the temporal order and structure of edges of partial matches from different sets can be incompatible with each other, i.e., the combination of partial matches can not be a match of the query pattern with the temporal constraints. Next, we introduce how to safely check the compatibility between encrypted second candidate partial matches to generate the final encrypted detection results

[0138] The first terminal, the second terminal and the third terminal determine the subgraph match result of the query to be matched in the streaming graph based on the encrypted second candidate partial matches, the compatibility order constraints of the encrypted query to be matched and the graph structure of the encrypted query to be matched, comprising:

[0139] The first terminal, the second terminal and the third terminal determine each first encrypted judgment result based on the encrypted second candidate partial matches and the compatibility order constraints of the encrypted query to be matched, the first encrypted judgment result reflecting whether the candidate match is a first candidate match, each candidate match being a combination of one first candidate partial match corresponding to each subquery respectively, the compatibility order constraints of the first candidate match being consistent with the compatibility order of the query to be matched;

[0140] The first terminal, the second terminal and the third terminal determine whether the endpoint adjacency matrix of the encrypted candidate match is equal to the endpoint adjacency matrix of the encrypted query to be matched to obtain a second encrypted judgment result, the second encrypted judgment result reflecting whether the candidate match is a second candidate match, the graph structure of the second candidate match being consistent with the graph structure of the query to be matched;

[0141] The first terminal, the second terminal and the third terminal determine whether each candidate match is the subgraph match result of the query to be matched in the streaming graph based on the first encrypted judgment result and the second encrypted judgment result.

[0142] As shown in Figure 11 , the secure partial match compatibility check involves checking all possible combinations of second candidate partial matches (called candidate matches) Figure 11 (Algorithm 2, line 2). Given a candidate match S 123 First, check whether the temporal order of its edges meets the temporal constraints of the query pattern . Then, S 123 check whether the structure of the graph formed by is consistent with the structure of . If the combination passes these checks, S 123 add it to the final encrypted detection result set .

[0143] Secure temporal compatibility check:

[0144] Recall that each encrypted partial match of edges in has obeyed the temporal order constraint of the corresponding subquery pattern of temporal join. Thus, S 123 needs to check whether the temporal order of edges in different partial matches S 123 First, S retrieves the edges in and corresponding to the two partial matches (denoted as and respectively). Since S 123 knows the mapping between edges in and edges in , this retrieval can be done easily.

[0145] Then, S 123 checks whether the temporal order of and complies with The checking process is formalized as ( Figure 11 line 6 of Algorithm 2), where is placed after in the encrypted snapshot. Then equals 1, otherwise equals 0. Since S 123 knows the rank of and in the encrypted snapshot, this expression can be evaluated in the clear domain. Here, denotes that the temporal order of and complies with the constraint while denotes the opposite. Finally, S 123 combines of all compatibility order constraints to obtain the checking result ( Figure 11 line 8 of Algorithm 2), where denotes that the temporal order of edges in complies with all temporal order constraints of , while denotes the opposite.

[0146] Secure structural compatibility check:

[0147] Then, S 123 Need to be checked Is the structure consistent with The structure is consistent. To check structural consistency, similar to what was explained earlier, S 123 First, construct safely using formula (1). Encrypted EAM ( Figure 11 (Line 9 of Algorithm 2), then and Encrypted EAM The above evaluation formula (2) outputs ω( Figure 11 Line 10 of Algorithm 2). Here, ω = 0 indicates... and The structure is consistent, while ω = 1 represents the opposite case. It is important to note that, in order to ensure... and The above evaluation formula (2) outputs the correct result, S 123 Need to be based on Middle and side Construction of mapping relationship between middle and edge

[0148] Then, S 123 right and Perform an AND operation to obtain the check result (line 11 of Algorithm 2). 123 Decipher χ, where χ = 1 represents And ω=0, that is yes The time constraint matching is used, while χ = 0 indicates the opposite case. Here, The "NOT" operation in the binary field can be represented by letting S... 123 This is achieved by two local flips of their jointly held secret shared shares. Finally, if Not empty, S 123 Return it to FE. FE decrypts it. And notify the regulatory authorities.

[0149] In summary, the privacy-preserving subgraph matching method for streaming graphs provided by this invention will not disclose the streaming graph, query pattern, and query results to any of the three terminals participating in the computation, thus achieving privacy-preserving subgraph matching for streaming graphs.

[0150] The privacy-preserving subgraph matching system for streaming graphs provided by this invention will be described below. The privacy-preserving subgraph matching system for streaming graphs described below can be referred to in correspondence with the privacy-preserving subgraph matching method for streaming graphs described above.

[0151] As shown in Figure 12 The flowchart-oriented privacy protection subgraph matching system provided by the present application comprises a trusted terminal, a first terminal, a second terminal and a third terminal; the trusted terminal, the first terminal, the second terminal and the third terminal are communicatively connected to cooperatively complete the flowchart-oriented privacy protection subgraph matching method as described above.

[0152] Those skilled in the art can clearly understand from the above description of the embodiments that the embodiments can be realized by means of software and necessary general hardware platforms, and of course, can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of a software product, which can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method described in each embodiment or some parts of the embodiment.

[0153] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for some technical features thereof; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.< / z> < / z> < / y> < / x> < / y> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / x> < / x>

Claims

1. A privacy preserving subgraph matching method for stream graphs, characterized in that, The method comprises: The trusted terminal encrypts the edge data in the stream graph and the to-be-processed query data based on a replicated secret sharing mechanism, and sends secret shares of the edge data and secret shares of the to-be-processed query data to the first terminal, the second terminal and the third terminal respectively, wherein the edge data comprises two endpoint IDs and an edge label of an edge in the stream graph, the to-be-processed query data comprises a graph structure of a to-be-matched query, an edge label of each edge in the to-be-matched query and compatibility order constraints of the to-be-matched query, the trusted terminal sends plaintext data of edge indexes in each subquery of the to-be-matched query to the first terminal, the second terminal and the third terminal respectively, one subquery of the to-be-matched query reflects one edge time order constraint of the to-be-matched query, and the compatibility order constraints of the to-be-matched query reflect time order constraints between edges of the subqueries, and the edge label is represented by a one-hot vector; The first terminal, the second terminal and the third terminal determine encrypted matching edges in the stream graph based on secret shares of edge labels in a locally held snapshot of the stream graph and edge labels in the to-be-matched query, wherein the edge labels of the matching edges are consistent with the edge labels in the to-be-processed query data; The first terminal, the second terminal and the third terminal determine encrypted first candidate partial matches corresponding to each subquery of the to-be-matched query based on edge time order constraints in the subquery and timestamps of the matching edges; The first terminal, the second terminal and the third terminal determine encrypted second candidate partial matches corresponding to each subquery in each encrypted first candidate partial match based on graph structures of the encrypted first candidate partial matches and graph structures of subqueries of the encrypted to-be-matched query; The first terminal, the second terminal and the third terminal determine a subgraph matching result of the to-be-matched query in the stream graph based on the encrypted second candidate partial matches, the compatibility order constraints of the encrypted to-be-matched query and the graph structure of the encrypted to-be-matched query; An encrypted form of each compatibility order constraint of the to-be-matched query comprises plaintext data of two edge indexes and an encrypted form of a first order result, the first order result reflects a time order of the two edge indexes, the two edge indexes are from two subqueries of the to-be-matched query, and the first order result is 0 or 1.

2. The stream graph oriented privacy-preserving subgraph matching method according to claim 1, characterized in that, An encrypted form of a graph structure is generated based on the following steps: constructing an endpoint adjacency matrix corresponding to the graph structure, the value of the element at position (i,j) in the endpoint adjacency matrix reflecting the edge e i and e j whether the endpoints are shared, the elements in the endpoint adjacency matrix being four-bit vectors; An encrypted form of an endpoint adjacency matrix corresponding to the graph structure is taken as the encrypted form of the graph structure.

3. The stream graph oriented privacy-preserving subgraph matching method of claim 1, wherein, The first terminal, the second terminal and the third terminal determine encrypted matching edges in the stream graph based on secret shares of edge labels in a locally held snapshot of the stream graph and edge labels in the to-be-matched query, comprising: The first terminal and the second terminal fill in false edges in the snapshot held locally respectively, and send secret shares of the false edges to other terminals, endpoints of the false edges being different from endpoints of all edges in the stream graph; The first terminal, the second terminal and the third terminal perform an encrypted ordering on the edges in the snapshot after filling in the false edges based on secret shares of time stamps of the false edges and time stamps of the edges in the snapshot held locally, obtaining an encrypted ordering result, in which edge labels, endpoint IDs and time stamps of each edge are encrypted; The first terminal, the second terminal and the third terminal determine the encrypted matching edges based on edge labels in the encrypted ordering result and encrypted edge labels of the query to be matched.

4. The stream graph oriented privacy-preserving subgraph matching method according to claim 3, characterized in that, The first terminal, the second terminal and the third terminal determine the encrypted matching edges based on edge labels in the encrypted ordering result and encrypted edge labels of the query to be matched, comprising: The first terminal, the second terminal and the third terminal determine the encrypted matching edges based on whether the one-hot vectors corresponding to the edge labels in the encrypted ordering result and the encrypted edge labels of the query to be matched are equal.

5. The stream graph oriented privacy-preserving subgraph matching method according to claim 2, characterized in that, The first terminal, the second terminal and the third terminal determine the encrypted second candidate partial match corresponding to each subquery in the encrypted first candidate partial match based on the graph structure of the encrypted first candidate partial match and the graph structure of the subquery of the query to be matched, comprising: The first terminal, the second terminal and the third terminal determine the encrypted endpoint adjacency matrix of the first candidate partial match based on whether the one-hot vectors corresponding to the endpoint IDs of each edge in the first candidate partial match are equal; The first terminal, the second terminal and the third terminal determine whether the first candidate partial match is the second candidate partial match based on whether the encrypted endpoint adjacency matrix of the subquery and the first candidate partial match are equal.

6. The stream graph oriented privacy-preserving subgraph matching method according to claim 4 or 5, characterized in that, The first terminal, the second terminal and the third terminal determine whether the first one-hot vector and the second one-hot vector are equal based on the following steps: Obtain an encrypted first operation result, the first operation result being an exclusive or operation result of each second operation result, each second operation result being an and operation result of one bit in the first one-hot vector and one bit in the second one-hot vector; Decrypt the encrypted first operation result to obtain a judgment result of whether the one-hot vectors corresponding to the two encrypted edge labels are equal.

7. The stream graph oriented privacy-preserving subgraph matching method according to claim 2, characterized in that, The first terminal, the second terminal and the third terminal determine a subgraph matching result of the query to be matched in the stream graph based on the encrypted second candidate partial match, the compatibility order constraint of the encrypted query to be matched and the graph structure of the encrypted query to be matched, comprising: The first terminal, the second terminal and the third terminal determine respective first encrypted judgment results based on compatibility order constraints of the encrypted second candidate partial match and the encrypted query to be matched, the first encrypted judgment result reflecting whether a candidate match is a first candidate match, each of the candidate matches being a combination of a respective first candidate partial match corresponding to each of the sub-queries, the compatibility order constraints of the first candidate match being consistent with the compatibility order of the query to be matched; The first terminal, the second terminal and the third terminal determine a second encrypted judgment result by determining whether the endpoint adjacency matrix of the encrypted candidate match is equal to the endpoint adjacency matrix of the encrypted query to be matched, the second encrypted judgment result reflecting whether the candidate match is a second candidate match, the graph structure of the second candidate match being consistent with the graph structure of the query to be matched; The first terminal, the second terminal and the third terminal determine whether each of the candidate matches is a subgraph match result of the query to be matched in the streaming graph based on the first encrypted judgment result and the second encrypted judgment result.

8. The stream graph oriented privacy-preserving subgraph matching method according to claim 5 or 7, characterized in that, The first terminal, the second terminal and the third terminal determine the encrypted judgment result of whether the first endpoint adjacency matrix and the second endpoint adjacency matrix are equal based on the following steps: The first terminal, the second terminal and the third terminal calculate the following formula in a replicated secret sharing domain to obtain the encrypted judgment result of whether the first endpoint adjacency matrix and the second endpoint adjacency matrix are equal: wherein, denotes the encrypted result of the equality of the first and second endpoint adjacency matrices, M[i,j][s] denotes the s-th bit of the endpoint adjacency matrix element M[i,j], M1[i,j] is an element in the first endpoint adjacency matrix, M2[i,j] is an element in the second endpoint adjacency matrix, the ∨ operation is performed on two secret shared bits and is done by the formula ω = 1 means M1 ≠ M2; ω = 0 means M1 = M2, the number of endpoints in the first and second endpoint adjacency matrices is κ.

9. A stream-oriented graph privacy-preserving subgraph matching system, comprising: The system comprises a trusted terminal, a first terminal, a second terminal and a third terminal; the trusted terminal, the first terminal, the second terminal and the third terminal cooperatively complete the privacy protection subgraph matching method for streaming graphs according to any one of claims 1-8.

Citation Information

Patent Citations

  • Privacy protection subgraph matching method and system

    CN114969406A

  • Distributed social graph data sub-graph security counting method and system

    CN116561378A