Data isolation methods, devices, electronic equipment and storage media

By generating primary data and utilizing a combination of multiple databases to parse business scenarios and operation identifiers, the problem of data isolation in multi-tenant SaaS systems is solved, achieving data security and isolation while avoiding data loss and contamination.

CN123116338APending Publication Date: 2026-11-17ISOFTSTONE DATA TECHNOLOGY (HUBEI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611488489.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-23
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

In multi-tenant SaaS systems, existing solutions cannot simultaneously ensure transaction consistency and graph reasoning capabilities. There is no unified solution for cross-database tenant isolation, tenant identifiers are easily lost, writes lack mandatory marking, deletions lack cross-database cascading, and type conversions are inconsistent, affecting the stability of data isolation boundaries.

Method used

By generating the first data, using the first key to parse the business scenario, the second key to parse the operation identifier, and the third key for addressing, combined with PostgreSQL, Neo4j property graph library, and GraphDB, data isolation is achieved to ensure that data is not lost during transmission.

Benefits of technology

It achieves database isolation during data changes, prevents data pollution, ensures data security, and avoids data loss and cross-tenant data pollution.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123116338A_ABST
    Figure CN123116338A_ABST
Patent Text Reader

Abstract

This invention discloses a data isolation method, apparatus, electronic device, and storage medium. The method includes: determining first data based on a first request; and modifying a target database based on the first data. By generating the first data and modifying the database based on it, this method achieves isolation between databases during data modification while ensuring the security of the first data and preventing data corruption caused by data loss during transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to data isolation methods, apparatus, electronic devices, and storage media. Background Technology

[0002] In multi-tenant SaaS systems that simultaneously handle business transaction data and graph / ontology inference data, existing solutions generally suffer from the following problems: A single storage system cannot simultaneously guarantee transaction consistency and graph inference capabilities: Strong consistency requirements for business data are suited to relational databases, while graph inference (such as OWL 2 RL materialization and SPARQL queries) requires a triplet database, and attribute graph queries are better suited to graph databases. These three capabilities cannot be simultaneously obtained in a single storage system. There is no unified solution for cross-database tenant isolation: Existing solutions either store all tenant data in the same graph / triplet database, relying solely on query filtering for isolation (weak isolation, prone to privilege escalation); or deploy a separate graph database instance for each tenant (high cost, complex operation and maintenance). Routing keys are lost in the call chain: In the multi-layered calls from the business layer → service layer → data access layer → inference service, tenant identifiers (workspace_id) and namespace identifiers (scene_id / ontology_id) are easily discarded at some layer, leading to cross-tenant data pollution. Write without mandatory tagging: After writing a new node / triple to the graph service, there is no mandatory mechanism to write the tenant context back to the node attributes, causing subsequent queries to be unable to filter by tenant. Deletion without cross-database cascading: When deleting a tenant / workspace, residual data remains in the relational database, attribute graph, and triplet database, making it impossible to guarantee synchronized cleanup across all three databases. Inconsistent type conversion: Non-standard UUID types returned by asynchronous drivers (such as asyncpg) will trigger exceptions if directly passed to the standard library, affecting the stability of isolation boundaries.

[0003] However, existing solutions—shared schema + workspace_id row-level filtering (adding a workspace_id column to the business table and filtering via WHERE clause during queries)—are only applicable to a single storage and cannot cover graph / triple databases. Independent graph instance per tenant: deploying a separate Neo4j / GraphDB instance for each tenant. This offers strong isolation but is costly and makes tenant switching and cross-tenant analysis difficult. PostgreSQL RLS: only covers the relational database and does not solve cross-database consistency issues. Graph label / sub-graph isolation: only covers the graph database and does not solve business transaction consistency issues. Manually passing workspace_id at the application layer: relies on developer compliance and is prone to loss over long chains. Therefore, existing solutions cannot effectively preserve the links between different databases while efficiently implementing business transactions. Summary of the Invention

[0004] This invention provides a data isolation method, apparatus, electronic device, and storage medium to solve the problem of data loss when processing different databases.

[0005] According to one aspect of the present invention, a data isolation method is provided, comprising: First data is determined based on a first request; the first request is a request for data query or modification; the first data is a routing key for data stored in the target database that can execute the first request; the first data includes: a first key, a second key, and a third key; the first key is used to parse the business scenario corresponding to the first request; the second key is used to parse the identifier of the first request operation; the third key is an identifier for addressing in the third database; the target database consists of three independent databases; the target database includes: a first database, a second database, and a third database; the first database is used to record business association sub-tables corresponding to different entities; the second database is used to store the relationships between different entities and their corresponding attribute information; the third database is used to store triples corresponding to different entities; The target database is modified based on the first data.

[0006] According to another aspect of the present invention, a data isolation device is provided, comprising: A first data determination module is used to determine first data based on a first request; the first request is a request for data query or modification; the first data is a routing key for data stored in the target database that can execute the first request; the first data includes: a first key, a second key, and a third key; the first key is used to parse the business scenario corresponding to the first request; the second key is used to parse the identifier of the first request operation; the third key is an identifier for addressing in the third database; the target database consists of three independent databases; the target database includes: a first database, a second database, and a third database; the first database is used to record business association sub-tables corresponding to different entities; the second database is used to store the relationships between different entities and their corresponding attribute information; the third database is used to store triples corresponding to different entities; The modification module is used to modify the target database based on the first data.

[0007] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the data isolation method according to any embodiment of the present invention.

[0008] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the data isolation method described in any embodiment of the present invention.

[0009] The technical solution of this invention involves determining first data based on a first request and modifying a target database based on the first data. This method, by generating first data and modifying the database based on it, achieves isolation between databases during data modification while ensuring the security of the first data and preventing data corruption caused by data loss during transmission.

[0010] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 A flowchart of a data isolation method provided in an embodiment of the present invention; Figure 2 A flowchart for allocating first data at the service layer, as provided in an embodiment of the present invention; Figure 3 A flowchart of a first data acquisition process provided in an embodiment of the present invention; Figure 4 A flowchart of a database writing or query process provided in an embodiment of the present invention; Figure 5 A flowchart of a database deletion process provided in an embodiment of the present invention; Figure 6 This is a schematic diagram of the structure of a data isolation device provided in an embodiment of the present invention; Figure 7 A schematic diagram of the structure of an electronic device for implementing the data isolation method of this invention. Detailed Implementation

[0013] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0014] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0015] In one embodiment, Figure 1 This is a flowchart of a data isolation method provided in an embodiment of the present invention. This embodiment is applicable to situations where data processing is performed on different databases. The method can be executed by a data isolation device, which can be implemented in hardware and / or software. This data isolation device can be configured in any electronic device with network communication capabilities. Figure 1 As shown, the method includes: S110. Determine the first data based on the first request; the first request is a request for data query or modification; the first data is a routing key for data stored in the target database that can execute the first request; the first data includes: a first key, a second key, and a third key; the first key is used to parse the business scenario corresponding to the first request; the second key is used to parse the identifier of the first request operation; the third key is an identifier for addressing in the third database; the target database consists of three independent databases; the target database includes: a first database, a second database, and a third database; the first database is used to record business association sub-tables corresponding to different entities; the second database is used to store the relationships between different entities and their corresponding attribute information; the third database is used to store triples corresponding to different entities.

