Graph data integrity protection method and device, equipment, medium and program product
By adopting multi-fork-tree structure and hashing operations based on target filters in the graph database, the fine-grained integrity protection of graph data is achieved, the inefficiency problem in the prior art is solved, and the security and reliability of graph data are improved.
Patent Information
- Application Number
- CN202411856648.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-17
- Publication Date
- 2025-03-28
AI Technical Summary
The prior art is difficult to achieve fine-grained graph data integrity protection in graph databases, especially when processing graph data of hundreds of millions of scales, hashing and signature operations are time-consuming and inefficient.
The multi-fork-tree structure based on the target filter is used to record the structural information of the graph data, and fine-grained integrity protection is achieved through hashing operations and private key signatures. The specific steps include building a multi-forktree structure, hashing the child nodes and storing them on the root node, using the multi-forktree structure after hashing to protect the integrity of the graph data change operations, and verifying the integrity of the query operations.
It realizes efficient recording and fine-grained integrity protection of graph data, reduces the time consumption of signature and signature verification, and improves the security and reliability of graph data.
Smart Images

Figure CN119720290A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of big data and database technology, specifically to the field of graph data and graph database technology, and more specifically to a graph data integrity protection method, apparatus, device, medium and program product. Background Art
[0002] Data integrity is one of the important requirements for data storage security. Traditionally, data integrity can be protected by hashing and signing. However, hashing and signing are not applicable to graph data. The main reason is that graph data is composed of interconnected nodes and the edges connecting them. Therefore, fine-grained integrity protection means calculating hash values and performing signature operations on each node and edge. Signature and signature verification operations are very time-consuming, which is unacceptable for graph databases that usually have hundreds of millions of nodes. Summary of the invention
[0003] In view of the above problems, the present disclosure provides a graph data integrity protection method, apparatus, device, medium and program product that improve the fine-grained integrity protection of graph data.
[0004] According to a first aspect of the present disclosure, a graph data integrity protection method is provided, comprising:
[0005] Using a multi-branch tree structure based on target filters to record the structural information of target graph data;
[0006] The private key used for signing, the root node in the multi-branch tree structure, and the current child node that is not fully stored in the trusted storage area are stored, and the other child nodes in the multi-branch tree structure that are fully stored in the untrusted storage area are stored;
[0007] Perform hash operations on other child nodes in the multi-tree structure, and store the operation results in the root node of the multi-tree structure;
[0008] The multi-tree structure after hash operation is used to protect the integrity of the change operation of the target graph data, and the private key and the multi-tree structure after hash operation are used to verify the integrity of the query operation of the target graph data.
[0009] According to an embodiment of the present disclosure, the above-mentioned method of recording the structural information of the target graph data using the multi-tree structure based on the target filter includes:
[0010] Constructing a multi-tree structure for target graph data integrity protection, and setting each node of the multi-tree structure as a target filter;
[0011] The subnodes of the multi-branch tree structure are divided into entity subnodes and relationship subnodes, and the entity subnodes of the multi-branch tree structure are used to record the identifiers of the nodes in the target graph data;
[0012] The relation subnodes of the multi-branch tree structure are used to record the identifiers of the start nodes and the end nodes of the edges in the target graph data.
[0013] According to an embodiment of the present disclosure, the above-mentioned hash operation is performed on other child nodes in the multi-branch tree structure, and the operation result is stored on the root node of the multi-branch tree structure, including:
[0014] Perform hash operations on other entity child nodes in the multi-tree structure, and add the hash operation results of other entity child nodes to the root node of the multi-tree structure;
[0015] Hash operations are performed on other relational child nodes in the multi-tree structure, and the hash operation results of other relational child nodes are added to the root node of the multi-tree structure.
[0016] According to an embodiment of the present disclosure, the above-mentioned use of the multi-tree structure after hash operation to perform integrity protection on the target graph data change operation includes:
[0017] When the target graph data addition operation is legal, the identifier associated with the newly added node or edge in the target graph data is added to the current child node of the multi-branch tree structure after the hash operation;
[0018] When the current child node in the multi-branch tree structure after the hash operation is full of information, the current child node is migrated to the untrusted storage area, and a new current child node is generated in the trusted storage area.
[0019] According to an embodiment of the present disclosure, the above-mentioned use of the multi-tree structure after hash operation to perform integrity protection on the target graph data change operation includes:
[0020] When the deletion operation of the target graph data is legal, the multi-branch tree structure after the hash operation is traversed to obtain the child nodes associated with the deleted nodes or edges in the target graph data, and the identifiers in the associated child nodes are deleted from the multi-branch tree structure after the hash operation.
[0021] According to an embodiment of the present disclosure, the above-mentioned use of the multi-tree structure after hash operation to perform integrity protection on the target graph data change operation includes:
[0022] When the modification operation of the target graph data is legal, the multi-branch tree structure after the hash operation is traversed to obtain the child nodes associated with the modified nodes or edges in the graph data;
[0023] The identifier deletion operation and the identifier addition operation are performed on the associated child nodes in sequence.
[0024] According to an embodiment of the present disclosure, the above-mentioned use of the multi-tree structure after hash operation to perform integrity protection on the target graph data change operation also includes:
[0025] If the target graph data modification operation is illegal, the modification operation on the multi-tree structure after the hash operation is refused.
[0026] In the case where the target graph data modification operation is illegal, the illegal modification operation of the target graph data is located by comparing the structural information recorded in the multi-branch tree structure after the hash operation with the actual structural information of the target graph data;
[0027] When the target graph data modification operation is illegal, the target graph data after the illegal modification operation is rolled back using the structural information recorded in the multi-branch tree structure after the hash operation.
[0028] According to an embodiment of the present disclosure, the above-mentioned use of a private key and a multi-tree structure after a hash operation to perform integrity protection verification on a query operation of target graph data includes:
[0029] Based on the user's query request, the root node and the current child node in the multi-branch tree structure after the hash operation are signed using the private key, and the signed multi-branch tree structure is sent to the user as the query result;
[0030] The query result is signed and verified, the transmission process of the query result is verified for integrity based on the signature verification result, and the credibility of the query result is verified based on the integrity verification result.
[0031] According to an embodiment of the present disclosure, the integrity verification of the transmission process of the query result based on the signature verification result includes:
[0032] If the signature verification result shows that the root node and the current child node have not been tampered with, recalculate the hash values of other child nodes in the signed multi-branch tree structure;
[0033] When the recalculated hash value is the same as the hash value in the root node, it is determined that the query result has integrity during the transmission process.
[0034] According to an embodiment of the present disclosure, the integrity verification of the transmission process of the query result based on the signature verification result further includes:
[0035] In the case where the signature verification result shows that the root node and / or the current child node have been tampered with, it is determined that the query result does not have integrity during the transmission process;
[0036] In the case where the hash value obtained by recalculation is different from the hash value in the root node, it is determined that the query result does not have integrity during the transmission process.
[0037] According to an embodiment of the present disclosure, the credibility verification of the query result based on the integrity verification result includes:
[0038] When the query result is complete, the target graph data is traversed, and when the traversal result shows that all nodes and edges in the target graph data exist in the query result, it is determined that the query result is credible.
[0039] According to an embodiment of the present disclosure, the credibility verification of the query result based on the integrity verification result further includes:
[0040] When the traversal result shows that the nodes and / or edges in the target graph data do not exist in the query result, it is determined that the query result is not credible.
[0041] A second aspect of the present disclosure provides a graph data integrity protection device, comprising:
[0042] A recording module, used for recording structural information of target graph data by using a multi-branch tree structure of a target filter;
[0043] A storage setting module, used to store the private key used for signing and the root node and the current child node that is not fully stored in the multi-branch tree structure in the trusted storage area, and store other child nodes that are fully stored in the multi-branch tree structure in the untrusted storage area;
[0044] A hash operation module is used to perform hash operations on other child nodes in the multi-branch tree structure and store the operation results on the root node of the multi-branch tree structure;
[0045] The integrity verification module is used to use the multi-branch tree structure after hash operation to protect the integrity of the change operation of the target graph data, and to use the private key and the multi-branch tree structure after hash operation to perform integrity protection verification on the query operation of the target graph data.
[0046] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0047] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.
[0048] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.
[0049] The present disclosure utilizes a multi-branch tree structure based on a target filter to record the structural information of the target graph data, thereby realizing efficient recording of the target graph data structural information and fine-grained integrity protection; at the same time, since the multi-branch tree structure utilizes the addition and query operations of the target filter to replace a large number of signature and signature verification operations, efficient verification of the target graph data is realized and time consumption is reduced; in addition, based on trusted computing technology, the nodes of the multi-branch tree structure are classified and stored, and the root node and the current child nodes that are not fully stored and can be modified are stored in a trusted storage area, so that the graph data integrity protection scheme of the present disclosure is based on hardware security, which reduces the possibility of potential attacks or tampering, and greatly improves the security and reliability of the graph data. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0051] Figure 1 It is an application scenario diagram of the graph data integrity protection method according to an embodiment of the present disclosure;
[0052] Figure 2 is a flow chart of a graph data integrity protection method according to an embodiment of the present disclosure;
[0053] Figure 3 is a software and hardware configuration diagram of a graph data integrity protection method according to an embodiment of the present disclosure;
[0054] Figure 4 is a schematic diagram of the structure of a graph data integrity protection device according to an embodiment of the present disclosure;
[0055] Figure 5 It is a block diagram of an electronic device suitable for implementing a graph data integrity protection method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0056] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0057] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0058] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0059] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0060] In related technologies, the technical solution for graph database integrity protection can be the integrity protection of the entire graph, that is, hashing the entire graph database and signing the hash result. When verifying the integrity, the user is required to hash the entire graph and then verify the signature. For a graph database with hundreds of millions of items, it is obviously not practical to require users to frequently verify the integrity of the entire graph during use. From a practical point of view, users urgently need fine-grained integrity protection and verification of a single node or edge.
[0061] However, in the process of implementing the present disclosure, it was found that the graph data integrity protection technical solution of the graph database does not have a fine-grained integrity protection technical solution for a single node or edge. For graph databases with massive graph data, the existing graph data integrity protection technical solution needs to hash each node or edge and then sign it. Since the signature operation and signature verification operation are very time-consuming, this leads to low efficiency, high time cost and high hardware cost of the existing technical solution; at the same time, for graph databases with massive graph data, such as graphs with hundreds of millions of nodes or edges, the time required for hundreds of millions of signature operations often exceeds the user's acceptance; in addition, if the host where the graph database is located is attacked or tampered with, the integrity of the graph data is still difficult to guarantee. Therefore, in response to the above-mentioned technical problems existing in the prior art, the present disclosure provides a graph data integrity protection method for solving the problem of fine-grained integrity protection of graph databases and the problem of detecting integrity tampering of graph data on untrusted hosts.
[0062] The present disclosure involves target filter technology, trusted computing technology, signature private key and other related technical contents.
[0063] In this disclosure, the target filter is a cuckoo filter as an example, which has three operation interfaces: add element, delete element, and query element. Compared with other filters, such as Bloom filter, cuckoo filter supports element deletion operation (cuckoo filter-specific operation), so it can be used to maintain the fine-grained integrity of graph data (nodes / edges).
[0064] It should be noted that the present disclosure utilizes the cuckoo filter only to illustrate the technical solution of the present disclosure. Those skilled in the art may, under the technical inspiration given by the present disclosure, adopt other filters with the same or similar functions, for example, other filters with the same or similar functions as the cuckoo filter, or other filters with deletion functions improved on the basis of the Bloom filter.
[0065] The trusted computing technology involved in this disclosure refers to a security protection mechanism built on a hardware security chip TPM (Trusted Platform Module) or TCM (Trusted Cryptography Module). Those skilled in the art can select a security protection mechanism that meets their needs based on the technical inspiration given in this disclosure. This disclosure uses TPM or TCM to build a trusted storage space, and stores a signature private key and part of the cuckoo filter in it.
[0066] Among them, the present disclosure uses a private key to sign the cuckoo filter or query structure to ensure the integrity of the signature content. Since the public and private keys are paired, only the private key can generate a correct signature.
[0067] The embodiments of the present disclosure provide a graph data integrity protection method, which is used to solve the technical problem that the prior art lacks fine-grained integrity protection of graph data and the problems that the existing graph data integrity protection technical solutions are low in efficiency and have high time and hardware costs.
[0068] In the technical solution of the present disclosure, the user information (including but not limited to user query requests, user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0069] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0070] It should be noted that in the embodiments of the present disclosure, certain software, components, models and other existing solutions in the industry may be mentioned, which should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0071] Figure 1 This is an application scenario diagram of the graph data integrity protection method according to an embodiment of the present disclosure.
[0072] like Figure 1 As shown, the application scenario 100 according to this embodiment may include big data and / or a database. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0073] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0074] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0075] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0076] It should be noted that the graph data integrity protection method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the graph data integrity protection device provided in the embodiment of the present disclosure can generally be set in the server 105. The graph data integrity protection method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105. Accordingly, the graph data integrity protection device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103 and / or the server 105.
[0077] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0078] The following will be based on Figure 1 The scene described by Figure 2~Figure 3 The graph data integrity protection method of the disclosed embodiment is described in detail.
[0079] Figure 2 It is a flowchart of a graph data integrity protection method according to an embodiment of the present disclosure.
[0080] like Figure 2 As shown, the graph data integrity protection of this embodiment includes operations S210 to S240.
[0081] In operation S210, structural information of target graph data is recorded using a multi-branch tree structure based on a target filter.
[0082] The multi-branch tree structure constructed by the present disclosure is only used to record the structural information of the target graph data, that is, the identifier of each node or edge in the target graph data, and does not record other information included in the nodes or edges in the target graph data. Those skilled in the art can select information that meets the requirements based on the technical inspiration given by the present disclosure and record it in the multi-branch tree structure.
[0083] The target filter involved in the present disclosure may be a cuckoo filter, and the following embodiments of the present disclosure further illustrate the technical solution of the present disclosure using a cuckoo filter. Those skilled in the art may select other filters with the same or similar functions.
[0084] In operation S210, each node of the multi-branch tree is a cuckoo filter, and the change or query operation of the target graph data can be efficiently recorded through the characteristics of the cuckoo filter itself.
[0085] In operation S220, the private key used for signing and the root node and the current child node that is not full of information in the multi-branch tree structure are stored in the trusted storage area, and other child nodes that are full of information in the multi-branch tree structure are stored in the untrusted storage area.
[0086] The trusted memory area involved in operation S220 is based on a TPM or TCM hardware security mechanism, and those skilled in the art may select other hardware security mechanisms that meet the requirements according to the technical inspiration provided by the present disclosure.
[0087] Operation S220 stores the nodes in the multi-branch tree structure in classified manner, and stores the most important root nodes and current child nodes that are not fully populated and are easily tampered with in the trusted memory area, which can greatly improve security and reduce potential attack risks.
[0088] At the same time, only a few nodes in the multi-branch tree structure are stored in the trusted storage area, which can also reduce hardware costs.
[0089] In operation S230, a hash operation is performed on other child nodes in the multi-branch tree structure, and the operation result is stored in the root node of the multi-branch tree structure.
[0090] Through the hash operation of operation S230, the security and reliability of other child nodes stored in the untrusted storage area can be guaranteed, and the risk of tampering can be reduced.
[0091] In operation S240, integrity protection is performed on the modification operation of the target graph data using the multi-tree structure after the hash operation, and integrity protection verification is performed on the query operation of the target graph data using the private key and the multi-tree structure after the hash operation.
[0092] Operation S240 can achieve protection of the target graph data in two dimensions, namely, integrity protection of change operations and integrity protection of query operations, where change operations include new operations, deletion operations, change operations, and storage area change operations; technical personnel in this field can select other operations that meet the needs based on the technical inspiration given in this disclosure.
[0093] The present disclosure utilizes a multi-branch tree structure based on a target filter to record the structural information of the target graph data, thereby realizing efficient recording of the target graph data structural information and fine-grained integrity protection; at the same time, since the multi-branch tree structure utilizes the addition and query operations of the target filter to replace a large number of signature and signature verification operations, efficient verification of the target graph data is realized and time consumption is reduced; in addition, based on trusted computing technology, the nodes of the multi-branch tree structure are classified and stored, and the root node and the current child nodes that are not fully stored and can be modified are stored in a trusted storage area, so that the graph data integrity protection scheme of the present disclosure is based on hardware security, which reduces the possibility of potential attacks or tampering, and greatly improves the security and reliability of the graph data.
[0094] The following is a specific example using a cuckoo filter and combined with the attached Figure 3 The above-mentioned graph data integrity protection method provided by the present disclosure is further explained in detail.
[0095] Figure 3 It is a software and hardware configuration diagram of the graph data integrity protection method according to an embodiment of the present disclosure.
[0096] like Figure 3 As shown in the figure, a graph database is installed on the host. The graph database includes one or more target graph data. The graph database library provides users with services for adding, deleting, modifying, and querying nodes or edges. Since the target graph data in the graph database is stored on the disk, it is easy to be directly tampered by malicious attackers. Therefore, when the graph database provides query services, it is necessary to provide users with integrity evidence of the query results so that users can trust the query results. The graph database has its own storage space, which is responsible for storing the node and edge data of the graph.
[0097] However, the mechanism designed by the present disclosure, especially the multi-branch tree structure based on the cuckoo filter, is only used to record the existence of the node ID (identifier, the same below) or edge ID of the target graph data to provide integrity evidence, but does not store the node and edge data themselves.
[0098] At the same time, if Figure 3 As shown, the nodes of the multi-branch tree structure based on the cuckoo filter are classified and stored, and the private key used for signature verification, the root node in the multi-branch tree structure, the current cuckoo filter entity subnode that is not fully stored, and the current cuckoo filter relationship subnode that is not fully stored are stored in the trusted storage area. Other child nodes in the multi-branch tree structure, such as other cuckoo filter entity subnodes that have stored information and other cuckoo filter relationship subnodes that have stored information, are stored in the untrusted storage area. This classified storage method can not only ensure the security of graph data but also reduce hardware costs.
[0099] According to an embodiment of the present disclosure, the above-mentioned use of a multi-branch tree structure based on a target filter to record the structural information of the target graph data includes: constructing a multi-branch tree structure for protecting the integrity of the target graph data, and setting each node of the multi-branch tree structure as a target filter; dividing the child nodes of the multi-branch tree structure into entity child nodes and relationship child nodes, and using the entity child nodes of the multi-branch tree structure to record the identifiers of the nodes in the target graph data; using the relationship child nodes of the multi-branch tree structure to record the identifiers of the start nodes and the end nodes of the edges in the target graph data.
[0100] The present disclosure constructs a tree data structure based on the cuckoo filter, which is used to record the structural information of the target graph data, that is, only the node ID and edge ID of the target graph data are recorded.
[0101] In the present disclosure, the multi-tree structure is a tree data structure, and each node of the multi-tree structure is a cuckoo filter. By classifying the nodes of the multi-tree structure, entity sub-nodes and relationship sub-nodes are obtained, wherein the entity sub-node only records the node ID of the target graph data, and the relationship sub-node records the start and end point IDs of the edges in the target graph data.
[0102] The above multi-branch tree structure utilizes the cuckoo filter, which can efficiently implement the addition, deletion, modification and query operations. At the same time, since only the structural information of the target graph data is recorded, it can not only protect the structural integrity of the target graph data, but also save a lot of storage space.
[0103] According to an embodiment of the present disclosure, the above-mentioned hashing operation on other child nodes in the multi-tree structure and storing the operation results on the root node of the multi-tree structure includes: hashing the other entity child nodes in the multi-tree structure, and adding the hashing operation results of the other entity child nodes to the root node of the multi-tree structure; hashing the other relationship child nodes in the multi-tree structure, and adding the hashing operation results of the other relationship child nodes to the root node of the multi-tree structure.
[0104] Since the other sub-nodes that are full of information are stored in the untrusted storage area, it is necessary to perform hash operations on the other sub-nodes to ensure the reliability of the information stored in the other sub-nodes.
[0105] By storing the above hash operation results on the root node, dual verification of the root node and other child nodes can be achieved. For example, if other cuckoo filter child nodes in the untrusted storage area are tampered with, it can also be discovered by checking the cuckoo filter root node in the multi-branch tree structure.
[0106] According to an embodiment of the present disclosure, the above-mentioned use of the multi-branch tree structure after the hash operation to protect the integrity of the change operation of the target graph data includes: when the new operation of the target graph data is legal, adding the identifier associated with the newly added node or edge in the target graph data to the current child node of the multi-branch tree structure after the hash operation; when the current child node in the multi-branch tree structure after the hash operation is full of information, migrating the current child node to a non-trusted storage area, and generating a new current child node in the trusted storage area.
[0107] When new nodes or edges are added to the target graph data, the new node ID or the start and end node IDs involved in the new edge are added to the current cuckoo filter sub-node. For example, the new node ID is added to the current cuckoo filter entity sub-node, and the start and end node IDs involved in the new edge are added to the current cuckoo filter relationship sub-node.
[0108] When the current child node is migrated to the untrusted storage area, it becomes another child node that is already full of information. At this time, it is necessary to perform a hash operation on the current child node that has been migrated to the untrusted area, and store the result of the hash operation on the root node.
[0109] The existence of the newly added nodes or edges is recorded by using the current cuckoo filter entity / relationship subnodes. At the same time, since the current cuckoo filter entity / relationship subnodes are stored in the trusted storage area, the security and reliability of the above operations can be guaranteed. Through the above operations, the structural information of the target graph data recorded by the multi-tree structure based on the cuckoo filter can be guaranteed to be consistent with the actual structural information to prevent tampering.
[0110] According to an embodiment of the present disclosure, the above-mentioned use of the multi-branch tree structure after hash operation to protect the integrity of the change operation of the target graph data includes: when the deletion operation of the target graph data is legal, traversing the multi-branch tree structure after hash operation to obtain child nodes associated with the deleted nodes or edges in the target graph data, and deleting the identifiers in the associated sub-nodes from the multi-branch tree structure after hash operation.
[0111] When deleting a node or edge in the target graph data, the multitree structure is first traversed to find the cuckoo filter child node corresponding to the deleted node or edge, and the ID in the cuckoo filter child node is deleted. The deletion operation utilizes the deletable feature of the cuckoo filter, achieving efficient deletion.
[0112] According to an embodiment of the present disclosure, the above-mentioned use of the multi-branch tree structure after hash operation to protect the integrity of the change operation of the target graph data includes: when the change operation of the target graph data is legal, traversing the multi-branch tree structure after hash operation to obtain child nodes associated with the changed nodes or edges in the graph data; and successively performing identifier deletion operations and identifier addition operations on the associated child nodes.
[0113] To modify the nodes or edges of the target graph data, such as modifying the node ID or the start and end node IDs of the edge, you need to first delete them and then add them, thereby ensuring the consistency of the graph data.
[0114] The legal addition operations, legal deletion operations, and legal change operations involved in the above embodiments are only for the ID stored in the multi-branch tree structure, and not for other information possessed by the nodes or edges in the target graph data. At the same time, the present disclosure stores a private key SK (Secret Key) for signing, a cuckoo filter root node, a current cuckoo filter relationship subnode, and a current cuckoo filter entity subnode in a trusted storage area. Since the trusted storage area is based on a hardware security mechanism, all contents in the trusted storage area are safe and cannot be tampered with by malicious attackers. In addition, the legal addition operations, legal deletion operations, legal change operations, and legal storage migration operations involved in the above embodiments can ensure that the content recorded by the multi-branch tree structure is consistent with the actual structural information of the target graph data, thereby ensuring the consistency of the graph data.
[0115] As for illegal addition operations, illegal deletion operations, illegal modification operations, and illegal storage migration operations, the present disclosure adopts the following technical solutions to ensure the integrity and consistency of graph data.
[0116] According to an embodiment of the present disclosure, the above-mentioned use of the multi-tree structure after hash operation to protect the integrity of the change operation of the target graph data also includes: when the change operation of the target graph data is illegal, refusing to execute the modification operation of the multi-tree structure after hash operation; when the change operation of the target graph data is illegal, locating the illegal change operation of the target graph data by comparing the structural information recorded by the multi-tree structure after hash operation with the actual structural information of the target graph data; when the change operation of the target graph data is illegal, rolling back the target graph data after the illegal change operation using the structural information recorded by the multi-tree structure after hash operation.
[0117] Since illegal operations cannot be written into the multitree structure, the structural information recorded in the multitree is different from the actual structural information of the target graph data, which allows users to determine that the target graph data has been illegally changed. Through the IDs recorded by each cuckoo filter in the multitree structure, users can roll back the illegally changed target graph data.
[0118] The following is a further detailed description of the target graph data change operation involved in the present disclosure in combination with the specific implementation of the cuckoo filter.
[0119] Since the recording capacity of a single cuckoo filter is limited, the present disclosure adopts a tree-shaped cuckoo filter combination, that is, the multi-branch tree structure based on the cuckoo filter mentioned above, to meet the expansion requirements. The specific method is: hash each cuckoo filter relationship subnode and cuckoo filter entity subnode in the non-trusted storage area such as the host disk, and add the hash value to the cuckoo filter root node. Note that the cuckoo filter subnodes on these disks are full of information and record the relevant structural information of the target graph data. The current cuckoo filter relationship subnode and the current cuckoo filter entity subnode, two cuckoo filters in use that are not full of records, are stored in the trusted storage area and protected by trusted computing technology. If an attacker tampers with the cuckoo filter subnode that is already full of records on the disk, this behavior can be discovered. The reason is that the attacker cannot access the cuckoo filter root node in the trusted storage area and cannot add the forged cuckoo filter subnode to the cuckoo filter root node. Furthermore, the attacker cannot access the current cuckoo filter relationship subnode and the current cuckoo filter entity subnode in the trusted storage area, and cannot add its forged nodes or edges to the two cuckoo filter subnodes, nor can it delete nodes or edges from the two cuckoo filter subnodes. Finally, if the current cuckoo filter relationship subnode or the current cuckoo filter entity subnode is full, its hash value will be calculated and then added to the cuckoo filter root node and stored in the untrusted storage area, and then a new current cuckoo filter relationship subnode or current cuckoo filter entity subnode will be created in the trusted storage area.
[0120] According to an embodiment of the present disclosure, the above-mentioned use of a private key and a multi-branch tree structure after a hash operation to perform integrity protection verification on the query operation of the target graph data includes: based on the user's query request, using the private key to sign the root node and the current child node in the multi-branch tree structure after the hash operation, and sending the signed multi-branch tree structure to the user as a query result; performing signature verification on the query result, performing integrity verification on the transmission process of the query result based on the signature verification result, and performing credibility verification on the query result based on the integrity verification result.
[0121] After the user initiates a query request, the graph database uses the private key SK to sign the query result and then sends the signed query result to the user.
[0122] The user verifies the signature to ensure that the query result has not been tampered with during transmission. If tampering is found, the process is terminated; if not, the subsequent steps are executed.
[0123] The root node, current relationship subnode and current entity subnode stored in the trusted storage area are signed with a private key, achieving double security guarantee for the query results. At the same time, since there are only two signatures: the signature of the query result and the signature of the current cuckoo filter relationship subnode, current cuckoo filter entity subnode and cuckoo filter root node in the trusted storage area. Correspondingly, the signature verification operation is also twice. This greatly reduces the time consumption of signature verification and improves the user query experience.
[0124] According to an embodiment of the present disclosure, the above-mentioned integrity verification of the transmission process of the query result based on the signature verification result includes: when the signature verification result is that neither the root node nor the current child node has been tampered with, recalculating the hash values of other child nodes in the signed multi-branch tree structure; when the recalculated hash value is the same as the hash value in the root node, determining that the query result has integrity during the transmission process.
[0125] The integrity verification during the transmission process includes two stages: signature verification and hash value verification. Together, they ensure the integrity of the data during transmission and prevent the graph data from being tampered with during transmission.
[0126] According to an embodiment of the present disclosure, the above-mentioned integrity verification of the transmission process of the query result based on the signature verification result also includes: when the signature verification result is that the root node and / or the current child node has been tampered with, determining that the query result does not have integrity during the transmission process; when the recalculated hash value is different from the hash value in the root node, determining that the query result does not have integrity during the transmission process.
[0127] If there is a problem with either signature verification or hash value verification, the query results will be stopped from being transmitted to the user, and it will be determined whether the graph data has been tampered with during the transmission process.
[0128] According to an embodiment of the present disclosure, the above-mentioned credibility verification of the query result based on the integrity verification result includes: when the query result has integrity, traversing the target graph data, and when the traversal result is that the nodes and edges in the target graph data exist in the query result, determining that the query result is credible.
[0129] When the integrity verification is passed, the credibility of the query results needs to be verified. By comparing the actual structural information of the target graph data with the structural information recorded in the query results, the credibility of the query results can be determined simply and efficiently.
[0130] According to an embodiment of the present disclosure, the above-mentioned credibility verification of the query result based on the integrity verification result also includes: when the traversal result is that the nodes and / or edges in the target graph data do not exist in the query result, determining that the query result is not credible.
[0131] The following is a further detailed description of the graph data integrity protection technical solution for the query operation involved in the present disclosure through specific embodiments.
[0132] When a user initiates a query request, the graph database signs the current cuckoo filter relationship subnode, the current cuckoo filter entity subnode, and the cuckoo filter root node with the private key SK, and then sends it to the user together with all the already full cuckoo filter relationship subnodes and cuckoo filter entity subnodes in the untrusted storage area. Note that at this time, a graph with hundreds of millions of nodes is not transmitted, only a few cuckoo filters are transmitted, which greatly reduces the amount of information transmission compared to the whole graph integrity protection method.
[0133] The user verifies the signatures of the current cuckoo filter relationship subnode, the current cuckoo filter entity subnode, and the cuckoo filter root node to ensure that the three cuckoo filters have not been tampered with. If tampering is found, terminate. If no tampering is found, further calculate the hash value for each already filled cuckoo filter relationship subnode or cuckoo filter entity subnode, and query whether the value is recorded in the cuckoo filter root node. If tampering is found, terminate. If no tampering is found, proceed to the next step. Note that the signature of the cuckoo filter root node and the existence query of the filled cuckoo filter subnode are used here to check the integrity of multiple filled cuckoo filter subnodes. Only by ensuring that these filters have not been tampered with by the attacker can we further check whether the edges or nodes in the query results have been tampered with in the subsequent steps.
[0134] The user queries the existence of the nodes and edges contained in the query result one by one in the non-root cuckoo filter child nodes. If a node or edge does not exist in any cuckoo filter child node, the query result is considered to have been tampered with and is unreliable. Otherwise, the query result is considered to have not been tampered with and is reliable.
[0135] The present disclosure utilizes trusted computing technology to protect a trusted storage area with limited storage space, in which a tree-shaped cuckoo filter combination is maintained, which can facilitate expansion. On this basis, the present disclosure utilizes the addition and deletion operations of the cuckoo filter to record the existence of nodes or edges. Since the currently operable cuckoo filter is located in the trusted storage area, the recording result of the current filter is credible, and when it is full and moved to the untrusted storage area, its hash value is recorded in the cuckoo filter root node. In this case, if the filter in the untrusted storage area is tampered with, it can also be discovered by checking the cuckoo filter root node. Finally, when sending to the user for verification, the current cuckoo filter relationship subnode, the current cuckoo filter entity subnode, and the cuckoo filter root node in the trusted storage area are signed with a private key SK, ensuring the integrity of these three filters outside the trusted storage area (i.e., the user end).
[0136] It can be seen that the number of signatures disclosed in the present invention is only 2: the signature of the query result and the signature of the current cuckoo filter relationship subnode, the current cuckoo filter entity subnode and the cuckoo filter root node in the trusted storage area. Correspondingly, the signature verification operation is also 2 times. The effect achieved is that the user can ensure that the query result has not been tampered with during the transmission process, and at the same time, it can also ensure that the edges and nodes appearing in the query result are generated by normal addition, deletion and modification operations in the graph data, and have not been directly tampered with by attackers through disk access.
[0137] In contrast, if the integrity protection of the entire graph is adopted (signing the entire graph), then when the user verifies whether the graph data has been directly tampered with by an attacker through disk access, the entire graph and the signature of the entire graph need to be sent to the user, which is unrealistic. If each node and edge is signed by a signature, then if 1,000 nodes or edges appear in the query result, the signature needs to be verified 1,000 times, while the present disclosure only requires 2 signature verification operations, and the other verification operations are query operations on the filter, and the calculation time is negligible compared to the signature verification operation.
[0138] In summary, the present invention realizes fine-grained integrity protection of graph data, and replaces a large number of signature and signature verification operations with the addition and query operations of cuckoo filters, realizing an efficient verification method; at the same time, trusted computing technology is adopted to establish the overall security of the present invention on the basis of hardware security. Only when an attacker breaks through the security chip will the entire solution be threatened.
[0139] Figure 4 It is a structural schematic diagram of a graph data integrity protection device according to an embodiment of the present disclosure.
[0140] like Figure 4The data integrity protection device 400 shown in the figure includes a recording module 410, a storage setting module 420, a hash operation module 430 and an integrity verification module 440.
[0141] The recording module 410 is used to record the structural information of the target graph data using the multi-tree structure of the target filter; in one embodiment, the recording module 410 can be used to perform the operation S210 described above, which will not be repeated here.
[0142] The storage setting module 420 is used to store the private key used for signing, the root node in the multi-branch tree structure, and the current child node that is not full of information in the trusted storage area, and store other child nodes in the multi-branch tree structure that are full of information in the untrusted storage area; in one embodiment, the storage setting module 420 can be used to perform the operation S220 described above, which will not be repeated here.
[0143] The hash operation module 430 is used to perform hash operations on other child nodes in the multi-tree structure and store the operation results on the root node of the multi-tree structure; in one embodiment, the hash operation module 430 can be used to execute the operation S230 described above, which will not be repeated here.
[0144] The integrity verification module 440 is used to perform integrity protection on the modification operation of the target graph data using the multi-tree structure after the hash operation, and to perform integrity protection verification on the query operation of the target graph data using the private key and the multi-tree structure after the hash operation. In one embodiment, the integrity verification module 440 can be used to perform the operation S240 described above, which will not be repeated here.
[0145] According to an embodiment of the present disclosure, any multiple modules of the recording module 410, the storage setting module 420, the hash operation module 430, and the integrity verification module 440 can be combined into one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the recording module 410, the storage setting module 420, the hash operation module 430, and the integrity verification module 440 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in any appropriate combination of any of them. Alternatively, at least one of the recording module 410, the storage setting module 420, the hash operation module 430, and the integrity verification module 440 may be at least partially implemented as a computer program module, and when the computer program module is executed, the corresponding function may be performed.
[0146] According to an embodiment of the present disclosure, the recording module 410 includes a construction and setting unit, an entity recording unit and a relationship recording unit.
[0147] The building and setting unit is used to build a multi-branch tree structure for protecting the integrity of target graph data, and set each node of the multi-branch tree structure as a target filter.
[0148] The entity recording unit is used to divide the child nodes of the multi-branch tree structure into entity child nodes and relationship child nodes, and use the entity child nodes of the multi-branch tree structure to record the identifiers of the nodes in the target graph data.
[0149] The relationship recording unit is used to record the identifier of the starting node and the identifier of the ending node of the edge in the target graph data using the relationship sub-node of the multi-branch tree structure.
[0150] According to an embodiment of the present disclosure, the hash operation module 430 includes an entity hash unit and a relation hash unit.
[0151] The entity hash unit is used to perform hash operations on other entity subnodes in the multi-branch tree structure and add the hash operation results of other entity subnodes to the root node of the multi-branch tree structure.
[0152] The relation hash unit is used to perform hash operations on other relation sub-nodes in the multi-tree structure, and add the hash operation results of other relation sub-nodes to the root node of the multi-tree structure.
[0153] According to an embodiment of the present disclosure, the integrity verification module 440 includes a legal addition unit and a storage migration unit.
[0154] The legal addition unit is used to add the identifier associated with the newly added node or edge in the target graph data to the current child node of the multi-branch tree structure after the hash operation when the addition operation of the target graph data is legal.
[0155] The storage migration unit is used to migrate the current child node to the untrusted storage area when the current child node in the multi-branch tree structure after the hash operation is full of information, and generate a new current child node in the trusted storage area.
[0156] According to an embodiment of the present disclosure, the integrity verification module 440 further includes a legal deletion unit.
[0157] The legal deletion unit is used to traverse the multi-branch tree structure after the hash operation when the deletion operation of the target graph data is legal, obtain the child nodes associated with the deleted nodes or edges in the target graph data, and delete the identifiers in the associated child nodes from the multi-branch tree structure after the hash operation.
[0158] According to an embodiment of the present disclosure, the integrity verification module 440 further includes a legal modification unit.
[0159] The legal change unit is used to traverse the multi-branch tree structure after the hash operation when the change operation of the target graph data is legal, and obtain the child nodes associated with the changed nodes or edges in the graph data; and perform identifier deletion operations and identifier addition operations on the associated child nodes in sequence.
[0160] According to an embodiment of the present disclosure, the integrity verification module 440 further includes a rejection execution unit for processing illegal change operations, a comparison and positioning unit, and a rollback unit.
[0161] The execution rejection unit is used to reject the modification operation on the multi-branch tree structure after the hash operation when the modification operation on the target graph data is illegal.
[0162] The comparison and positioning unit is used to locate the illegal change operation of the target graph data by comparing the structural information recorded in the multi-branch tree structure after the hash operation with the actual structural information of the target graph data when the change operation of the target graph data is illegal.
[0163] The rollback unit is used to roll back the target graph data after the illegal change operation by using the structural information recorded in the multi-branch tree structure after the hash operation when the change operation of the target graph data is illegal.
[0164] According to an embodiment of the present disclosure, the integrity verification module 440 further includes a signature unit and a signature verification unit.
[0165] The signature unit is used to sign the root node and the current child node in the multi-branch tree structure after the hash operation using the private key based on the user's query request, and send the signed multi-branch tree structure to the user as the query result.
[0166] The signature verification unit is used to perform signature verification on the query result, perform integrity verification on the transmission process of the query result based on the signature verification result, and perform credibility verification on the query result based on the integrity verification result.
[0167] According to an embodiment of the present disclosure, the above-mentioned signature verification unit includes a hash value recalculation subunit and a hash value comparison subunit.
[0168] The hash value recalculation subunit is used to recalculate the hash values of other child nodes in the signed multi-branch tree structure when the signature verification result is that the root node and the current child node have not been tampered with.
[0169] The hash value comparison subunit is used to determine the integrity of the query result during the transmission process when the recalculated hash value is the same as the hash value in the root node.
[0170] According to an embodiment of the present disclosure, the signature verification unit further includes a first determination subunit and a second determination subunit.
[0171] The first determination subunit is used to determine that the query result does not have integrity during the transmission process when the signature verification result shows that the root node and / or the current child node have been tampered with.
[0172] When the hash value obtained by recalculation is different from the hash value in the root node, the second determination subunit determines that the query result does not have integrity during the transmission process.
[0173] According to an embodiment of the present disclosure, the signature verification unit further includes a first traversal and credibility determination subunit.
[0174] The first traversal and credibility determination subunit is used to traverse the target graph data when the query result is complete, and determine that the query result is credible when the traversal result shows that the nodes and edges in the target graph data exist in the query result.
[0175] According to an embodiment of the present disclosure, the signature verification unit further includes a second traversal and credibility determination subunit.
[0176] The second traversal and credibility determination subunit is used to determine that the query result is not credible when the traversal result is that the nodes and / or edges in the target graph data do not exist in the query result.
[0177] Figure 5 It is a block diagram of an electronic device suitable for implementing a graph data integrity protection method according to an embodiment of the present disclosure.
[0178] like Figure 5 As shown, the electronic device 500 according to an embodiment of the present disclosure includes a processor 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage part 508 to a random access memory (RAM) 503. The processor 501 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 501 may also include an onboard memory for caching purposes. The processor 501 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0179] In RAM 503, various programs and data required for the operation of electronic device 500 are stored. Processor 501, ROM 502 and RAM 503 are connected to each other via bus 504. Processor 501 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 502 and / or RAM 503. It should be noted that the program can also be stored in one or more memories other than ROM 502 and RAM 503. Processor 501 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0180] According to an embodiment of the present disclosure, the electronic device 500 may further include an input / output (I / O) interface 505, which is also connected to the bus 504. The electronic device 500 may further include one or more of the following components connected to the input / output (I / O) interface 505: an input portion 506 including a keyboard, a mouse, etc.; an output portion 507 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 508 including a hard disk, etc.; and a communication portion 509 including a network interface card such as a LAN card, a modem, etc. The communication portion 509 performs communication processing via a network such as the Internet. A drive 510 is also connected to the input / output (I / O) interface 505 as needed. A removable medium 511, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 510 as needed, so that a computer program read therefrom is installed into the storage portion 508 as needed.
[0181] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0182] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 502 and / or RAM 503 described above and / or one or more memories other than ROM 502 and RAM 503.
[0183] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the graph data integrity protection method provided by the embodiment of the present disclosure.
[0184] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 501. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0185] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 509, and / or installed from the removable medium 511. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0186] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 509, and / or installed from the removable medium 511. When the computer program is executed by the processor 501, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0187] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0188] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0189] It will be appreciated by those skilled in the art that the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations or combinations are not explicitly described in the present disclosure. In particular, without departing from the spirit and teachings of the present disclosure, the features described in the various embodiments of the present disclosure may be combined and / or combined in a variety of ways. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0190] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A graph data integrity protection method, characterized in that: The method comprises: Using a multi-branch tree structure based on target filters to record the structural information of target graph data; The private key used for signing, the root node in the multi-branch tree structure, and the current child node that is not fully stored in the information are stored in the trusted storage area, and the other child nodes in the multi-branch tree structure that are fully stored in the information are stored in the untrusted storage area; Performing hash operations on other child nodes in the multi-branch tree structure, and storing the operation results on the root node of the multi-branch tree structure; The multi-tree structure after hash operation is used to perform integrity protection on the change operation of the target graph data, and the private key and the multi-tree structure after hash operation are used to perform integrity protection verification on the query operation of the target graph data.
2. The method according to claim 1, characterized in that The structural information of the target graph data recorded by the multi-tree structure based on the target filter includes: Constructing a multi-branch tree structure for protecting the integrity of the target graph data, and setting each node of the multi-branch tree structure as a target filter; Dividing the subnodes of the multi-branch tree structure into entity subnodes and relationship subnodes, and using the entity subnodes of the multi-branch tree structure to record the identifiers of the nodes in the target graph data; The relationship subnodes of the multi-branch tree structure are used to record the identifiers of the start nodes and the end nodes of the edges in the target graph data.
3. The method according to claim 2, characterized in that Performing hash operations on other child nodes in the multi-branch tree structure and storing the operation results on the root node of the multi-branch tree structure includes: Performing hash operations on other entity subnodes in the multi-branch tree structure, and adding the hash operation results of the other entity subnodes to the root node of the multi-branch tree structure; Hash operations are performed on other relationship sub-nodes in the multi-branch tree structure, and the hash operation results of the other relationship sub-nodes are added to the root node of the multi-branch tree structure.
4. The method according to claim 1, characterized in that: Using the multi-tree structure after hash operation to perform integrity protection on the target graph data change operation includes: If the operation of adding the target graph data is legal, adding the identifier associated with the newly added node or edge in the target graph data to the current child node of the multi-branch tree structure after the hash operation; When the current child node in the multi-branch tree structure after the hash operation is full of information, the current child node is migrated to the untrusted storage area, and a new current child node is generated in the trusted storage area.
5. The method according to claim 1, characterized in that: Using the multi-tree structure after hash operation to perform integrity protection on the target graph data change operation includes: When the deletion operation of the target graph data is legal, the multi-branch tree structure after the hash operation is traversed to obtain the child nodes associated with the deleted nodes or edges in the target graph data, and the identifiers in the associated child nodes are deleted from the multi-branch tree structure after the hash operation.
6. The method according to claim 1, characterized in that Using the multi-tree structure after hash operation to perform integrity protection on the target graph data change operation includes: In the case where the modification operation of the target graph data is legal, traversing the multi-branch tree structure after the hash operation to obtain child nodes associated with the modified nodes or edges in the graph data; The identifier deletion operation and the identifier addition operation are successively performed on the associated child nodes.
7. The method according to any one of claims 4 to 6, characterized in that: Also includes: If the target graph data modification operation is illegal, refusing to perform the modification operation on the multi-tree structure after the hash operation; In the case where the change operation of the target graph data is illegal, locating the illegal change operation of the target graph data by comparing the structural information recorded by the multi-branch tree structure after the hash operation with the actual structural information of the target graph data; In the case where the change operation of the target graph data is illegal, the target graph data after the illegal change operation is rolled back using the structural information recorded in the multi-branch tree structure after the hash operation.
8. The method according to claim 1, characterized in that Using the private key and the multi-tree structure after the hash operation to perform integrity protection verification on the query operation of the target graph data includes: Based on the user's query request, the root node and the current child node in the multi-branch tree structure after the hash operation are signed using the private key, and the signed multi-branch tree structure is sent to the user as a query result; Perform signature verification on the query result, perform integrity verification on the transmission process of the query result based on the signature verification result, and perform credibility verification on the query result based on the integrity verification result.
9. The method according to claim 8, characterized in that Performing integrity verification on the transmission process of the query result based on the signature verification result includes: If the signature verification result shows that the root node and the current child node have not been tampered with, recalculate the hash values of other child nodes in the signed multi-branch tree structure; When the recalculated hash value is the same as the hash value in the root node, it is determined that the query result has integrity during the transmission process.
10. The method according to claim 9, characterized in that Also includes: In a case where the signature verification result shows that the root node and / or the current child node are tampered with, determining that the query result does not have integrity during the transmission process; When the hash value obtained by recalculation is different from the hash value in the root node, it is determined that the query result does not have integrity during the transmission process.
11. The method according to claim 8, characterized in that Performing credibility verification on the query result based on the integrity verification result includes: When the query result is complete, the target graph data is traversed, and when the traversal result shows that all nodes and edges in the target graph data exist in the query result, it is determined that the query result is credible.
12. The method according to claim 11, characterized in that Also includes: In the case where the traversal result is that the nodes and / or edges in the target graph data do not exist in the query result, it is determined that the query result is not credible.
13. A graph data integrity protection device, characterized in that: The device comprises: A recording module, used for recording structural information of target graph data by using a multi-branch tree structure of a target filter; A storage setting module, used to store the private key used for signing, the root node in the multi-branch tree structure, and the current child node that is not fully stored in the information in the trusted storage area, and store other child nodes in the multi-branch tree structure that are fully stored in the information in the untrusted storage area; A hash operation module, used for performing a hash operation on other child nodes in the multi-branch tree structure, and storing the operation result on the root node of the multi-branch tree structure; The integrity verification module is used to use the multi-branch tree structure after the hash operation to perform integrity protection on the change operation of the target graph data, and use the private key and the multi-branch tree structure after the hash operation to perform integrity protection verification on the query operation of the target graph data.
14. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 12.
15. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.
16. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 12 are implemented.