[0016] The first request is a request message in natural language that needs to be queried or modified, carrying the request header X-Workspace-ID.

[0017] The first key, also known as the top-level tenant identifier, is denoted as scene_id: the identifier of the current business scenario, which limits the scene isolation within Neo4j.

[0018] The second key, also known as the ontology namespace, is denoted as ontology_id: the unique ID of the ontology version for the first request operation. The third key, also known as the triplet routing key, is denoted as studio_route_key. It is generated by combining the workspace_id and the ontology version number into a string and serves as the unique addressing identifier for GraphDB's named graph.

[0019] Specifically, it is determined whether a request identifier exists in the first request. Based on the determination result, the target object is verified. If the target object is inaccessible, the first request is rejected directly. If the target object is accessible, a spatial context object is generated and parsed into a first key, a second key, and a third key. The first key, the second key, and the third key are combined with the spatial identifier as the first data.

[0020] Furthermore, after obtaining the first data, the first data is transmitted to the business Service layer; the Service layer carries the corresponding key when accessing different databases, specifically as follows: Figure 2 As shown, for PostgreSQL: the workspace_id is passed in for row-level isolation; for Neo4j property graph library: the workspace_id, scene_id, and ontology_id are passed in for node property isolation; for GraphDB: the studio_route_key is passed in to locate the named graph.

[0021] PostgreSQL is used to handle transactional business data such as target objects, workspaces, agent configurations, task schedules, and document metadata. Tenant isolation is at the row level, meaning each business table contains a `workspace_id` column, a foreign key, and a CASCADE.

[0022] The Neo4j attribute graph library carries the ontology object type (ObjectType), instance nodes (INSTANCE_OF), and semantic relationships. Tenant isolation is at the node attribute level, meaning each node is required to have its workspace_id and scene_id written to it, and queries are filtered using the WHERE clause.

[0023] GraphDB: It hosts ontology TBoxes, instance triples, and provides OWL2RL inference. Tenant isolation is at the named graph level, meaning all tenants share the same repository, and each tenant's ontology version corresponds to an independent namedgraph, which is routed by studio_route_key.

[0024] Among them, the tenant is the workspace, which is the smallest logical unit for implementing data isolation and resource allocation.

[0025] Furthermore, such as Figure 3 The diagram illustrates the process of three databases retrieving the first data: First, the first request is obtained, and it is determined whether the request carries a unique X-Workspace-ID header. Based on the header, the result request is determined. First, through the API gateway layer, the get_current_workspace dependency injection service parses and extracts the Workspace ID to which the current request belongs, generating a space context object. This space context object is then parsed and injected into the "business service layer (Service)". The business service layer interacts with the three underlying databases according to the operation type, ensuring data isolation through different mechanisms.

[0026] S120. Modify the target database based on the first data.

[0027] Specifically, the target database is modified accordingly based on the first data according to the first request.

[0028] The target database consists of PostgreSQL, Neo4j property graph library, and GraphDB.

[0029] Furthermore, before modifying the target database based on the first data, the process includes: uniformly executing str() on the first data to convert it into a string, thus avoiding inconsistencies in the UUID object types of different database drivers, which could cause routing matching failures.

[0030] Furthermore, such as Figure 4 The diagram shows a flowchart for writing to or querying the target database. Specifically, in the write path, after the caller initiates a write request, the business service layer first creates a node in Neo4j and writes the workspace_id and scene_id attributes, and then writes back the ontology type relationship; at the same time, it writes triples in GraphDB, uses its namedgraph mechanism as implicit markers, and finally ensures the integrity of node attributes through secondary verification.

[0031] Furthermore, in the read path, when the caller initiates a query request, the business service layer will enforce data isolation: when executing a query for Neo4j, it carries the WHERE workspace_id condition to ensure that only the current tenant node is returned; for GraphDB, it uses SPARQL statements to limit the query to a specific named graph to ensure that only the triples of the current tenant are returned, and finally returns the isolated aggregation results to the caller.

[0032] Furthermore, such as Figure 5 The flowchart shown illustrates the process of deleting the target database. Specifically: First, deleting the workspace master record in PostgreSQL triggers foreign key cascading (FK CASCADE), automatically clearing related business sub-table data. Next, in the Neo4j property graph library, the instance nodes within the workspace are located and separated for deletion, followed by the corresponding ontology nodes. Then, in GraphDB, the corresponding named graph is located using `studio_route_key`, and its entirety is deleted or its triples are cleared. Finally, after all operations are completed, post-verification is performed, using a three-database residual scan to ensure the data is thoroughly cleaned, thus completing the deletion of the entire tenant.

[0033] Optionally, the first data is determined based on the first request, including steps A1-A4: Step A1: Verify the request identifier of the first request to obtain the first result.

[0034] The request identifier is the XWorkspaceID header.

[0035] Specifically, if the first request has a request identifier, the first result is that the verification is successful; if the first request does not have a request identifier, the first result is that the verification is unsuccessful.

[0036] Step A2: Validate the target object based on the first result to obtain the second result; the target object is the object that needs to be queried or modified.

[0037] Specifically, if the first result is successful verification, the space identifier is obtained from the request identifier, and it is checked whether the target object has access permissions to the space corresponding to the space identifier. If it does, the second result is that the target object can access the space; otherwise, the second result is that the target object cannot access the space. If the first result is unsuccessful verification, the gateway directly returns a 401 request rejection, and the link is terminated directly.

[0038] The space identifier is denoted as workspace_id.

[0039] Step A3: Obtain the second data based on the second result.

[0040] Specifically, if the second result indicates that the target object is inaccessible, the first request is rejected directly; if the second result indicates that the target object is accessible, a spatial context object is generated as the second data.

[0041] Step A4: Analyze the second data to obtain the first data.

[0042] Specifically, the second data is parsed into a first key, a second key, and a third key, which are then used as the first data.

[0043] Optionally, the database may be modified based on the first data, including steps B1-B3: Step B1: Mark the target database once based on the first data.

[0044] Specifically, the INSERT statement directly fills the first database with the first data based on the workspace_id field of the business table in the first database; the CREATE statement in the second database creates the ontology / instance node, and the creation statement directly writes the workspace_id and scene_id into the node attributes; the first data is directly written into the named graph corresponding to studio_route_key in the third database.

[0045] Step B2: Supplement the target database with data and perform integrity verification.

[0046] Specifically, the business layer performs parameter missing checks on the target database. If missing parameters are found, the data is supplemented according to the data supplementation method corresponding to different databases. If no data is missing, an integrity check is performed.

[0047] Furthermore, the steps for the business layer to perform parameter missing validation on the target database are as follows: The business service layer explicitly writes back the workspace context, such as ontology_id and HAS_TYPE relationships, to the nodes using Cypher / SPARQL, and performs missing validation based on the content to be checked.

[0048] The checks include: mandatory filtering for read operations: all Cypher operations must include WHERE n.workspace_id=$workspace_id; all SPARQL operations must pass GRAPH.<route_key> Named graph is restricted; PG queries are implicitly restricted through foreign key constraints; unified type specification: UUIDs passed across drivers must first be normalized using str() to avoid routing keys becoming invalid due to driver-specific types.

[0049] Cross-driver refers to data transfer between asyncpg / psycopg / neo4j driver / httpx.

[0050] The above steps can prevent unassigned data from occurring when the caller does not pass a key.

[0051] Furthermore, the database is supplemented in the following ways: For the first database, due to foreign key + CASCADE constraints, the business layer does not write back additionally; for the second database, after the node is created, the business layer executes the Cypher statement again to write back the ontology_id attribute and HAS_TYPE semantic relationship, binding the node to the ontology; and for the third database, the ontology semantic triple is supplemented in the corresponding studio_route_key naming graph.

[0052] Further, the specific steps of the integrity check are as follows: For the first database (PostgreSQL), verify whether the `workspace_id` field of the record matches the context. If they match, the write to the first database is successful; otherwise, the write to the first database fails. For the second database (Neo4j), verify whether the `workspace_id`, `scene_id`, and `ontology_id` attributes of the newly written node all exist and their values ​​are equal to the context routing key. If all of the above conditions are met, the write to the second database is successful; otherwise, the write to the second database fails. For the third database, verify whether the target named graph already exists and whether the triples are correctly written to the graph. If all of the above conditions are met, the write to the third database is successful; otherwise, the write to the third database fails.

[0053] Furthermore, if the verification fails, an exception is thrown, triggering a transaction rollback and deleting the data written in this instance.

[0054] Optionally, the target database may be labeled once based on the first data, including steps C1-C2: Step C1: Write the first data into the first database and the third database respectively.

[0055] Specifically, the INSERT statement directly writes the third key to the first database. The first database then writes the data to the named graph corresponding to the studio_route_key in the third database.

[0056] Step C2: Create an instance node in the second database and write the first data into the instance node.

[0057] Specifically, the CREATE statement is executed to create the ontology / instance node. The creation statement directly writes the workspace_id and scene_id into the node attributes of the instance node or ontology node.

[0058] Optionally, the database may be modified based on the first data, including steps D1-D4: Step D1: Filter the first database based on the first data to obtain the first sub-result.

[0059] Specifically, when executing each business query on the first database based on the first data, the filter condition WHERE workspace_id=$workspace_id is forcibly and automatically appended. At the same time, a foreign key constraint pointing to the workspace master table is set for each business table. Based on the filter condition and the foreign key constraint, the data is queried on the first database to obtain the first sub-result.

[0060] Each business table has a workspace_id field with foreign key constraints.

[0061] The `where workspace_id=$workspace_id` filter condition uses a trusted tenant identifier that is passed through the request context and has undergone permission verification.

[0062] The workspace_id foreign key constraint ensures data reference integrity during the write and delete phases, implementing implicit data boundary constraints. On the other hand, it works with explicit filtering conditions at the query level to achieve workspace isolation, ensuring that database query results can only return data rows belonging to the current workspace tenant. This eliminates the risk of reading business data from other tenants across workspaces from the read level. Even if the upper-level business fails to process workspace conditions, the filtering conditions injected uniformly by the framework can serve as a fallback protection to prevent workspace data leakage.

[0063] Step D2: Filter the second database based on the node attributes of the first data to obtain the second sub-result.

[0064] Specifically, the second database is queried based on the first data. During the query, node records belonging to other workspace_ids are filtered out based on the filtering conditions. Finally, only the ontology and instance node data belonging to the current workspace_id are returned, resulting in the second sub-result.

[0065] Furthermore, the steps for adding filtering conditions are as follows: inject the WHERE.workspace_id=$workspace_id filtering condition into all queries in the second database, and add scene_id as needed to create filtering conditions based on the business scenario.

[0066] Step D3: Perform named graph matching on the third database based on the first data to obtain the third sub-result.

[0067] Specifically, when performing a SPARQL query operation on the third database based on the first data, the named graph IRI corresponding to the trusted studio_route_key that is forcibly passed through the context is passed in using GRAPH syntax as the addressing identifier, which strictly limits the scope of the query execution to the named graph specified in the first data. The query will only load and parse the triples in the named graph to obtain the third sub-result.

[0068] In this third database, all workspaces share the same repository storage, and no separate repository instances are deployed for different workspaces. The triple data corresponding to different ontology versions in each workspace are stored in their own independent named graphs.

[0069] Step D4: Integrate and output the first sub-result, the second sub-result, and the third sub-result.

[0070] Specifically, the business service layer aggregates the isolated query results of the first sub-result, the second sub-result, and the third sub-result, and returns them to the caller.

[0071] Optionally, the database may be modified based on the first data, including steps E1-E3: Step E1: Delete the associated main table and sub-tables in the first database based on the first data.

[0072] Specifically, based on the workspace_id identifier in the first database, the workspace main table record is deleted from the first database. Then, relying on the foreign key + ON DELETE CASCADE in the first database, all related business sub-tables are automatically cascaded and deleted.

[0073] The first database is PostgreSQL.

[0074] The associated business sub-table should contain at least the following: target object configuration, agent, task plan, and document metadata.

[0075] Step E2: Delete node instances and associated object types in the second database based on the first data.

[0076] The second database is the Neo4j attribute graph library.

[0077] Specifically, based on the workspace_id in the first data, all nodes with the same identifier as the workspace_id are matched and filtered from the second database as nodes to be deleted; DETACH DELETE is executed to delete all nodes to be deleted, that is, DETACH will first remove all associations of the node and then delete the node; after the nodes to be deleted are cleaned up, DETACH DELETE is executed on all ObjectType ontology type nodes under the workspace.

[0078] Step E3: Delete the information graph in the third database based on the first data.

[0079] The third database is GraphDB.

[0080] Specifically, based on the workspace_id, find the studio_route_key corresponding to all ontology versions of the workspace; locate each corresponding named graph; and execute DROP NAMED GRAPH. <iri>Delete the entire named graph directly. If the environment does not support the DROP syntax, delete all triples within the graph.

[0081] Furthermore, after deleting the information graph in the third database based on the first data, the process also includes: performing a full database scan: scanning the business tables in PostgreSQL to confirm that there are no records with workspace_id=deleted ID; scanning all nodes in Neo4j to check for any remaining nodes with workspace_id=deleted ID; finding no remaining nodes with workspace_id indicates that all named graphs for all workspaces in GraphDB have been deleted; if residual data is found during the scan, an alarm log is output, triggering a compensation cleanup task. Verifying the absence of residual data marks the workspace deletion as complete.

[0082] The technical solution of this embodiment involves determining first data based on a first request and modifying the target database based on the first data. This method, by generating first data and modifying the database based on it, achieves isolation between databases during data modification while ensuring the security of the first data and preventing data corruption caused by data loss during transmission.

[0083] Figure 6 This is a schematic diagram of a data isolation device provided in an embodiment of the present invention. This embodiment is applicable to situations where data processing is performed on different databases. The data isolation device can be implemented in hardware and / or software, and can be configured in any electronic device with network communication capabilities. Figure 6 As shown, the device includes: a first data determination module 210 and a modification module 220, wherein: First data determination module 210: used to determine first data based on a first request; the first request is a request for data query or modification; the first data is a routing key for data stored in the target database that can execute the first request; the first data includes: a first key, a second key, and a third key; the first key is used to parse the business scenario corresponding to the first request; the second key is used to parse the identifier of the first request operation; the third key is an identifier for addressing in the third database; the target database consists of three independent databases; the target database includes: a first database, a second database, and a third database; the first database is used to record business association sub-tables corresponding to different entities; the second database is used to store the relationships between different entities and their corresponding attribute information; the third database is used to store triples corresponding to different entities; Modification module 220: Used to modify the target database based on the first data.

[0084] Optionally, the first data determination module 210 includes: First Result Determination Unit: Used to verify the request identifier of the first request and obtain the first result; Second result determination unit: used to verify the target object based on the first result and obtain the second result; the target object is the object that needs to be queried or modified; Second data determination unit: used to obtain second data based on the second result; First data determination unit: used to parse the second data to obtain the first data.

[0085] Optionally, module 220 may be modified, including: Tagging unit: used to tag the target database once based on the first data; Verification unit: Used to supplement data in the target database and perform integrity verification.

[0086] Optional, the marker unit includes: First writing subunit: used to write the first data into the first database and the third database respectively; The second write sub-unit is used to create an instance node in the second database and write the first data to the instance node.

[0087] Optionally, module 220 may be modified, including: First Sub-Result Determination Unit: Used to perform conditional filtering on the first database based on the first data to obtain the first sub-result; Second sub-result determination unit: used to filter the node attributes of the second database based on the first data to obtain the second sub-result; Third Sub-Result Determination Unit: Used to perform named graph matching on the third database based on the first data to obtain the third sub-result; Output unit: Used to integrate and output the first sub-result, the second sub-result, and the third sub-result.

[0088] Optionally, module 220 may be modified, including: First deletion unit: used to delete the associated main table and sub-tables in the first database based on the first data; The second deletion unit is used to delete node instances and associated object types in the second database based on the first data. The third deletion unit is used to delete information graphs from the third database based on the first data.

[0089] The data isolation device provided in the embodiments of the present invention can execute the data isolation method provided in any of the embodiments of the present invention, and has the corresponding functions and beneficial effects of executing the data isolation method. For details, please refer to the relevant operations of the data isolation method in the foregoing embodiments.

[0090] In one embodiment, Figure 7 This is a structural block diagram of an electronic device provided in an embodiment of the present invention, such as... Figure 7 The diagram illustrates a schematic representation of an electronic device 10 that can be used to implement embodiments of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0091] like Figure 7 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor 11, and the computer program is executed by the at least one processor 11 to enable the at least one processor 11 to perform the method provided by the present invention.

[0092] The processor 11 can perform various appropriate actions and processes based on a computer program stored in the read-only memory (ROM) 12 or a computer program loaded from the storage unit 18 into the random access memory (RAM) 13. The RAM 13 can also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0093] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0094] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as the methods provided in this invention.

[0095] In some embodiments, the methods provided herein may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the methods described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to execute the methods by any other suitable means (e.g., by means of firmware).

[0096] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard parts (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0097] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0098] In the context of this invention, a computer-readable storage medium stores computer instructions that are used to cause a processor to execute and implement the method provided by this invention.

[0099] The present invention also provides a computer program product comprising a computer program that, when executed by a processor, implements the method provided according to embodiments of the present invention. A computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. The computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, the computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0100] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0101] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or middleware components (e.g., application servers), or frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0102] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0103] This invention also provides a computer program product, including a computer program that, when executed by a processor, can implement the methods provided in any embodiment of this application.

[0104] In the implementation of the computer program product, computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0105] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0106] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.< / iri>

Claims

1. A data isolation method, characterized in that, include: Determine the first data according to the first request; The first request is a request for data query or modification; The first data is the routing key of the data stored in the target database that can execute the first request; The first data includes: a first key, a second key, and a third key; the first key is used to parse the business scenario corresponding to the first request; the second key is used to parse the identifier of the first request operation; the third key is the identifier for addressing in the third database; the target database consists of three independent databases; the target database includes: a first database, a second database, and a third database; the first database is used to record business association sub-tables corresponding to different entities; the second database is used to store the relationships between different entities and their corresponding attribute information; the third database is used to store triples corresponding to different entities; The target database is modified based on the first data.

2. The method according to claim 1, characterized in that, Determining the first data according to the first request includes: The first request is verified by the request identifier to obtain the first result; Based on the first result, the target object is verified to obtain the second result; the target object is the object that needs to be queried or modified. Obtain the second data based on the second result; The second data is parsed to obtain the first data.

3. The method according to claim 1, characterized in that, The modification of the database based on the first data includes: The target database is marked once based on the first data; The target database is supplemented with data, and its integrity is verified.

4. The method according to claim 3, characterized in that, The target database is labeled once based on the first data, including: Write the first data into the first database and the third database respectively; Create an instance node in the second database and write the first data into the instance node.

5. The method according to claim 1, characterized in that, The modification of the database based on the first data includes: The first database is filtered based on the first data to obtain the first sub-result; Based on the first data, the node attributes of the second database are filtered to obtain the second sub-result; Based on the first data, a named graph matching operation is performed on the third database to obtain the third sub-result; The first sub-result, the second sub-result, and the third sub-result are integrated and output.

6. The method according to claim 1, characterized in that, The modification of the database based on the first data includes: Delete the main table and sub-tables associated with the first data in the first database; Delete node instances and associated object types in the second database based on the first data; The information graph in the third database is deleted based on the first data.

7. A data isolation device, characterized in that, include: The first data determination module is used to determine the first data according to the first request; The first request is a request for data query or modification; The first data is the routing key of the data stored in the target database that can execute the first request; The first data includes: a first key, a second key, and a third key; the first key is used to parse the business scenario corresponding to the first request; the second key is used to parse the identifier of the first request operation; the third key is the identifier for addressing in the third database; the target database consists of three independent databases; the target database includes: a first database, a second database, and a third database; the first database is used to record business association sub-tables corresponding to different entities; the second database is used to store the relationships between different entities and their corresponding attribute information; the third database is used to store triples corresponding to different entities; The modification module is used to modify the target database based on the first data.

8. The apparatus according to claim 7, characterized in that, The first data determination module includes: The first result determination unit is used to verify the request identifier of the first request and obtain a first result; The second result determination unit is used to verify the target object based on the first result to obtain a second result; the target object is an object that needs to be queried or modified. The second data determining unit is used to obtain second data based on the second result; The first data determining unit is used to parse the second data to obtain the first data.

9. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the data isolation method according to any one of claims 1-6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the data isolation method according to any one of claims 1-6.